Skip to content

Commit 7663ccb

Browse files
committed
Merge branch 'develop' into release/1.4.0
2 parents 1805df1 + 91e82fa commit 7663ccb

File tree

11 files changed

+66
-45
lines changed

11 files changed

+66
-45
lines changed

.github/dependabot.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,27 @@ updates:
33
- package-ecosystem: "maven"
44
directory: "/"
55
schedule:
6-
interval: "weekly"
6+
interval: "monthly"
77
day: "monday"
88
time: "06:00"
9-
timezone: "UTC"
9+
timezone: "Etc/UTC"
1010
groups:
11-
maven-dependencies:
11+
java-test-dependencies:
12+
patterns:
13+
- "org.junit.jupiter:*"
14+
maven-build-plugins:
15+
patterns:
16+
- "org.apache.maven.plugins:*"
17+
- "org.owasp:dependency-check-maven"
18+
- "org.sonatype.plugins:nexus-staging-maven-plugin"
19+
java-production-dependencies:
1220
patterns:
1321
- "*"
22+
exclude-patterns:
23+
- "org.junit.jupiter:*"
24+
- "org.apache.maven.plugins:*"
25+
- "org.owasp:dependency-check-maven"
26+
- "org.sonatype.plugins:nexus-staging-maven-plugin"
1427

1528
- package-ecosystem: "github-actions"
1629
directory: "/" # even for `.github/workflows`

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
99
steps:
1010
- uses: actions/checkout@v4
11-
- uses: actions/setup-java@v3
11+
- uses: actions/setup-java@v4
1212
with:
1313
distribution: 'zulu'
1414
java-version: 21

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ jobs:
1313
analyse:
1414
name: Analyse
1515
runs-on: ubuntu-latest
16-
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
16+
# dependeabot has on push events only read-only access, but codeql requires write access
17+
if: ${{ !(github.actor == 'dependabot[bot]' && contains(fromJSON('["push"]'), github.event_name)) }}
1718
steps:
1819
- uses: actions/checkout@v4
1920
with:
2021
fetch-depth: 2
21-
- uses: actions/setup-java@v3
22+
- uses: actions/setup-java@v4
2223
with:
2324
distribution: 'zulu'
2425
java-version: 21

.github/workflows/publish-central.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v4
1414
with:
1515
ref: "refs/tags/${{ github.event.inputs.tag }}"
16-
- uses: actions/setup-java@v3
16+
- uses: actions/setup-java@v4
1717
with:
1818
distribution: 'zulu'
1919
java-version: 21

.github/workflows/publish-github.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
if: startsWith(github.ref, 'refs/tags/') # only allow publishing tagged versions
99
steps:
1010
- uses: actions/checkout@v4
11-
- uses: actions/setup-java@v3
11+
- uses: actions/setup-java@v4
1212
with:
1313
distribution: 'zulu'
1414
java-version: 21

pom.xml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,15 @@
4242

4343
<api.version>1.3.0</api.version>
4444
<secret-service.version>2.0.0-alpha</secret-service.version>
45-
<kdewallet.version>1.3.2</kdewallet.version>
45+
<kdewallet.version>1.3.3</kdewallet.version>
4646
<appindicator.version>1.3.6</appindicator.version>
47-
<guava.version>32.1.3-jre</guava.version>
4847
<slf4j.version>2.0.9</slf4j.version>
49-
<commons-lang3.version>3.13.0</commons-lang3.version>
5048

5149
<!-- test dependencies -->
52-
<junit.version>5.10.0</junit.version>
50+
<junit.version>5.10.1</junit.version>
5351

5452
<!-- build plugin dependencies -->
55-
<dependency-check.version>8.4.0</dependency-check.version>
53+
<dependency-check.version>8.4.2</dependency-check.version>
5654
<nexus-staging.version>1.6.8</nexus-staging.version>
5755
</properties>
5856

@@ -67,11 +65,6 @@
6765
<artifactId>slf4j-api</artifactId>
6866
<version>${slf4j.version}</version>
6967
</dependency>
70-
<dependency>
71-
<groupId>com.google.guava</groupId>
72-
<artifactId>guava</artifactId>
73-
<version>${guava.version}</version>
74-
</dependency>
7568
<dependency>
7669
<groupId>de.swiesend</groupId>
7770
<artifactId>secret-service</artifactId>
@@ -82,12 +75,6 @@
8275
<artifactId>kdewallet</artifactId>
8376
<version>${kdewallet.version}</version>
8477
</dependency>
85-
<!-- Apache Commons -->
86-
<dependency>
87-
<groupId>org.apache.commons</groupId>
88-
<artifactId>commons-lang3</artifactId>
89-
<version>${commons-lang3.version}</version>
90-
</dependency>
9178
<!-- Java bindings for appindicator -->
9279
<dependency>
9380
<groupId>org.purejava</groupId>
@@ -118,7 +105,7 @@
118105
<plugin>
119106
<groupId>org.apache.maven.plugins</groupId>
120107
<artifactId>maven-surefire-plugin</artifactId>
121-
<version>3.1.2</version>
108+
<version>3.2.1</version>
122109
</plugin>
123110
<plugin>
124111
<groupId>org.apache.maven.plugins</groupId>

src/main/java/module-info.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
module org.cryptomator.integrations.linux {
1010
requires org.cryptomator.integrations.api;
1111
requires org.slf4j;
12-
requires com.google.common;
13-
requires org.apache.commons.lang3;
1412
requires org.freedesktop.dbus;
1513
requires org.purejava.appindicator;
1614
requires org.purejava.kwallet;

src/main/java/org/cryptomator/linux/keychain/KDEWalletKeychainAccess.java

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package org.cryptomator.linux.keychain;
22

3-
import com.google.common.base.Preconditions;
43
import org.cryptomator.integrations.common.OperatingSystem;
54
import org.cryptomator.integrations.common.Priority;
65
import org.cryptomator.integrations.keychain.KeychainAccessException;
76
import org.cryptomator.integrations.keychain.KeychainAccessProvider;
7+
import org.cryptomator.linux.util.CheckUtil;
88
import org.freedesktop.dbus.connections.impl.DBusConnection;
99
import org.freedesktop.dbus.connections.impl.DBusConnectionBuilder;
1010
import org.freedesktop.dbus.exceptions.DBusConnectionException;
@@ -49,25 +49,25 @@ public boolean isLocked() {
4949

5050
@Override
5151
public void storePassphrase(String key, String displayName, CharSequence passphrase) throws KeychainAccessException {
52-
Preconditions.checkState(wallet.isPresent(), "Keychain not supported.");
52+
CheckUtil.checkState(wallet.isPresent(), "Keychain not supported.");
5353
wallet.get().storePassphrase(key, passphrase);
5454
}
5555

5656
@Override
5757
public char[] loadPassphrase(String key) throws KeychainAccessException {
58-
Preconditions.checkState(wallet.isPresent(), "Keychain not supported.");
58+
CheckUtil.checkState(wallet.isPresent(), "Keychain not supported.");
5959
return wallet.get().loadPassphrase(key);
6060
}
6161

6262
@Override
6363
public void deletePassphrase(String key) throws KeychainAccessException {
64-
Preconditions.checkState(wallet.isPresent(), "Keychain not supported.");
64+
CheckUtil.checkState(wallet.isPresent(), "Keychain not supported.");
6565
wallet.get().deletePassphrase(key);
6666
}
6767

6868
@Override
6969
public void changePassphrase(String key, String displayName, CharSequence passphrase) throws KeychainAccessException {
70-
Preconditions.checkState(wallet.isPresent(), "Keychain not supported.");
70+
CheckUtil.checkState(wallet.isPresent(), "Keychain not supported.");
7171
wallet.get().changePassphrase(key, passphrase);
7272
}
7373

@@ -95,11 +95,7 @@ private static DBusConnection getNewConnection() throws DBusException {
9595
} catch (DBusConnectionException | DBusExecutionException de) {
9696
LOG.warn("Connecting to SESSION bus failed.", de);
9797
LOG.warn("Falling back to SYSTEM DBus");
98-
try {
99-
return DBusConnectionBuilder.forSystemBus().build();
100-
} catch (DBusException e) {
101-
throw e;
102-
}
98+
return DBusConnectionBuilder.forSystemBus().build();
10399
}
104100
}
105101

@@ -144,7 +140,7 @@ public char[] loadPassphrase(String key) throws KeychainAccessException {
144140
} else {
145141
LOG.debug("loadPassphrase: wallet is closed.");
146142
}
147-
return (password.equals("")) ? null : password.toCharArray();
143+
return (password.isEmpty()) ? null : password.toCharArray();
148144
} catch (RuntimeException e) {
149145
throw new KeychainAccessException("Loading the passphrase failed.", e);
150146
}

src/main/java/org/cryptomator/linux/revealpath/DBusSendRevealPathService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.cryptomator.linux.revealpath;
22

3-
import com.google.common.base.Preconditions;
43
import org.cryptomator.integrations.revealpath.RevealFailedException;
54
import org.cryptomator.integrations.revealpath.RevealPathService;
65

@@ -91,7 +90,9 @@ public boolean isSupported() {
9190
* @throws IOException if the Inputer reader on the process output cannot be created
9291
*/
9392
private boolean parseOutputForFileManagerInterface(Process fileManager1Process) throws IOException {
94-
Preconditions.checkState(!fileManager1Process.isAlive());
93+
if( fileManager1Process.isAlive()) {
94+
throw new IllegalArgumentException("Process " + fileManager1Process + " must be terminated to read output.");
95+
}
9596
try (var reader = fileManager1Process.inputReader(StandardCharsets.UTF_8)) {
9697
return reader.lines().map(String::trim).anyMatch(FILEMANAGER1_XML_ELEMENT::equals);
9798
}

src/main/java/org/cryptomator/linux/tray/AppindicatorTrayMenuController.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public class AppindicatorTrayMenuController implements TrayMenuController {
3131
private static final Arena ARENA = Arena.global();
3232
private MemorySegment indicator;
3333
private MemorySegment menu = gtk_menu_new();
34-
private Optional<String> svgSourcePath;
3534

3635
@CheckAvailability
3736
public static boolean isAvailable() {
@@ -48,9 +47,9 @@ public void showTrayIcon(Consumer<TrayIconLoader> iconLoader, Runnable runnable,
4847

4948
private void showTrayIconWithSVG(String s) {
5049
try (var arena = Arena.ofConfined()) {
51-
svgSourcePath = Optional.ofNullable(System.getProperty(SVG_SOURCE_PROPERTY));
50+
var svgSourcePath = System.getProperty(SVG_SOURCE_PROPERTY);
5251
// flatpak
53-
if (svgSourcePath.isEmpty()) {
52+
if (svgSourcePath != null) {
5453
indicator = app_indicator_new(arena.allocateUtf8String(APP_INDICATOR_ID),
5554
arena.allocateUtf8String(s),
5655
APP_INDICATOR_CATEGORY_APPLICATION_STATUS());
@@ -60,7 +59,7 @@ private void showTrayIconWithSVG(String s) {
6059
arena.allocateUtf8String(s),
6160
APP_INDICATOR_CATEGORY_APPLICATION_STATUS(),
6261
// find tray icons theme in mounted AppImage / installed on system by ppa
63-
arena.allocateUtf8String(svgSourcePath.get()));
62+
arena.allocateUtf8String(svgSourcePath));
6463
}
6564
}
6665
}
@@ -105,7 +104,7 @@ private void addChildren(MemorySegment menu, List<TrayMenuItem> items) {
105104
}
106105
gtk_menu_shell_append(menu, gtkMenuItem);
107106
}
108-
case SeparatorItem separatorItem -> {
107+
case SeparatorItem _ -> {
109108
var gtkSeparator = gtk_menu_item_new();
110109
gtk_menu_shell_append(menu, gtkSeparator);
111110
}

0 commit comments

Comments
 (0)