Skip to content

Commit c3108d1

Browse files
authored
Merge pull request #277 from xdev-software/develop
Release
2 parents 7d6edc5 + f87c42c commit c3108d1

File tree

7 files changed

+14
-9
lines changed

7 files changed

+14
-9
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.4.2
2+
* Fix storage deserialization crash on unknown actions value #273
3+
14
## 1.4.1
25
* Fix ``Add class qualifier to static member access outside declaring class`` not working correctly for ``switch`` statements #263
36

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ plugins {
33
id 'idea'
44
id 'checkstyle'
55
id 'pmd'
6-
id 'org.jetbrains.intellij.platform' version '2.6.0'
6+
id 'org.jetbrains.intellij.platform' version '2.7.0'
77
}
88

99
ext {
1010
checkstyleVersion = '10.26.1'
1111

12-
pmdVersion = '7.15.0'
12+
pmdVersion = '7.16.0'
1313
}
1414

1515
def properties(String key) {
@@ -58,7 +58,7 @@ dependencies {
5858
checkstyle "com.puppycrawl.tools:checkstyle:${checkstyleVersion}"
5959
pmd "net.sourceforge.pmd:pmd-ant:${pmdVersion}",
6060
"net.sourceforge.pmd:pmd-java:${pmdVersion}"
61-
testImplementation platform('org.junit:junit-bom:5.13.3'),
61+
testImplementation platform('org.junit:junit-bom:5.13.4'),
6262
'org.junit.jupiter:junit-jupiter',
6363
'org.junit.jupiter:junit-jupiter-engine',
6464
'org.assertj:assertj-core:3.27.3'

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pluginName=Save Actions X
55
pluginVersion=1.4.2-SNAPSHOT
66
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
77
platformType=IC
8-
platformVersion=2025.1.3
8+
platformVersion=2025.1.4.1
99
platformSinceBuild=243
1010
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
1111
# Example: platformBundledPlugins = com.intellij.java, com.jetbrains.php:203.4449.22

gradle/wrapper/gradle-wrapper.jar

1.65 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
#
4-
# Copyright © 2015-2021 the original authors.
4+
# Copyright © 2015 the original authors.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.

src/main/java/software/xdev/saveactions/model/Storage.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package software.xdev.saveactions.model;
22

33
import java.util.ArrayList;
4-
import java.util.EnumSet;
54
import java.util.HashSet;
65
import java.util.List;
76
import java.util.Objects;
@@ -18,9 +17,12 @@
1817

1918
@State(name = "SaveActionSettings", storages = {@com.intellij.openapi.components.Storage("saveactions_settings.xml")})
2019
@Service(Service.Level.PROJECT)
20+
@SuppressWarnings("PMD.UseEnumCollections") // Set must be nullable!
2121
public final class Storage implements PersistentStateComponent<Storage>
2222
{
2323
private boolean firstLaunch;
24+
// Must use a set that supports nullable values!
25+
// For example EnumSet will crash when encountering an unknown/null value
2426
private Set<Action> actions;
2527
private Set<String> exclusions;
2628
private Set<String> inclusions;
@@ -31,7 +33,7 @@ public final class Storage implements PersistentStateComponent<Storage>
3133
public Storage()
3234
{
3335
this.firstLaunch = true;
34-
this.actions = EnumSet.noneOf(Action.class);
36+
this.actions = new HashSet<>();
3537
this.exclusions = new HashSet<>();
3638
this.inclusions = new HashSet<>();
3739
this.configurationPath = null;
@@ -42,7 +44,7 @@ public Storage()
4244
public Storage(final Storage storage)
4345
{
4446
this.firstLaunch = storage.firstLaunch;
45-
this.actions = EnumSet.copyOf(storage.actions);
47+
this.actions = new HashSet<>(storage.actions);
4648
this.exclusions = new HashSet<>(storage.exclusions);
4749
this.inclusions = new HashSet<>(storage.inclusions);
4850
this.configurationPath = storage.configurationPath;

0 commit comments

Comments
 (0)