Fixed renaming class elements when using the decompilers -ren=1 option. Fixes issue IDEA-137253

master
Christopher Carpenter 9 years ago
parent 811494ccb2
commit bfddced4e2
  1. 5
      src/org/jetbrains/java/decompiler/struct/consts/ConstantPool.java

@ -150,6 +150,11 @@ public class ConstantPool implements NewClassNameBuilder {
String descriptor = ((PrimitiveConstant)getConstant(descriptorIndex)).getString(); String descriptor = ((PrimitiveConstant)getConstant(descriptorIndex)).getString();
if (interceptor != null) { if (interceptor != null) {
String oldClassName = interceptor.getOldName(className);
if (oldClassName != null) {
className = oldClassName;
}
String newElement = interceptor.getName(className + " " + elementName + " " + descriptor); String newElement = interceptor.getName(className + " " + elementName + " " + descriptor);
if (newElement != null) { if (newElement != null) {
elementName = newElement.split(" ")[1]; elementName = newElement.split(" ")[1];

Loading…
Cancel
Save