Skip to content

Commit

Permalink
Fix NPE when no active module configs are present (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
jshiell committed Jun 6, 2022
1 parent bb5a037 commit c9c9474
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

# CheckStyle-IDEA Changelog

* **5.67.2** Fix: NPE in active modules configurations (#576).
* **5.67.1** Fix: Improve serialisation from legacy formats (#574).
* **5.67.1** Fix: Fix serialisation of property values (#573).
* **5.67.0** New: Added Checkstyle 10.3.
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repositories {
// Project Metadata
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

version = '5.67.1'
version = '5.67.2'

intellij {
version = 'IC-2021.1.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void setActiveLocationIds(@NotNull final SortedSet<String> activeLocation

@NotNull
public SortedSet<String> getActiveLocationIds() {
return activeLocationIds;
return Objects.requireNonNullElseGet(activeLocationIds, TreeSet::new);
}


Expand Down Expand Up @@ -72,7 +72,7 @@ private List<ConfigurationLocation> configurationLocations() {
public ModuleSettings getState() {
final ModuleSettings settings = new ModuleSettings();
settings.useLatestSerialisationFormat();
settings.setActiveLocationIds(Objects.requireNonNullElse(activeLocationIds, new TreeSet<>()));
settings.setActiveLocationIds(Objects.requireNonNullElseGet(activeLocationIds, TreeSet::new));
settings.setExcludeFromScan(excludedFromScan);
return settings;
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</p>
]]>
</description>
<version>5.67.1</version>
<version>5.67.2</version>
<idea-version since-build="211.7628.21"/>
<vendor url="https://infernus.org/" email="jamie@infernus.org">Jamie Shiell</vendor>

Expand All @@ -24,6 +24,7 @@
<change-notes>
<![CDATA[
<ul>
<li>5.67.2: Fix: NPE in active modules configurations (#576).</li>
<li>5.67.1: Fix: Improve serialisation from legacy formats (#574).</li>
<li>5.67.1: Fix: Fix serialisation of property values (#573).</li>
<li>5.67.0: New: Added Checkstyle 10.3.</li>
Expand Down

0 comments on commit c9c9474

Please sign in to comment.