From b6a1c60ac1e230110c0b2b3b4c73ea432c36924b Mon Sep 17 00:00:00 2001 From: Calixte Bonsart Date: Tue, 25 Aug 2026 10:59:05 -0400 Subject: [PATCH] Issue #451: add StaticVariableName to checkstyle config --- config/checkstyle-checks.xml | 3 + config/suppressions.xml | 1 + .../sf/eclipsecs/core/CheckstylePlugin.java | 6 +- .../core/builder/CheckerFactory.java | 26 ++++---- .../config/CheckConfigurationFactory.java | 44 ++++++------- .../configtypes/RemoteConfigurationType.java | 10 +-- .../core/config/meta/AllTokensProvider.java | 61 ------------------- .../core/config/meta/MetadataFactory.java | 54 ++++++++-------- .../filters/UnOpenedFilesFilter.java | 8 +-- .../sf/eclipsecs/ui/CheckstyleUIPlugin.java | 6 +- .../filter/PluginFilterEditors.java | 10 +-- 11 files changed, 85 insertions(+), 144 deletions(-) delete mode 100644 net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/meta/AllTokensProvider.java diff --git a/config/checkstyle-checks.xml b/config/checkstyle-checks.xml index 238cdabc7..9aa0aa1c5 100644 --- a/config/checkstyle-checks.xml +++ b/config/checkstyle-checks.xml @@ -880,6 +880,9 @@ + + + diff --git a/config/suppressions.xml b/config/suppressions.xml index 06be51492..19ff5bde2 100644 --- a/config/suppressions.xml +++ b/config/suppressions.xml @@ -224,6 +224,7 @@ + sCheckerMap; + private static final Cache CHECKERS; /** Map containing the modification times of configs. */ - private static Map sModifiedMap; + private static final Map MODIFIED_TIME; /* * Initialize the cache. */ static { - - sCheckerMap = CacheBuilder.newBuilder().softValues().build(); - - sModifiedMap = new ConcurrentHashMap<>(); + CHECKERS = CacheBuilder.newBuilder().softValues().build(); + MODIFIED_TIME = new ConcurrentHashMap<>(); } /** @@ -127,8 +125,8 @@ public static Checker createChecker(ICheckConfiguration config, IProject project // store checker in cache final Long modified = Long.valueOf(configFileData.getModificationStamp()); - sCheckerMap.put(cacheKey, checker); - sModifiedMap.put(cacheKey, modified); + CHECKERS.put(cacheKey, checker); + MODIFIED_TIME.put(cacheKey, modified); } else { setLocaleIfChanged(checker); @@ -141,8 +139,8 @@ public static Checker createChecker(ICheckConfiguration config, IProject project * Cleans up the checker cache. */ public static void cleanup() { - sCheckerMap.invalidateAll(); - sModifiedMap.clear(); + CHECKERS.invalidateAll(); + MODIFIED_TIME.clear(); } /** @@ -184,20 +182,20 @@ private static String getCacheKey(ICheckConfiguration config, IProject project) private static Checker tryCheckerCache(String cacheKey, long modificationStamp) { // try the cache - Checker checker = sCheckerMap.getIfPresent(cacheKey); + Checker checker = CHECKERS.getIfPresent(cacheKey); // if cache hit if (checker != null) { // compare modification times of the configs - final Long oldTime = sModifiedMap.get(cacheKey); + final Long oldTime = MODIFIED_TIME.get(cacheKey); final Long newTime = Long.valueOf(modificationStamp); // no match - remove checker from cache if (oldTime == null || oldTime.compareTo(newTime) != 0) { checker = null; - sCheckerMap.invalidate(cacheKey); - sModifiedMap.remove(cacheKey); + CHECKERS.invalidate(cacheKey); + MODIFIED_TIME.remove(cacheKey); } } return checker; diff --git a/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/CheckConfigurationFactory.java b/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/CheckConfigurationFactory.java index 772c5281d..6ab8e0061 100644 --- a/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/CheckConfigurationFactory.java +++ b/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/CheckConfigurationFactory.java @@ -75,14 +75,14 @@ public final class CheckConfigurationFactory { /** * List of known check configurations. Synchronized because of possible concurrend access. */ - private static List sConfigurations = + private static final List CONFIGURATIONS = Collections.synchronizedList(new ArrayList()); /** The default check configuration. */ - private static ICheckConfiguration sDefaultCheckConfig; + private static ICheckConfiguration defaultCheckConfig; /** The default built-in check configuration. */ - private static ICheckConfiguration sDefaultBuiltInConfig; + private static ICheckConfiguration defaultBuiltInConfig; static { refresh(); @@ -97,8 +97,8 @@ private CheckConfigurationFactory() { * @return a new configuration working set */ public static ICheckConfigurationWorkingSet newWorkingSet() { - return new GlobalCheckConfigurationWorkingSet(sConfigurations, - getDefaultCheckConfiguration(), sDefaultBuiltInConfig); + return new GlobalCheckConfigurationWorkingSet(CONFIGURATIONS, + getDefaultCheckConfiguration(), defaultBuiltInConfig); } /** @@ -110,7 +110,7 @@ public static ICheckConfigurationWorkingSet newWorkingSet() { */ public static ICheckConfiguration getByName(String name) { ICheckConfiguration result = null; - for (ICheckConfiguration config : sConfigurations) { + for (ICheckConfiguration config : CONFIGURATIONS) { if (config.getName().equals(name)) { result = config; break; @@ -125,7 +125,7 @@ public static ICheckConfiguration getByName(String name) { * @return A list containing all instances. */ public static List getCheckConfigurations() { - return Collections.unmodifiableList(sConfigurations); + return Collections.unmodifiableList(CONFIGURATIONS); } /** @@ -136,17 +136,17 @@ public static List getCheckConfigurations() { */ public static ICheckConfiguration getDefaultCheckConfiguration() { final ICheckConfiguration defaultConfig; - if (sDefaultCheckConfig != null) { - defaultConfig = sDefaultCheckConfig; + if (defaultCheckConfig != null) { + defaultConfig = defaultCheckConfig; } - else if (sDefaultBuiltInConfig != null) { - defaultConfig = sDefaultBuiltInConfig; + else if (defaultBuiltInConfig != null) { + defaultConfig = defaultBuiltInConfig; } - else if (sConfigurations.isEmpty()) { + else if (CONFIGURATIONS.isEmpty()) { defaultConfig = null; } else { - defaultConfig = sConfigurations.get(0); + defaultConfig = CONFIGURATIONS.get(0); } return defaultConfig; } @@ -156,9 +156,9 @@ else if (sConfigurations.isEmpty()) { */ public static void refresh() { try { - sDefaultCheckConfig = null; - sDefaultBuiltInConfig = null; - sConfigurations.clear(); + defaultCheckConfig = null; + defaultBuiltInConfig = null; + CONFIGURATIONS.clear(); loadBuiltinConfigurations(); loadFromPersistence(); @@ -255,12 +255,12 @@ private static void loadFromPersistence() throws CheckstylePluginException { final String defaultConfigName = root.attributeValue(XMLTags.DEFAULT_CHECK_CONFIG_TAG); - sConfigurations.addAll(getGlobalCheckConfigurations(root)); + CONFIGURATIONS.addAll(getGlobalCheckConfigurations(root)); - for (ICheckConfiguration config : sConfigurations) { - if (config != sDefaultBuiltInConfig + for (ICheckConfiguration config : CONFIGURATIONS) { + if (config != defaultBuiltInConfig && config.getName().equals(defaultConfigName)) { - sDefaultCheckConfig = config; + defaultCheckConfig = config; } } } @@ -327,7 +327,7 @@ private static void loadBuiltinConfigurations() { final ICheckConfiguration checkConfig = new CheckConfiguration(name, location, description, configType, true, props, additionalData); - sConfigurations.add(checkConfig); + CONFIGURATIONS.add(checkConfig); if (defaultWeight > currentMaxDefaultWeight) { currentMaxDefaultWeight = defaultWeight; @@ -335,7 +335,7 @@ private static void loadBuiltinConfigurations() { } } - sDefaultBuiltInConfig = defaultBuiltInCheckConfig; + defaultBuiltInConfig = defaultBuiltInCheckConfig; } /** diff --git a/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/configtypes/RemoteConfigurationType.java b/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/configtypes/RemoteConfigurationType.java index e0c5a185b..4e31f8b9c 100644 --- a/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/configtypes/RemoteConfigurationType.java +++ b/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/configtypes/RemoteConfigurationType.java @@ -81,7 +81,7 @@ public class RemoteConfigurationType extends AbstractConfigurationType { private static final int TIMEOUT = 10000; /** URLs that have failed with HTTP 401. */ - private static Set sFailedWith401URLs = new HashSet<>(); + private static final Set FAILED_WITH_401_URLS = new HashSet<>(); @Override public CheckstyleConfigurationFile getCheckstyleConfiguration( @@ -312,7 +312,7 @@ protected byte[] getBytesFromURLConnection(URLConnection connection) throws IOEx if (connection instanceof HttpURLConnection) { - if (!sFailedWith401URLs.contains(connection.getURL().toString())) { + if (!FAILED_WITH_401_URLS.contains(connection.getURL().toString())) { final HttpURLConnection httpConn = (HttpURLConnection) connection; httpConn.setInstanceFollowRedirects(true); @@ -326,7 +326,7 @@ protected byte[] getBytesFromURLConnection(URLConnection connection) throws IOEx } // add to 401ed URLs - sFailedWith401URLs.add(connection.getURL().toString()); + FAILED_WITH_401_URLS.add(connection.getURL().toString()); throw new IOException(Messages.RemoteConfigurationType_msgUnAuthorized); } } @@ -429,7 +429,7 @@ public static void storeCredentials(URL resolvedCheckConfigurationURL, String us prefs.put(KEY_USERNAME, userName, false); prefs.put(KEY_PASSWORD, password, true); - sFailedWith401URLs.remove(resolvedCheckConfigurationURL.toString()); + FAILED_WITH_401_URLS.remove(resolvedCheckConfigurationURL.toString()); } catch (CheckstylePluginException | StorageException ex) { CheckstyleLog.log(ex); @@ -446,7 +446,7 @@ public static void storeCredentials(URL resolvedCheckConfigurationURL, String us */ public static void removeCachedAuthInfo(URL resolvedCheckConfigurationURL) throws CheckstylePluginException { - sFailedWith401URLs.remove(resolvedCheckConfigurationURL.toString()); + FAILED_WITH_401_URLS.remove(resolvedCheckConfigurationURL.toString()); final String storagePath = getSecureStoragePath(resolvedCheckConfigurationURL); diff --git a/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/meta/AllTokensProvider.java b/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/meta/AllTokensProvider.java deleted file mode 100644 index 44be1e862..000000000 --- a/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/meta/AllTokensProvider.java +++ /dev/null @@ -1,61 +0,0 @@ -//============================================================================ -// -// Copyright (C) 2003-2023 David Schneider, Lars Ködderitzsch -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// -//============================================================================ - -package net.sf.eclipsecs.core.config.meta; - -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.List; - -import com.puppycrawl.tools.checkstyle.api.TokenTypes; - -/** - * Class that provides all known tokens from the checkstyle java grammar. This is used for modules - * that allow all tokens as options - which is very tedious to maintain in the metadata. - * - */ -public class AllTokensProvider implements IOptionProvider { - - /** The list of options. */ - private static List sAllOptions = new ArrayList<>(); - - /* Static initializer. Builds the option list. */ - static { - - final Field[] fields = TokenTypes.class.getDeclaredFields(); - for (Field field : fields) { - // Only process the int declarations. - if (field.getType() != Integer.TYPE) { - continue; - } - sAllOptions.add(field.getName()); - } - } - - /** - * Returns all options. - * - * @return the options - */ - @Override - public List getOptions() { - return sAllOptions; - } -} diff --git a/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/meta/MetadataFactory.java b/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/meta/MetadataFactory.java index ed3285ca7..0c438df72 100644 --- a/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/meta/MetadataFactory.java +++ b/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/meta/MetadataFactory.java @@ -81,30 +81,30 @@ public final class MetadataFactory { private static final String FILE_NAME_SEPARATOR = "/"; /** Metadata for the rule groups. */ - private static Map sRuleGroupMetadata; + private static Map ruleGroupMetadata; /** Metadata for all rules, keyed by internal rule name. */ - private static Map sRuleMetadata; + private static Map ruleMetadataByName; /** * Mapping for all rules, keyed by alternative rule names (full qualified, old full qualified). */ - private static Map sAlternativeNamesMap; + private static Map alternativeNamesMap; /** * Repository of all the the checkstyle metadata, with their name as key. */ - private static Map sModuleDetailsRepo; + private static Map moduleDetailsRepo; /** * Set containing all the packages in the classloader. */ - private static Set sPackageNameSet; + private static Set packageNameSet; /** * Mapping of third party extension package name to rule group data. */ - private static Map sThirdPartyRuleGroupMap; + private static Map thirdPartyRuleGroupMap; /** * Private constructor to prevent instantiation. @@ -158,7 +158,7 @@ public static RuleMetadata createGenericMetadata(Module module) { MetadataFactory.getDefaultSeverity(), false, true, true, false, Collections.emptyList(), Collections.emptyList()); module.setMetaData(ruleMeta); - sRuleMetadata.put(ruleMeta.identity().internalName(), ruleMeta); + ruleMetadataByName.put(ruleMeta.identity().internalName(), ruleMeta); for (ConfigProperty property : module.getProperties()) { final ConfigPropertyMetadata meta = new ConfigPropertyMetadata( @@ -170,7 +170,7 @@ public static RuleMetadata createGenericMetadata(Module module) { private static void registerAlternativeNames(RuleMetadata ruleMetadata) { ruleMetadata.identity().alternativeNames() - .forEach(alternativeName -> sAlternativeNamesMap.put(alternativeName, ruleMetadata)); + .forEach(alternativeName -> alternativeNamesMap.put(alternativeName, ruleMetadata)); } /** @@ -179,12 +179,12 @@ private static void registerAlternativeNames(RuleMetadata ruleMetadata) { */ private static void createMetadataMap() { final List moduleDetails = XmlMetaReader - .readAllModulesIncludingThirdPartyIfAny(sPackageNameSet.toArray(new String[0])); + .readAllModulesIncludingThirdPartyIfAny(packageNameSet.toArray(new String[0])); if (moduleDetails.isEmpty()) { CheckstyleLog.log(null, "Cannot read module details"); } moduleDetails - .forEach(moduleDetail -> sModuleDetailsRepo.put(moduleDetail.getName(), moduleDetail)); + .forEach(moduleDetail -> moduleDetailsRepo.put(moduleDetail.getName(), moduleDetail)); } /** @@ -196,7 +196,7 @@ private static void createMetadataMap() { * registered check classes only. */ private static void loadThirdPartyModuleExtensionMetadata() { - final var rootPackages = sPackageNameSet.stream().map(pack -> { + final var rootPackages = packageNameSet.stream().map(pack -> { String root = pack; final int secondDot = StringUtils.ordinalIndexOf(pack, PACKAGE_NAME_SEPARATOR, 2); if (secondDot >= 0) { @@ -220,7 +220,7 @@ private static void loadThirdPartyModuleExtensionMetadata() { } } eclipseMetaDataFiles.forEach( - content -> sThirdPartyRuleGroupMap.putAll(ThirdPartyRuleGroupParser.parse(content))); + content -> thirdPartyRuleGroupMap.putAll(ThirdPartyRuleGroupParser.parse(content))); } /** @@ -229,7 +229,7 @@ private static void loadThirdPartyModuleExtensionMetadata() { * @return List of RuleGroupMetadata objects. */ public static List getRuleGroupMetadata() { - final List groups = new ArrayList<>(sRuleGroupMetadata.values()); + final List groups = new ArrayList<>(ruleGroupMetadata.values()); groups.sort(Comparator.comparingInt(RuleGroupMetadata::getPriority)); return groups; } @@ -242,7 +242,7 @@ public static List getRuleGroupMetadata() { * @return the RuleGroupMetadata object or null */ private static RuleGroupMetadata getRuleGroupMetadata(String name) { - return sRuleGroupMetadata.get(name); + return ruleGroupMetadata.get(name); } /** @@ -257,11 +257,11 @@ public static RuleMetadata getRuleMetadata(String name) { RuleMetadata metadata = null; // first try the internal name mapping - metadata = sRuleMetadata.get(name); + metadata = ruleMetadataByName.get(name); // try the alternative names if (metadata == null) { - metadata = sAlternativeNamesMap.get(name); + metadata = alternativeNamesMap.get(name); } return metadata; @@ -335,12 +335,12 @@ private static String getStandardMessage(String messageKey, RuleMetadata rule) { * Refreshes the metadata. */ private static synchronized void refresh() { - sRuleGroupMetadata = new TreeMap<>(); - sRuleMetadata = new HashMap<>(); - sAlternativeNamesMap = new HashMap<>(); - sModuleDetailsRepo = new HashMap<>(); - sThirdPartyRuleGroupMap = new HashMap<>(); - sPackageNameSet = new HashSet<>(); + ruleGroupMetadata = new TreeMap<>(); + ruleMetadataByName = new HashMap<>(); + alternativeNamesMap = new HashMap<>(); + moduleDetailsRepo = new HashMap<>(); + thirdPartyRuleGroupMap = new HashMap<>(); + packageNameSet = new HashSet<>(); try { doInitialization(); } @@ -392,9 +392,9 @@ private static String groupId(String metadataFile) { */ private static void loadRuleMetadata() { final List rules = new CheckstyleMetadataAdapter().loadRuleMetadata( - sRuleGroupMetadata, sModuleDetailsRepo.values(), sThirdPartyRuleGroupMap); + ruleGroupMetadata, moduleDetailsRepo.values(), thirdPartyRuleGroupMap); for (RuleMetadata module : rules) { - sRuleMetadata.put(module.identity().internalName(), module); + ruleMetadataByName.put(module.identity().internalName(), module); registerAlternativeNames(module); } } @@ -421,7 +421,7 @@ private static Collection getAllPotentialMetadataFiles(ClassLoader class catch (CheckstyleException ex) { CheckstylePluginException.rethrow(ex); } - sPackageNameSet.addAll(packages); + packageNameSet.addAll(packages); for (String packageName : packages) { final String metaFileLocation = @@ -463,13 +463,13 @@ private static void parseMetadata(InputStream metadataStream, ResourceBundle met final Collection groups = MetadataXmlReader.parseMetadata(metadataStream, metadataBundle, groupId); groups.forEach( - group -> sRuleGroupMetadata.merge(group.getGroupName(), group, (groupA, groupB) -> { + group -> ruleGroupMetadata.merge(group.getGroupName(), group, (groupA, groupB) -> { groupA.getRuleMetadata().addAll(groupB.getRuleMetadata()); return groupA; })); for (RuleGroupMetadata group : groups) { for (RuleMetadata module : group.getRuleMetadata()) { - sRuleMetadata.put(module.identity().internalName(), module); + ruleMetadataByName.put(module.identity().internalName(), module); registerAlternativeNames(module); } } diff --git a/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/projectconfig/filters/UnOpenedFilesFilter.java b/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/projectconfig/filters/UnOpenedFilesFilter.java index 3bc66db8a..80744a373 100644 --- a/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/projectconfig/filters/UnOpenedFilesFilter.java +++ b/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/projectconfig/filters/UnOpenedFilesFilter.java @@ -32,7 +32,7 @@ public class UnOpenedFilesFilter extends AbstractFilter { /** The list of opened files. */ - private static List sOpenedFiles = new ArrayList<>(); + private static final List OPENED_FILES = new ArrayList<>(); public UnOpenedFilesFilter() { } @@ -59,7 +59,7 @@ public IFilter copy() { * the file */ public static void addOpenedFile(IFile file) { - sOpenedFiles.add(file); + OPENED_FILES.add(file); } /** @@ -69,14 +69,14 @@ public static void addOpenedFile(IFile file) { * the file */ public static void removeOpenedFile(IFile file) { - sOpenedFiles.remove(file); + OPENED_FILES.remove(file); } @Override public boolean accept(Object element) { boolean accept = false; if (element instanceof IFile) { - accept = sOpenedFiles.contains(element); + accept = OPENED_FILES.contains(element); } return accept; } diff --git a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/CheckstyleUIPlugin.java b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/CheckstyleUIPlugin.java index 7ee95033a..df9387726 100644 --- a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/CheckstyleUIPlugin.java +++ b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/CheckstyleUIPlugin.java @@ -44,13 +44,13 @@ public class CheckstyleUIPlugin extends AbstractUIPlugin { public static final String PLUGIN_ID = "net.sf.eclipsecs.ui"; /** The shared instance. */ - private static CheckstyleUIPlugin sPlugin; + private static CheckstyleUIPlugin plugin; /** * The constructor. */ public CheckstyleUIPlugin() { - sPlugin = this; + plugin = this; } @Override @@ -66,7 +66,7 @@ public void stop(BundleContext context) throws Exception { * @return The shared plug-in instance. */ public static CheckstyleUIPlugin getDefault() { - return sPlugin; + return plugin; } /** diff --git a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/properties/filter/PluginFilterEditors.java b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/properties/filter/PluginFilterEditors.java index 788fbb8ab..9a2477ae0 100644 --- a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/properties/filter/PluginFilterEditors.java +++ b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/properties/filter/PluginFilterEditors.java @@ -49,14 +49,14 @@ public final class PluginFilterEditors { private static final String ATTR_CLASS = "class"; /** The filter prototypes configured to the extension point. */ - private static Map> sFilterEditorClasses; + private static final Map> FILTER_EDITOR_CLASSES; /* * Initialize the configured to the filter extension point. */ static { - sFilterEditorClasses = new HashMap<>(); + FILTER_EDITOR_CLASSES = new HashMap<>(); final IExtensionRegistry pluginRegistry = Platform.getExtensionRegistry(); @@ -70,7 +70,7 @@ public final class PluginFilterEditors { final IFilterEditor editor = (IFilterEditor) element.createExecutableExtension(ATTR_CLASS); - sFilterEditorClasses.put(filter, editor.getClass()); + FILTER_EDITOR_CLASSES.put(filter, editor.getClass()); } catch (CoreException ex) { CheckstyleLog.log(ex); @@ -91,7 +91,7 @@ private PluginFilterEditors() { * @return true if the filter has an editor, false otherwise. */ public static boolean hasEditor(IFilter filter) { - return sFilterEditorClasses.containsKey(filter.getInternalName()); + return FILTER_EDITOR_CLASSES.containsKey(filter.getInternalName()); } /** @@ -106,7 +106,7 @@ public static boolean hasEditor(IFilter filter) { public static IFilterEditor getNewEditor(IFilter filter) throws CheckstylePluginException { IFilterEditor editor = null; final Class editorClass = - sFilterEditorClasses.get(filter.getInternalName()); + FILTER_EDITOR_CLASSES.get(filter.getInternalName()); if (editorClass != null) { try {