From 1277fc1ff739cf2158a42e1886bb614019cd2526 Mon Sep 17 00:00:00 2001 From: Karl von Randow Date: Wed, 18 Mar 2026 05:02:03 +1300 Subject: [PATCH] Remove redundant Collections.synchronizedSet wrapper All access to the listener set is already through synchronized methods, making the synchronizedSet wrapper unnecessary overhead. --- src/org/violetlib/vappearances/VAppearances.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/violetlib/vappearances/VAppearances.java b/src/org/violetlib/vappearances/VAppearances.java index 4780c6e..139fe9f 100644 --- a/src/org/violetlib/vappearances/VAppearances.java +++ b/src/org/violetlib/vappearances/VAppearances.java @@ -76,7 +76,7 @@ public AppearanceChangeEvent(@NotNull VAppearance appearance) private static final @NotNull ApplicationAppearanceCache applicationAppearance = new ApplicationAppearanceCache(); private static final @NotNull AppearancesCache appearancesByName = new AppearancesCache(); - private static final @NotNull Set changeListeners = Collections.synchronizedSet(new HashSet<>()); + private static final @NotNull Set changeListeners = new HashSet<>(); private static final @NotNull HandlerStore effectiveAppearanceHandlerStore = new HandlerStore(); private VAppearances()