浏览代码

revert 8e9d54b & 6c5ee14 due to bug in JDK 21

see https://bugs.openjdk.org/browse/JDK-8313323
Sebastian Stenzel 1 年之前
父节点
当前提交
83879f5cfe

+ 1 - 1
src/main/java/org/cryptomator/ipc/IpcMessageListener.java

@@ -6,7 +6,7 @@ public interface IpcMessageListener {
 
 	default void handleMessage(IpcMessage message) {
 		switch (message) {
-			case RevealRunningAppMessage _ -> revealRunningApp();
+			case RevealRunningAppMessage m -> revealRunningApp(); // TODO: rename to _ with JEP 443
 			case HandleLaunchArgsMessage m -> handleLaunchArgs(m.args());
 		}
 	}

+ 7 - 7
src/main/java/org/cryptomator/ui/health/StartController.java

@@ -101,16 +101,16 @@ public class StartController implements FxController {
 		}
 	}
 
-	private void loadingKeyFailed(Throwable e) {
-		switch (e) {
-			case UnlockCancelledException _ -> {} //ok
-			case VaultKeyInvalidException _ -> {
-				LOG.error("Invalid key"); //TODO: specific error screen
+	private void loadingKeyFailed(Throwable t) {
+		switch (t) {
+			case UnlockCancelledException e -> {} // ok // TODO: rename to _ with JEP 443
+			case VaultKeyInvalidException e -> { // TODO: rename to _ with JEP 443
+				LOG.error("Invalid key"); // TODO: specific error screen
 				appWindows.showErrorWindow(e, window, null);
 			}
 			default -> {
-				LOG.error("Failed to load key.", e);
-				appWindows.showErrorWindow(e, window, null);
+				LOG.error("Failed to load key.", t);
+				appWindows.showErrorWindow(t, window, null);
 			}
 		}
 	}

+ 1 - 1
src/main/java/org/cryptomator/ui/traymenu/AwtTrayMenuController.java

@@ -109,7 +109,7 @@ public class AwtTrayMenuController implements TrayMenuController {
 					menuItem.setEnabled(a.enabled());
 					menu.add(menuItem);
 				}
-				case SeparatorItem _ -> menu.addSeparator();
+				case SeparatorItem s -> menu.addSeparator(); // TODO: rename to _ with JEP 443
 				case SubMenuItem s -> {
 					var submenu = new Menu(s.title());
 					addChildren(submenu, s.items());