diff --git a/CHANGELOG.md b/CHANGELOG.md
index bb872e7..f54e897 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,8 @@
-## 1.0.6
+## 1.1.0
+* Removed "Remove unused suppress warning annotation"
+ * This option never worked #64
+ * Allows usage of the plugin with IntelliJ Idea 2024+ #63
+ * If you used this option you should remove the line ```` inside ``saveactions_settings.xml``
* Allow compilation with Java 21
## 1.0.5
diff --git a/gradle.properties b/gradle.properties
index cbd3817..e5a3e90 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -2,7 +2,7 @@
pluginGroup=software.xdev.saveactions
pluginName=Save Actions - XDEV Edition
# SemVer format -> https://semver.org
-pluginVersion=1.0.6-SNAPSHOT
+pluginVersion=1.1.0-SNAPSHOT
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformType=IC
platformVersion=2023.1
diff --git a/src/main/java/software/xdev/saveactions/model/Action.java b/src/main/java/software/xdev/saveactions/model/Action.java
index 2804f5d..fa21d28 100644
--- a/src/main/java/software/xdev/saveactions/model/Action.java
+++ b/src/main/java/software/xdev/saveactions/model/Action.java
@@ -4,11 +4,11 @@
import java.util.Set;
import java.util.stream.Stream;
+import static java.util.stream.Collectors.toSet;
import static software.xdev.saveactions.model.ActionType.activation;
import static software.xdev.saveactions.model.ActionType.build;
import static software.xdev.saveactions.model.ActionType.global;
import static software.xdev.saveactions.model.ActionType.java;
-import static java.util.stream.Collectors.toSet;
public enum Action {
@@ -100,9 +100,6 @@ public enum Action {
explicitTypeCanBeDiamond("Remove explicit generic type for diamond",
java, false),
- suppressAnnotation("Remove unused suppress warning annotation",
- java, false),
-
unnecessarySemicolon("Remove unnecessary semicolon",
java, false),
diff --git a/src/main/java/software/xdev/saveactions/model/Storage.java b/src/main/java/software/xdev/saveactions/model/Storage.java
index b70c679..4b97a90 100644
--- a/src/main/java/software/xdev/saveactions/model/Storage.java
+++ b/src/main/java/software/xdev/saveactions/model/Storage.java
@@ -10,6 +10,7 @@
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
+import java.util.Objects;
import java.util.Set;
@State(name = "SaveActionSettings", storages = {@com.intellij.openapi.components.Storage("saveactions_settings.xml")})
@@ -52,6 +53,12 @@ public Storage getState() {
public void loadState(@NotNull Storage state) {
firstLaunch = false;
XmlSerializerUtil.copyBean(state, this);
+
+ // Remove null values that might have been caused by non-parsable values
+ actions.removeIf(Objects::isNull);
+ exclusions.removeIf(Objects::isNull);
+ inclusions.removeIf(Objects::isNull);
+ quickLists.removeIf(Objects::isNull);
}
public Set getActions() {
diff --git a/src/main/java/software/xdev/saveactions/processors/java/JavaProcessor.java b/src/main/java/software/xdev/saveactions/processors/java/JavaProcessor.java
index 0239901..89f0e81 100644
--- a/src/main/java/software/xdev/saveactions/processors/java/JavaProcessor.java
+++ b/src/main/java/software/xdev/saveactions/processors/java/JavaProcessor.java
@@ -7,7 +7,6 @@
import com.intellij.psi.PsiFile;
import com.siyeh.ig.classlayout.FinalPrivateMethodInspection;
import com.siyeh.ig.inheritance.MissingOverrideAnnotationInspection;
-import com.siyeh.ig.maturity.SuppressionAnnotationInspection;
import com.siyeh.ig.performance.MethodMayBeStaticInspection;
import com.siyeh.ig.style.ControlFlowStatementWithoutBracesInspection;
import com.siyeh.ig.style.FieldMayBeFinalInspection;
@@ -99,9 +98,6 @@ public enum JavaProcessor implements Processor {
explicitTypeCanBeDiamond(Action.explicitTypeCanBeDiamond,
ExplicitTypeCanBeDiamondInspection::new),
- suppressAnnotation(Action.suppressAnnotation,
- SuppressionAnnotationInspection::new),
-
unnecessarySemicolon(Action.unnecessarySemicolon,
UnnecessarySemicolonInspection::new),
diff --git a/src/test/java/software/xdev/saveactions/integration/JavaIntegrationTest.java b/src/test/java/software/xdev/saveactions/integration/JavaIntegrationTest.java
index 32d28a0..28c75a4 100644
--- a/src/test/java/software/xdev/saveactions/integration/JavaIntegrationTest.java
+++ b/src/test/java/software/xdev/saveactions/integration/JavaIntegrationTest.java
@@ -17,7 +17,6 @@
import static software.xdev.saveactions.model.Action.methodMayBeStatic;
import static software.xdev.saveactions.model.Action.missingOverrideAnnotation;
import static software.xdev.saveactions.model.Action.singleStatementInBlock;
-import static software.xdev.saveactions.model.Action.suppressAnnotation;
import static software.xdev.saveactions.model.Action.unnecessaryFinalOnLocalVariableOrParameter;
import static software.xdev.saveactions.model.Action.unnecessarySemicolon;
import static software.xdev.saveactions.model.Action.unnecessaryThis;
@@ -150,13 +149,6 @@ void should_explicitTypeCanBeDiamond_removes_explicit_diamond() {
assertSaveAction(ActionTestFile.ExplicitTypeCanBeDiamond_KO, ActionTestFile.ExplicitTypeCanBeDiamond_OK);
}
- @Test
- void should_suppressAnnotation_remove_unnecessary_suppress_warning_annotation() {
- storage.setEnabled(activate, true);
- storage.setEnabled(suppressAnnotation, true);
- assertSaveAction(ActionTestFile.SuppressAnnotation_KO, ActionTestFile.SuppressAnnotation_OK);
- }
-
@Test
void should_unnecessarySemicolon_remove_unnecessary_semicolon() {
storage.setEnabled(activate, true);