Skip to content

Commit 759432d

Browse files
committed
do not handle the error and runtime exception in same catch block
1 parent df8bf11 commit 759432d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@ public String displayName() {
2929
public boolean isSupported() {
3030
try {
3131
return SimpleCollection.isAvailable();
32-
} catch (RuntimeException | ExceptionInInitializerError e) {
33-
LOG.warn("Initializing secret service keychain access failed", e instanceof ExceptionInInitializerError errInit ? errInit.getException() : e);
32+
} catch (RuntimeException e) {
33+
LOG.warn("Initializing secret service keychain access failed", e);
34+
return false;
35+
} catch (ExceptionInInitializerError err) {
36+
LOG.warn("Initializing secret service keychain access failed", err.getException());
3437
return false;
3538
}
3639
}

0 commit comments

Comments
 (0)