From 5c1dc6bf1e6b44f4473d91f3cf00ed7a45dfcc63 Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Sun, 10 Dec 2023 09:25:29 +0100 Subject: [PATCH] Remove obsolete PreferencesService.get/setDefaultDefaultLookupOrder() These methods grant to much access to the default lookup order and the internal usage in the org.eclipse.core.internal.resources.Workspace has been migrated to the more specific prependScopeToDefaultDefaultLookupOrder() method introduced before. --- .../preferences/PreferencesService.java | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesService.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesService.java index a131aacc632..67983a63d70 100644 --- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesService.java +++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesService.java @@ -47,7 +47,7 @@ public class PreferencesService implements IPreferencesService { private static final String EMPTY_STRING = ""; //$NON-NLS-1$ private static PreferencesService instance; - static final RootPreferences root = new RootPreferences(); + private static final RootPreferences root = new RootPreferences(); private static final Map DEFAULTS_REGISTRY = new ConcurrentHashMap<>(); private Object registryHelper = null; private final Map defaultScopes = new HashMap<>(); @@ -1050,23 +1050,4 @@ public void prependScopeToDefaultDefaultLookupOrder(String firstScope) { DEFAULT_DEFAULT_LOOKUP_ORDER = List.copyOf(scopes); } - /* - * Return the default search lookup order for when nothing is set. - */ - @Deprecated(forRemoval = true) - public String[] getDefaultDefaultLookupOrder() { - return DEFAULT_DEFAULT_LOOKUP_ORDER.toArray(String[]::new); - } - - /* - * Set the default search order to use when there is nothing else set. Clients - * should not call this method because it is in an internal class and has been - * created solely for use by the org.eclipse.core.resources bundle in response - * to this bug: https://bugs.eclipse.org/330320 - */ - @Deprecated(forRemoval = true) - public void setDefaultDefaultLookupOrder(String[] order) { - // shouldn't happen but let's protect against an NPE. - DEFAULT_DEFAULT_LOOKUP_ORDER = List.of(order); - } }