From 87f14a39e82503e3f0a1ae3b4fd315a7923a338d Mon Sep 17 00:00:00 2001 From: Sheikah45 Date: Mon, 18 Sep 2023 18:11:37 -0400 Subject: [PATCH] Remove synchronized in favor of lock --- src/main/java/com/faforever/client/theme/UiService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/faforever/client/theme/UiService.java b/src/main/java/com/faforever/client/theme/UiService.java index 23d3bdee90..0c2761e26d 100644 --- a/src/main/java/com/faforever/client/theme/UiService.java +++ b/src/main/java/com/faforever/client/theme/UiService.java @@ -433,7 +433,7 @@ public ReadOnlyObjectProperty currentThemeProperty() { * Loads an FXML file and returns its controller instance. The controller instance is retrieved from the application * context, so its scope (which should always be "prototype") depends on the bean definition. */ - public synchronized > T loadFxml(String relativePath) { + public > T loadFxml(String relativePath) { fxmlLoadLock.lock(); try { FXMLLoader loader = new FXMLLoader(getThemeFileUrl(relativePath), resources, null, applicationContext::getBean); @@ -446,7 +446,7 @@ public synchronized > T loadFxml(String relativePath) { } } - public synchronized > T loadFxml(String relativePath, Class controllerClass) { + public > T loadFxml(String relativePath, Class controllerClass) { fxmlLoadLock.lock(); try { FXMLLoader loader = new FXMLLoader(getThemeFileUrl(relativePath), resources, null, applicationContext::getBean);