diff --git a/src/main/java/org/cryptomator/ui/fxapp/JfxUiAppearanceProvider.java b/src/main/java/org/cryptomator/ui/fxapp/JfxUiAppearanceProvider.java index ca5bec7d4..c121c38d5 100644 --- a/src/main/java/org/cryptomator/ui/fxapp/JfxUiAppearanceProvider.java +++ b/src/main/java/org/cryptomator/ui/fxapp/JfxUiAppearanceProvider.java @@ -27,8 +27,10 @@ public class JfxUiAppearanceProvider implements UiAppearanceProvider { private final AtomicReference realImpl = new AtomicReference<>(null); public void initialize(Platform.Preferences preferences) { - realImpl.compareAndSet(null, new JfxUiAppearanceImpl(preferences)); - LOG.debug("Initialized {} with JavaFX preferences", JfxUiAppearanceImpl.class); + var isSet = realImpl.compareAndSet(null, new JfxUiAppearanceImpl(preferences)); + if (isSet) { + LOG.debug("Initialized {} with JavaFX preferences", JfxUiAppearanceImpl.class); + } } private static class JfxUiAppearanceImpl implements UiAppearanceProvider {