Skip to content

Commit 671a34a

Browse files
authored
Return null from transformer when not transforming (#125961) (#125974)
The transform API for instrumentation should return null when no transformation occurs. This commit fixes our entitlement transformer to return null instead of the original buffer. closes #125920
1 parent 151df9c commit 671a34a

File tree

1 file changed

+1
-1
lines changed
  • libs/entitlement/src/main/java/org/elasticsearch/entitlement/instrumentation

1 file changed

+1
-1
lines changed

libs/entitlement/src/main/java/org/elasticsearch/entitlement/instrumentation/Transformer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public byte[] transform(
4646
return instrumenter.instrumentClass(className, classfileBuffer, verifyClasses);
4747
} else {
4848
// System.out.println("Not transforming " + className);
49-
return classfileBuffer;
49+
return null;
5050
}
5151
}
5252

0 commit comments

Comments
 (0)