Skip to content

Commit

Permalink
Fix: Pass binary class name from agent to transformer.
Browse files Browse the repository at this point in the history
The transformer expects binary names and internal format ones can cause unexpected behaviour in several places.
  • Loading branch information
LlamaLad7 committed Jan 23, 2025
1 parent cfe821a commit 26c8d9c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public byte[] transform(ClassLoader loader, String className, Class<?> classBein

try {
MixinAgent.log(Level.INFO, "Redefining class {}", className);
return MixinAgent.this.classTransformer.transformClassBytes(null, className, classfileBuffer);
return MixinAgent.this.classTransformer.transformClassBytes(null, className.replace('/', '.'), classfileBuffer);
} catch (Throwable th) {
MixinAgent.log(Level.ERROR, "Error while re-transforming class {}", className, th);
return MixinAgent.ERROR_BYTECODE;
Expand Down

0 comments on commit 26c8d9c

Please sign in to comment.