Fix references to parameters renamed with the MethodParameters table

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

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

Loading…
Cancel
Save