Forráskód Böngészése

tmp fix from https://github.com/cryptomator/cryptomator/pull/29 apparently no longer needed with latest JDK.

Sebastian Stenzel 6 éve
szülő
commit
0ac1b406b7

+ 0 - 16
main/launcher/src/main/java/org/cryptomator/launcher/MainApplication.java

@@ -23,7 +23,6 @@ public class MainApplication extends Application {
 	public void start(Stage primaryStage) throws Exception {
 		LOG.info("JavaFX application started.");
 		this.primaryStage = primaryStage;
-		setupFXMLClassLoader();
 
 		LauncherModule launcherModule = new LauncherModule(this, primaryStage);
 		LauncherComponent launcherComponent = DaggerLauncherComponent.builder() //
@@ -46,19 +45,4 @@ public class MainApplication extends Application {
 		LOG.info("JavaFX application stopped.");
 	}
 
-	// fix discussed in https://github.com/cryptomator/cryptomator/pull/29
-	private void setupFXMLClassLoader() {
-		ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
-		FXMLLoader.setDefaultClassLoader(contextClassLoader);
-		Platform.runLater(() -> {
-			/*
-			 * This fixes a bug on OSX where the magic file open handler leads to no context class loader being set in the AppKit (event)
-			 * thread if the application is not started opening a file.
-			 */
-			if (Thread.currentThread().getContextClassLoader() == null) {
-				Thread.currentThread().setContextClassLoader(contextClassLoader);
-			}
-		});
-	}
-
 }