Fix references to parameters renamed with the MethodParameters table

master
Graham 5 years ago
parent 843dbb5278
commit b7ff940440
  1. 11
      src/org/jetbrains/java/decompiler/main/ClassWriter.java

@ -748,12 +748,13 @@ public class ClassWriter {
buffer.append(' ');
String parameterName;
String parameterName = methodWrapper.varproc.getVarName(new VarVersionPair(index, 0));
if (methodParameters != null && i < methodParameters.size()) {
parameterName = methodParameters.get(i).myName;
}
else {
parameterName = methodWrapper.varproc.getVarName(new VarVersionPair(index, 0));
String myName = methodParameters.get(i).myName;
if (myName != null) {
parameterName = myName;
methodWrapper.varproc.setVarName(new VarVersionPair(index, 0), myName);
}
}
buffer.append(parameterName == null ? "param" + index : parameterName); // null iff decompiled with errors

Loading…
Cancel
Save