Commit bf3863d1 authored by Daniel Ramos's avatar Daniel Ramos

Fixed issue where deobfuscated classes,methods,and fields were not being...

Fixed issue where deobfuscated classes,methods,and fields were not being commented with their original name.
parent 94e9291c
......@@ -339,6 +339,10 @@ public class ClassGen {
continue;
}
annotationGen.addForField(code, f);
if(f.getFieldInfo().isRenamed()) {
code.startLine("/* renamed from: ").add(f.getName()).add(" */");
}
code.startLine(f.getAccessFlags().makeString());
useType(code, f.getType());
code.add(' ');
......@@ -586,9 +590,8 @@ public class ClassGen {
private void insertRenameInfo(CodeWriter code, ClassNode cls) {
ClassInfo classInfo = cls.getClassInfo();
if (classInfo.isRenamed()
&& !cls.getShortName().equals(cls.getAlias().getShortName())) {
code.startLine("/* renamed from: ").add(classInfo.getFullName()).add(" */");
if (classInfo.isRenamed()) {
code.startLine("/* renamed from: ").add(classInfo.getType().getObject()).add(" */");
}
}
......
......@@ -80,6 +80,10 @@ public class MethodGen {
if (clsAccFlags.isAnnotation()) {
ai = ai.remove(AccessFlags.ACC_PUBLIC);
}
if(mth.getMethodInfo().isRenamed()) {
code.startLine("/* renamed from: ").add(mth.getName()).add(" */");
}
code.startLineWithNum(mth.getSourceLine());
code.add(ai.makeString());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment