From 9891772deca8a341a43d89063c000fb6455079cd Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Mon, 1 Oct 2018 13:42:18 +0300 Subject: [PATCH] Use bounded wildcards in API in static methods to make it more conventional and flexible --- src/org/jetbrains/java/decompiler/main/ClassWriter.java | 2 +- .../java/decompiler/modules/decompiler/DecHelper.java | 6 +++--- .../java/decompiler/modules/decompiler/ExprProcessor.java | 2 +- .../java/decompiler/modules/decompiler/IfHelper.java | 4 ++-- .../modules/decompiler/StrongConnectivityHelper.java | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/org/jetbrains/java/decompiler/main/ClassWriter.java b/src/org/jetbrains/java/decompiler/main/ClassWriter.java index 216b914..c782a48 100644 --- a/src/org/jetbrains/java/decompiler/main/ClassWriter.java +++ b/src/org/jetbrains/java/decompiler/main/ClassWriter.java @@ -1065,7 +1065,7 @@ public class ClassWriter { return null; } - public static void appendTypeParameters(TextBuffer buffer, List parameters, List> bounds) { + public static void appendTypeParameters(TextBuffer buffer, List parameters, List> bounds) { buffer.append('<'); for (int i = 0; i < parameters.size(); i++) { diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/DecHelper.java b/src/org/jetbrains/java/decompiler/modules/decompiler/DecHelper.java index 8cfcdf7..1549734 100644 --- a/src/org/jetbrains/java/decompiler/modules/decompiler/DecHelper.java +++ b/src/org/jetbrains/java/decompiler/modules/decompiler/DecHelper.java @@ -12,7 +12,7 @@ import java.util.Set; public class DecHelper { - public static boolean checkStatementExceptions(List lst) { + public static boolean checkStatementExceptions(List lst) { Set all = new HashSet<>(lst); @@ -55,7 +55,7 @@ public class DecHelper { return true; } - public static boolean isChoiceStatement(Statement head, List lst) { + public static boolean isChoiceStatement(Statement head, List lst) { Statement post = null; @@ -189,7 +189,7 @@ public class DecHelper { return setHandlers; } - public static List copyExprentList(List lst) { + public static List copyExprentList(List lst) { List ret = new ArrayList<>(); for (Exprent expr : lst) { ret.add(expr.copy()); diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/ExprProcessor.java b/src/org/jetbrains/java/decompiler/modules/decompiler/ExprProcessor.java index c52ac08..aadd0b1 100644 --- a/src/org/jetbrains/java/decompiler/modules/decompiler/ExprProcessor.java +++ b/src/org/jetbrains/java/decompiler/modules/decompiler/ExprProcessor.java @@ -794,7 +794,7 @@ public class ExprProcessor implements CodeConstants { return res; } - public static TextBuffer listToJava(List lst, int indent, BytecodeMappingTracer tracer) { + public static TextBuffer listToJava(List lst, int indent, BytecodeMappingTracer tracer) { if (lst == null || lst.isEmpty()) { return new TextBuffer(); } diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/IfHelper.java b/src/org/jetbrains/java/decompiler/modules/decompiler/IfHelper.java index 719a017..0e55d27 100644 --- a/src/org/jetbrains/java/decompiler/modules/decompiler/IfHelper.java +++ b/src/org/jetbrains/java/decompiler/modules/decompiler/IfHelper.java @@ -20,7 +20,7 @@ public class IfHelper { return res; } - private static boolean mergeAllIfsRec(Statement stat, Set setReorderedIfs) { + private static boolean mergeAllIfsRec(Statement stat, Set setReorderedIfs) { boolean res = false; if (stat.getExprents() == null) { @@ -47,7 +47,7 @@ public class IfHelper { return res; } - public static boolean mergeIfs(Statement statement, Set setReorderedIfs) { + public static boolean mergeIfs(Statement statement, Set setReorderedIfs) { if (statement.type != Statement.TYPE_IF && statement.type != Statement.TYPE_SEQUENCE) { return false; } diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/StrongConnectivityHelper.java b/src/org/jetbrains/java/decompiler/modules/decompiler/StrongConnectivityHelper.java index 80f6d02..4e81646 100644 --- a/src/org/jetbrains/java/decompiler/modules/decompiler/StrongConnectivityHelper.java +++ b/src/org/jetbrains/java/decompiler/modules/decompiler/StrongConnectivityHelper.java @@ -85,7 +85,7 @@ public class StrongConnectivityHelper { } } - public static boolean isExitComponent(List lst) { + public static boolean isExitComponent(List lst) { Set set = new HashSet<>(); for (Statement stat : lst) { set.addAll(stat.getNeighbours(StatEdge.TYPE_REGULAR, Statement.DIRECTION_FORWARD)); @@ -95,7 +95,7 @@ public class StrongConnectivityHelper { return (set.size() == 0); } - public static List getExitReps(List> lst) { + public static List getExitReps(List> lst) { List res = new ArrayList<>(); for (List comp : lst) {