Skip to content

Commit

Permalink
dependency: bump spotbugs-maven-plugin from 4.7.1.1 to 4.7.2.0
Browse files Browse the repository at this point in the history
Bumps [spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin)
from 4.7.1.1 to 4.7.2.0.
- [Release
notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases)
- [Commits](spotbugs/spotbugs-maven-plugin@spotbugs-maven-plugin-4.7.1.1...spotbugs-maven-plugin-4.7.2.0)

---
updated-dependencies:
- dependency-name: com.github.spotbugs:spotbugs-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
  • Loading branch information
dependabot[bot] authored and nrmancuso committed Oct 8, 2022
1 parent a3224da commit 357ba1e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
Expand Up @@ -127,7 +127,7 @@
<fileName>checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java</fileName>
<specifier>initialization.fields.uninitialized</specifier>
<message>the constructor does not initialize fields: configuration</message>
<lineContent>private ConfigurationLoader(final PropertyResolver overrideProps,</lineContent>
<lineContent>private InternalLoader()</lineContent>
</checkerFrameworkError>

<checkerFrameworkError unstable="false">
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -208,7 +208,7 @@
<projectVersion>${project.version}</projectVersion>
<antlr4.version>4.11.1</antlr4.version>
<maven.site.plugin.version>3.12.1</maven.site.plugin.version>
<maven.spotbugs.plugin.version>4.7.1.1</maven.spotbugs.plugin.version>
<maven.spotbugs.plugin.version>4.7.2.0</maven.spotbugs.plugin.version>
<maven.pmd.plugin.version>3.19.0</maven.pmd.plugin.version>
<pmd.version>6.50.0</pmd.version>
<maven.jacoco.plugin.version>0.8.8</maven.jacoco.plugin.version>
Expand Down
Expand Up @@ -133,18 +133,13 @@ public enum IgnoredModulesOptions {

/** Property resolver. **/
private final PropertyResolver overridePropsResolver;
/** The loaded configurations. **/
private final Deque<DefaultConfiguration> configStack = new ArrayDeque<>();

/** Flags if modules with the severity 'ignore' should be omitted. */
private final boolean omitIgnoredModules;

/** The thread mode configuration. */
private final ThreadModeSettings threadModeSettings;

/** The Configuration that is being built. */
private Configuration configuration;

/**
* Creates a new {@code ConfigurationLoader} instance.
*
Expand Down Expand Up @@ -192,12 +187,14 @@ private static Map<String, String> createIdToResourceNameMap() {
* the caller to close the stream.
*
* @param source the source that contains the configuration data
* @return the check configurations
* @throws IOException if an error occurs
* @throws SAXException if an error occurs
*/
private void parseInputSource(InputSource source)
private Configuration parseInputSource(InputSource source)
throws IOException, SAXException {
saxHandler.parseInputSource(source);
return saxHandler.configuration;
}

/**
Expand Down Expand Up @@ -315,8 +312,7 @@ public static Configuration loadConfiguration(InputSource configSource,
final ConfigurationLoader loader =
new ConfigurationLoader(overridePropsResolver,
omitIgnoreModules, threadModeSettings);
loader.parseInputSource(configSource);
return loader.configuration;
return loader.parseInputSource(configSource);
}
catch (final SAXParseException ex) {
final String message = String.format(Locale.ROOT, SAX_PARSE_EXCEPTION_FORMAT,
Expand Down Expand Up @@ -482,6 +478,12 @@ private final class InternalLoader
/** Name of the key attribute. */
private static final String KEY = "key";

/** The loaded configurations. **/
private final Deque<DefaultConfiguration> configStack = new ArrayDeque<>();

/** The Configuration that is being built. */
private Configuration configuration;

/**
* Creates a new InternalLoader.
*
Expand All @@ -506,12 +508,12 @@ public void startElement(String uri,
final DefaultConfiguration conf =
new DefaultConfiguration(name, threadModeSettings);

if (configuration == null) {
if (configStack.isEmpty()) {
// save top config
configuration = conf;
}

// add configuration to it's parent
if (!configStack.isEmpty()) {
else {
// add configuration to it's parent
final DefaultConfiguration top =
configStack.peek();
top.addChild(conf);
Expand Down

0 comments on commit 357ba1e

Please sign in to comment.