mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-21 12:11:28 +00:00
Merge branch 'develop' into feature/vault-format-8
This commit is contained in:
@@ -42,8 +42,8 @@ public class DefaultSceneFactory implements Function<Parent, Scene> {
|
||||
protected void configureScene(Scene scene) {
|
||||
scene.windowProperty().addListener(observable -> {
|
||||
Window window = scene.getWindow();
|
||||
if (window instanceof Stage) {
|
||||
setupDefaultAccelerators(scene, (Stage) window);
|
||||
if (window instanceof Stage s) {
|
||||
setupDefaultAccelerators(scene, s);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -55,8 +55,8 @@ public class UnlockWorkflow extends Task<Boolean> {
|
||||
|
||||
setOnFailed(event -> {
|
||||
Throwable throwable = event.getSource().getException();
|
||||
if (throwable instanceof InvalidMountPointException) {
|
||||
handleInvalidMountPoint((InvalidMountPointException) throwable);
|
||||
if (throwable instanceof InvalidMountPointException e) {
|
||||
handleInvalidMountPoint(e);
|
||||
} else {
|
||||
handleGenericError(throwable);
|
||||
}
|
||||
|
||||
@@ -58,18 +58,22 @@ class RecoveryKeyFactoryTest {
|
||||
@Test
|
||||
@DisplayName("validateRecoveryKey() with invalid checksum")
|
||||
public void testValidateValidateRecoveryKeyWithInvalidCrc() {
|
||||
boolean result = inTest.validateRecoveryKey("pathway lift abuse plenty export texture gentleman landscape beyond ceiling around leaf cafe" //
|
||||
+ " charity border breakdown victory surely computer cat linger restrict infer crowd live computer true written amazed investor boot" //
|
||||
+ " depth left theory snow whereby terminal weekly reject happiness circuit partial cup wrong");
|
||||
boolean result = inTest.validateRecoveryKey("""
|
||||
pathway lift abuse plenty export texture gentleman landscape beyond ceiling around leaf cafe charity \
|
||||
border breakdown victory surely computer cat linger restrict infer crowd live computer true written amazed \
|
||||
investor boot depth left theory snow whereby terminal weekly reject happiness circuit partial cup wrong \
|
||||
""");
|
||||
Assertions.assertFalse(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("validateRecoveryKey() with valid input")
|
||||
public void testValidateValidateRecoveryKeyWithValidKey() {
|
||||
boolean result = inTest.validateRecoveryKey("pathway lift abuse plenty export texture gentleman landscape beyond ceiling around leaf cafe" //
|
||||
+ " charity border breakdown victory surely computer cat linger restrict infer crowd live computer true written amazed investor boot" //
|
||||
+ " depth left theory snow whereby terminal weekly reject happiness circuit partial cup ad");
|
||||
boolean result = inTest.validateRecoveryKey("""
|
||||
pathway lift abuse plenty export texture gentleman landscape beyond ceiling around leaf cafe charity \
|
||||
border breakdown victory surely computer cat linger restrict infer crowd live computer true written amazed \
|
||||
investor boot depth left theory snow whereby terminal weekly reject happiness circuit partial cup ad \
|
||||
""");
|
||||
Assertions.assertTrue(result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user