diff --git a/main/commons/src/main/java/org/cryptomator/common/vaults/Vault.java b/main/commons/src/main/java/org/cryptomator/common/vaults/Vault.java index 0dff26096..30ebea9ec 100644 --- a/main/commons/src/main/java/org/cryptomator/common/vaults/Vault.java +++ b/main/commons/src/main/java/org/cryptomator/common/vaults/Vault.java @@ -120,6 +120,7 @@ public class Vault { } private void destroyCryptoFileSystem(CryptoFileSystem fs) { + LOG.trace("Trying to close associated CryptoFS..."); if (fs != null) { try { fs.close(); diff --git a/main/pom.xml b/main/pom.xml index b23747cd8..0ba69d20f 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -36,7 +36,7 @@ 15 3.11 - 3.11.0 + 3.12.0 2.1.0 30.1-jre 2.31 @@ -175,13 +175,6 @@ java-jwt ${jwt.version} - - - com.fasterxml.jackson.core - jackson-databind - 2.10.5.1 - - diff --git a/main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockWorkflow.java b/main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockWorkflow.java index 1624ba45f..0e6baf032 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockWorkflow.java +++ b/main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockWorkflow.java @@ -183,15 +183,7 @@ public class UnlockWorkflow extends Task implements MasterkeyFileLoader assert requirement != MountPointRequirement.PARENT_OPT_MOUNT_POINT; //Not implemented anywhere (yet) Throwable cause = impExc.getCause(); - //Cause is either null (cause the IMPE was thrown directly, e.g. because no MPC succeeded) - //or the cause was not an Exception (but some other kind of Throwable) - //Either way: Handle as generic error - if (!(cause instanceof Exception)) { - handleGenericError(impExc); - return; - } - - //From here on handle the cause, not the caught exception + // TODO: apply https://openjdk.java.net/jeps/8213076 in future JDK versions if (cause instanceof NotDirectoryException) { if (requirement == MountPointRequirement.PARENT_NO_MOUNT_POINT) { LOG.error("Unlock failed. Parent folder is missing: {}", cause.getMessage()); @@ -200,23 +192,17 @@ public class UnlockWorkflow extends Task implements MasterkeyFileLoader } showInvalidMountPointScene(); return; - } - - if (cause instanceof FileAlreadyExistsException) { + } else if (cause instanceof FileAlreadyExistsException) { LOG.error("Unlock failed. Mountpoint already exists: {}", cause.getMessage()); showInvalidMountPointScene(); return; - } - - if (cause instanceof DirectoryNotEmptyException) { + } else if (cause instanceof DirectoryNotEmptyException) { LOG.error("Unlock failed. Mountpoint not an empty directory: {}", cause.getMessage()); showInvalidMountPointScene(); return; + } else { + handleGenericError(impExc); } - - //Everything else (especially IOException) results in a generic error - //This must be done after the other exceptions because they extend IOException... - handleGenericError(cause); } private void showInvalidMountPointScene() {