From 7e155e71f2e410a17f1d3223a4a047bd13b81d4e Mon Sep 17 00:00:00 2001 From: "Anna.Kozlova" Date: Thu, 4 Oct 2018 11:41:55 +0200 Subject: [PATCH] remove redundant suppressions --- .../java/decompiler/main/decompiler/ConsoleDecompiler.java | 1 - .../java/decompiler/main/rels/NestedClassProcessor.java | 2 -- .../decompiler/modules/decompiler/vars/VarTypeProcessor.java | 2 -- .../java/decompiler/modules/renamer/IdentifierConverter.java | 1 - src/org/jetbrains/java/decompiler/struct/StructContext.java | 1 - 5 files changed, 7 deletions(-) diff --git a/src/org/jetbrains/java/decompiler/main/decompiler/ConsoleDecompiler.java b/src/org/jetbrains/java/decompiler/main/decompiler/ConsoleDecompiler.java index d79c8f9..47609fa 100644 --- a/src/org/jetbrains/java/decompiler/main/decompiler/ConsoleDecompiler.java +++ b/src/org/jetbrains/java/decompiler/main/decompiler/ConsoleDecompiler.java @@ -189,7 +189,6 @@ public class ConsoleDecompiler implements IBytecodeProvider, IResultSaver { } FileOutputStream fileStream = new FileOutputStream(file); - @SuppressWarnings("IOResourceOpenedButNotSafelyClosed") ZipOutputStream zipStream = manifest != null ? new JarOutputStream(fileStream, manifest) : new ZipOutputStream(fileStream); mapArchiveStreams.put(file.getPath(), zipStream); } diff --git a/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java b/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java index 587f1d9..1b91f44 100644 --- a/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java +++ b/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java @@ -740,7 +740,6 @@ public class NestedClassProcessor { Statement first = findFirstBlock(statement, setStats); List lst; - //noinspection Duplicates if (first == null) { lst = statement.getVarDefinitions(); } @@ -780,7 +779,6 @@ public class NestedClassProcessor { stack.clear(); - //noinspection Duplicates switch (st.type) { case Statement.TYPE_SEQUENCE: stack.addAll(0, st.getStats()); diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/vars/VarTypeProcessor.java b/src/org/jetbrains/java/decompiler/modules/decompiler/vars/VarTypeProcessor.java index 6339f9a..3c19d2c 100644 --- a/src/org/jetbrains/java/decompiler/modules/decompiler/vars/VarTypeProcessor.java +++ b/src/org/jetbrains/java/decompiler/modules/decompiler/vars/VarTypeProcessor.java @@ -173,7 +173,6 @@ public class VarTypeProcessor { pair = new VarVersionPair(((ConstExprent)exprent).id, -1); } else if (exprent.type == Exprent.EXPRENT_VAR) { - //noinspection ConstantConditions pair = new VarVersionPair((VarExprent)exprent); } @@ -192,7 +191,6 @@ public class VarTypeProcessor { mapExprentMinTypes.put(pair, newMinType); if (exprent.type == Exprent.EXPRENT_CONST) { - //noinspection ConstantConditions ((ConstExprent)exprent).setConstType(newMinType); } diff --git a/src/org/jetbrains/java/decompiler/modules/renamer/IdentifierConverter.java b/src/org/jetbrains/java/decompiler/modules/renamer/IdentifierConverter.java index 33b166d..ba09aa1 100644 --- a/src/org/jetbrains/java/decompiler/modules/renamer/IdentifierConverter.java +++ b/src/org/jetbrains/java/decompiler/modules/renamer/IdentifierConverter.java @@ -322,7 +322,6 @@ public class IdentifierConverter implements NewClassNameBuilder { nodes.put(clStr.qualifiedName, node = new ClassWrapperNode(clStr)); } - //noinspection ConstantConditions if (child != null) { node.addSubclass(child); } diff --git a/src/org/jetbrains/java/decompiler/struct/StructContext.java b/src/org/jetbrains/java/decompiler/struct/StructContext.java index 40c1193..6d07096 100644 --- a/src/org/jetbrains/java/decompiler/struct/StructContext.java +++ b/src/org/jetbrains/java/decompiler/struct/StructContext.java @@ -123,7 +123,6 @@ public class StructContext { } private void addArchive(String path, File file, int type, boolean isOwn) throws IOException { - //noinspection IOResourceOpenedButNotSafelyClosed try (ZipFile archive = type == ContextUnit.TYPE_JAR ? new JarFile(file) : new ZipFile(file)) { Enumeration entries = archive.entries(); while (entries.hasMoreElements()) {