add PECS wildcards to method signatures where necessary and where methods are not overridden by plugins

GitOrigin-RevId: 1ec7f1a1aa17d2d4f42e647207323ab8a3138683
master
Alexey Kudravtsev 6 years ago committed by intellij-monorepo-bot
parent f4a63880bc
commit f9c29f0c92
  1. 2
      src/org/jetbrains/java/decompiler/code/cfg/ControlFlowGraph.java
  2. 2
      src/org/jetbrains/java/decompiler/main/ClassReference14Processor.java
  3. 2
      src/org/jetbrains/java/decompiler/main/decompiler/ConsoleDecompiler.java
  4. 2
      src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java
  5. 2
      src/org/jetbrains/java/decompiler/modules/decompiler/StackVarsProcessor.java
  6. 2
      src/org/jetbrains/java/decompiler/modules/decompiler/sforms/DirectGraph.java
  7. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/stats/Statement.java
  8. 2
      src/org/jetbrains/java/decompiler/modules/decompiler/vars/VarVersionsGraph.java
  9. 2
      src/org/jetbrains/java/decompiler/struct/gen/generics/GenericMain.java

@ -745,7 +745,7 @@ public class ControlFlowGraph implements CodeConstants {
return res;
}
private static void addToReversePostOrderListIterative(BasicBlock root, List<BasicBlock> lst) {
private static void addToReversePostOrderListIterative(BasicBlock root, List<? super BasicBlock> lst) {
LinkedList<BasicBlock> stackNode = new LinkedList<>();
LinkedList<Integer> stackIndex = new LinkedList<>();

@ -74,7 +74,7 @@ public class ClassReference14Processor {
}
}
private static void processClassRec(ClassNode node, Map<ClassWrapper, MethodWrapper> mapClassMeths, Set<ClassWrapper> setFound) {
private static void processClassRec(ClassNode node, Map<ClassWrapper, MethodWrapper> mapClassMeths, Set<? super ClassWrapper> setFound) {
ClassWrapper wrapper = node.getWrapper();
// search code

@ -83,7 +83,7 @@ public class ConsoleDecompiler implements IBytecodeProvider, IResultSaver {
}
@SuppressWarnings("UseOfSystemOutOrSystemErr")
private static void addPath(List<File> list, String path) {
private static void addPath(List<? super File> list, String path) {
File file = new File(path);
if (file.exists()) {
list.add(file);

@ -798,7 +798,7 @@ public class NestedClassProcessor {
return null;
}
private static Statement getDefStatement(Statement stat, VarType classType, Set<Statement> setStats) {
private static Statement getDefStatement(Statement stat, VarType classType, Set<? super Statement> setStats) {
List<Exprent> lst = new ArrayList<>();
Statement retStat = null;

@ -525,7 +525,7 @@ public class StackVarsProcessor {
return new Object[]{null, changed, false};
}
private static boolean getUsedVersions(SSAUConstructorSparseEx ssa, VarVersionPair var, List<VarVersionNode> res) {
private static boolean getUsedVersions(SSAUConstructorSparseEx ssa, VarVersionPair var, List<? super VarVersionNode> res) {
VarVersionsGraph ssuversions = ssa.getSsuversions();
VarVersionNode varnode = ssuversions.nodes.getWithKey(var);

@ -39,7 +39,7 @@ public class DirectGraph {
}
}
private static void addToReversePostOrderListIterative(DirectNode root, List<DirectNode> lst) {
private static void addToReversePostOrderListIterative(DirectNode root, List<? super DirectNode> lst) {
LinkedList<DirectNode> stackNode = new LinkedList<>();
LinkedList<Integer> stackIndex = new LinkedList<>();

@ -546,7 +546,7 @@ public class Statement implements IMatchable {
// private methods
// *****************************************************************************
private static void addToReversePostOrderListIterative(Statement root, List<Statement> lst) {
private static void addToReversePostOrderListIterative(Statement root, List<? super Statement> lst) {
LinkedList<Statement> stackNode = new LinkedList<>();
LinkedList<Integer> stackIndex = new LinkedList<>();
@ -589,7 +589,7 @@ public class Statement implements IMatchable {
}
private static void addToPostReversePostOrderList(Statement stat, List<Statement> lst, HashSet<Statement> setVisited) {
private static void addToPostReversePostOrderList(Statement stat, List<? super Statement> lst, HashSet<? super Statement> setVisited) {
if (setVisited.contains(stat)) { // because of not considered exception edges, s. isExitComponent. Should be rewritten, if possible.
return;

@ -99,7 +99,7 @@ public class VarVersionsGraph {
return lst;
}
private static void addToReversePostOrderListIterative(VarVersionNode root, List<VarVersionNode> lst, Set<VarVersionNode> setVisited) {
private static void addToReversePostOrderListIterative(VarVersionNode root, List<? super VarVersionNode> lst, Set<? super VarVersionNode> setVisited) {
Map<VarVersionNode, List<VarVersionEdge>> mapNodeSuccs = new HashMap<>();
LinkedList<VarVersionNode> stackNode = new LinkedList<>();
LinkedList<Integer> stackIndex = new LinkedList<>();

@ -95,7 +95,7 @@ public class GenericMain {
}
}
private static String parseFormalParameters(String signature, List<String> parameters, List<List<GenericType>> bounds) {
private static String parseFormalParameters(String signature, List<? super String> parameters, List<? super List<GenericType>> bounds) {
if (signature.charAt(0) != '<') {
return signature;
}

Loading…
Cancel
Save