Skip to content

Commit

Permalink
Don't de-obfuscate field types twice
Browse files Browse the repository at this point in the history
Fixes GH-53.
  • Loading branch information
jamierocks committed Oct 23, 2021
1 parent 356cef5 commit a4df86f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lorenz/src/main/java/org/cadixdev/lorenz/MappingSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public MappingSet removeFieldTypeProvider(final FieldTypeProvider fieldTypeProvi
*/
public Type deobfuscate(final Type type) {
if (type instanceof FieldType) {
return this.deobfuscate(this.deobfuscate((FieldType) type));
return this.deobfuscate((FieldType) type);
}
return type;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ private static MappingSet mappings() {
a.getOrCreateInnerClassMapping("a")
.setDeobfuscatedName("Inner");

final TopLevelClassMapping demo = mappings.getOrCreateTopLevelClassMapping("Demo")
.setDeobfuscatedName("DoubleDeobf");

return mappings;
}

Expand Down

0 comments on commit a4df86f

Please sign in to comment.