mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-04-19 09:06:54 -04:00
Remove code smells
This commit is contained in:
@@ -103,7 +103,7 @@ public class SettingsJsonAdapter extends TypeAdapter<Settings> {
|
||||
case "language" -> settings.languageProperty().set(in.nextString());
|
||||
|
||||
default -> {
|
||||
LOG.warn("Unsupported vault setting found in JSON: " + name);
|
||||
LOG.warn("Unsupported vault setting found in JSON: {}", name);
|
||||
in.skipValue();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ class VaultSettingsJsonAdapter {
|
||||
case "autoLockWhenIdle" -> autoLockWhenIdle = in.nextBoolean();
|
||||
case "autoLockIdleSeconds" -> autoLockIdleSeconds = in.nextInt();
|
||||
default -> {
|
||||
LOG.warn("Unsupported vault setting found in JSON: " + name);
|
||||
LOG.warn("Unsupported vault setting found in JSON: {}", name);
|
||||
in.skipValue();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,6 @@ import org.cryptomator.frontend.fuse.mount.FuseMountFactory;
|
||||
import org.cryptomator.frontend.fuse.mount.FuseNotSupportedException;
|
||||
import org.cryptomator.frontend.fuse.mount.Mount;
|
||||
import org.cryptomator.frontend.fuse.mount.Mounter;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
@@ -26,7 +24,6 @@ import java.util.regex.Pattern;
|
||||
|
||||
public class FuseVolume extends AbstractVolume {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(FuseVolume.class);
|
||||
private static final Pattern NON_WHITESPACE_OR_QUOTED = Pattern.compile("[^\\s\"']+|\"([^\"]*)\"|'([^']*)'"); // Thanks to https://stackoverflow.com/a/366532
|
||||
|
||||
private final VaultSettings vaultSettings;
|
||||
|
||||
@@ -71,9 +71,11 @@ public class SecurePasswordField extends TextField {
|
||||
}
|
||||
|
||||
public void cut() {
|
||||
//not implemented by design
|
||||
}
|
||||
|
||||
public void copy() {
|
||||
//not implemented by design
|
||||
}
|
||||
|
||||
public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters) {
|
||||
|
||||
@@ -69,11 +69,15 @@ public class VaultListController implements FxController {
|
||||
}
|
||||
});
|
||||
vaultList.addEventFilter(MouseEvent.MOUSE_RELEASED, this::deselect);
|
||||
|
||||
//don't show context menu when no vault selected
|
||||
vaultList.addEventFilter(ContextMenuEvent.CONTEXT_MENU_REQUESTED, request -> {
|
||||
if (selectedVault.get() == null) {
|
||||
request.consume();
|
||||
}
|
||||
});
|
||||
|
||||
//show removeVaultDialog on certain key press
|
||||
vaultList.addEventFilter(KeyEvent.KEY_PRESSED, keyEvent -> {
|
||||
if (keyEvent.getCode() == KeyCode.DELETE) {
|
||||
pressedShortcutToRemoveVault();
|
||||
|
||||
@@ -25,9 +25,6 @@ public class MigrationStartController implements FxController {
|
||||
this.runMigrationScene = runMigrationScene;
|
||||
}
|
||||
|
||||
public void initialize() {
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void cancel() {
|
||||
window.close();
|
||||
|
||||
Reference in New Issue
Block a user