mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-22 04:31:27 +00:00
clean up code
This commit is contained in:
@@ -6,6 +6,8 @@ import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class JavaFXUtil {
|
||||
|
||||
private JavaFXUtil() {}
|
||||
|
||||
public static boolean startPlatform() throws InterruptedException {
|
||||
CountDownLatch latch = new CountDownLatch(1);
|
||||
try {
|
||||
|
||||
@@ -113,7 +113,7 @@ public class MasterkeyFileLoadingStrategy implements KeyLoadingStrategy {
|
||||
|
||||
private void savePasswordToSystemkeychain(Passphrase passphrase) {
|
||||
try {
|
||||
if (keychain.isSupported() && !keychain.getPassphraseStoredProperty(vault.getId()).getValue()) {
|
||||
if (keychain.isSupported() && !keychain.getPassphraseStoredProperty(vault.getId()).get()) {
|
||||
keychain.storePassphrase(vault.getId(), vault.getDisplayName(), passphrase);
|
||||
}
|
||||
} catch (KeychainAccessException e) {
|
||||
|
||||
@@ -176,7 +176,7 @@ public class MainWindowController implements FxController {
|
||||
return updateAvailable.get();
|
||||
}
|
||||
|
||||
public BooleanBinding licenseValidProperty(){
|
||||
public BooleanBinding licenseValidProperty() {
|
||||
return licenseHolder.validLicenseProperty();
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,9 @@ public class GeneralPreferencesController implements FxController {
|
||||
if (SystemUtils.IS_OS_MAC) {
|
||||
var idsAndNames = settings.directories.stream().collect(Collectors.toMap(vs -> vs.id, vs -> vs.displayName.getValue()));
|
||||
if (!idsAndNames.isEmpty()) {
|
||||
LOG.debug("Migrating keychain entries {} from {} to {}", idsAndNames.keySet(), oldProvider.displayName(), newProvider.displayName());
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Migrating keychain entries {} from {} to {}", idsAndNames.keySet(), oldProvider.displayName(), newProvider.displayName());
|
||||
}
|
||||
keychainMigrations = keychainMigrations.thenRunAsync(() -> {
|
||||
try {
|
||||
KeychainManager.migrate(oldProvider, newProvider, idsAndNames);
|
||||
|
||||
Reference in New Issue
Block a user