remove redundant suppressions

master
Anna.Kozlova 6 years ago
parent 5650f57ad2
commit 7e155e71f2
  1. 1
      src/org/jetbrains/java/decompiler/main/decompiler/ConsoleDecompiler.java
  2. 2
      src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java
  3. 2
      src/org/jetbrains/java/decompiler/modules/decompiler/vars/VarTypeProcessor.java
  4. 1
      src/org/jetbrains/java/decompiler/modules/renamer/IdentifierConverter.java
  5. 1
      src/org/jetbrains/java/decompiler/struct/StructContext.java

@ -189,7 +189,6 @@ public class ConsoleDecompiler implements IBytecodeProvider, IResultSaver {
} }
FileOutputStream fileStream = new FileOutputStream(file); FileOutputStream fileStream = new FileOutputStream(file);
@SuppressWarnings("IOResourceOpenedButNotSafelyClosed")
ZipOutputStream zipStream = manifest != null ? new JarOutputStream(fileStream, manifest) : new ZipOutputStream(fileStream); ZipOutputStream zipStream = manifest != null ? new JarOutputStream(fileStream, manifest) : new ZipOutputStream(fileStream);
mapArchiveStreams.put(file.getPath(), zipStream); mapArchiveStreams.put(file.getPath(), zipStream);
} }

@ -740,7 +740,6 @@ public class NestedClassProcessor {
Statement first = findFirstBlock(statement, setStats); Statement first = findFirstBlock(statement, setStats);
List<Exprent> lst; List<Exprent> lst;
//noinspection Duplicates
if (first == null) { if (first == null) {
lst = statement.getVarDefinitions(); lst = statement.getVarDefinitions();
} }
@ -780,7 +779,6 @@ public class NestedClassProcessor {
stack.clear(); stack.clear();
//noinspection Duplicates
switch (st.type) { switch (st.type) {
case Statement.TYPE_SEQUENCE: case Statement.TYPE_SEQUENCE:
stack.addAll(0, st.getStats()); stack.addAll(0, st.getStats());

@ -173,7 +173,6 @@ public class VarTypeProcessor {
pair = new VarVersionPair(((ConstExprent)exprent).id, -1); pair = new VarVersionPair(((ConstExprent)exprent).id, -1);
} }
else if (exprent.type == Exprent.EXPRENT_VAR) { else if (exprent.type == Exprent.EXPRENT_VAR) {
//noinspection ConstantConditions
pair = new VarVersionPair((VarExprent)exprent); pair = new VarVersionPair((VarExprent)exprent);
} }
@ -192,7 +191,6 @@ public class VarTypeProcessor {
mapExprentMinTypes.put(pair, newMinType); mapExprentMinTypes.put(pair, newMinType);
if (exprent.type == Exprent.EXPRENT_CONST) { if (exprent.type == Exprent.EXPRENT_CONST) {
//noinspection ConstantConditions
((ConstExprent)exprent).setConstType(newMinType); ((ConstExprent)exprent).setConstType(newMinType);
} }

@ -322,7 +322,6 @@ public class IdentifierConverter implements NewClassNameBuilder {
nodes.put(clStr.qualifiedName, node = new ClassWrapperNode(clStr)); nodes.put(clStr.qualifiedName, node = new ClassWrapperNode(clStr));
} }
//noinspection ConstantConditions
if (child != null) { if (child != null) {
node.addSubclass(child); node.addSubclass(child);
} }

@ -123,7 +123,6 @@ public class StructContext {
} }
private void addArchive(String path, File file, int type, boolean isOwn) throws IOException { 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)) { try (ZipFile archive = type == ContextUnit.TYPE_JAR ? new JarFile(file) : new ZipFile(file)) {
Enumeration<? extends ZipEntry> entries = archive.entries(); Enumeration<? extends ZipEntry> entries = archive.entries();
while (entries.hasMoreElements()) { while (entries.hasMoreElements()) {

Loading…
Cancel
Save