Skip to content

Commit

Permalink
Remove extra class name tracking field in class remapper
Browse files Browse the repository at this point in the history
  • Loading branch information
Col-E committed Nov 24, 2024
1 parent 06bfadb commit ea47421
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*/
public class WorkspaceClassRemapper extends ClassRemapper {
private final WorkspaceBackedRemapper workspaceRemapper;
private String visitedClassName;

/**
* @param cv
Expand All @@ -38,13 +37,6 @@ public WorkspaceClassRemapper(@Nullable ClassVisitor cv, @Nonnull Workspace work
this.workspaceRemapper = ((WorkspaceBackedRemapper) super.remapper);
}

@Override
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
// Record the class name
visitedClassName = name;
super.visit(version, access, name, signature, superName, interfaces);
}

@Override
public MethodVisitor visitMethod(int access, @Nonnull String name, @Nonnull String descriptor,
@Nullable String signature, @Nullable String[] exceptions) {
Expand All @@ -59,7 +51,7 @@ public MethodVisitor visitMethod(int access, @Nonnull String name, @Nonnull Stri
remappedDescriptor,
remapper.mapSignature(signature, false),
exceptions == null ? null : remapper.mapTypes(exceptions));
return mv == null ? null : new VariableRenamingMethodVisitor(visitedClassName, name, descriptor, mv, workspaceRemapper);
return mv == null ? null : new VariableRenamingMethodVisitor(className, name, descriptor, mv, workspaceRemapper);
}

@Override
Expand Down

0 comments on commit ea47421

Please sign in to comment.