This is an automated email from the ASF dual-hosted git repository. joerghoh pushed a commit to branch SLING-12988 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-settings.git
commit 393ee7720e0a3bb9304cfd226acd566280a18f45 Author: Joerg Hoh <[email protected]> AuthorDate: Fri Oct 31 20:12:47 2025 +0100 SLING-12988 remove synchronization when reading runmodes --- .../org/apache/sling/settings/impl/SlingSettingsServiceImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/sling/settings/impl/SlingSettingsServiceImpl.java b/src/main/java/org/apache/sling/settings/impl/SlingSettingsServiceImpl.java index 8b5cc89..868f8e9 100644 --- a/src/main/java/org/apache/sling/settings/impl/SlingSettingsServiceImpl.java +++ b/src/main/java/org/apache/sling/settings/impl/SlingSettingsServiceImpl.java @@ -225,9 +225,8 @@ public class SlingSettingsServiceImpl // and always save new install options writeOptions(context, optionsList); - // make the set unmodifiable and synced - // we probably don't need a synced set as it is read only - this.runModes = Collections.synchronizedSet(Collections.unmodifiableSet(modesSet)); + // make the set unmodifiable, as always the same set will be returned + this.runModes = Collections.unmodifiableSet(modesSet); if (this.runModes.size() > 0) { logger.info("Active run modes: {}", this.runModes); } else {
