File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
libs/entitlement/src/main/java/org/elasticsearch/entitlement/instrumentation Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1111
1212import java .lang .instrument .ClassFileTransformer ;
1313import java .security .ProtectionDomain ;
14+ import java .util .Base64 ;
1415import java .util .Set ;
1516
1617/**
@@ -36,7 +37,11 @@ public byte[] transform(
3637 ) {
3738 if (classesToTransform .contains (className )) {
3839 // System.out.println("Transforming " + className);
39- return instrumenter .instrumentClass (className , classfileBuffer );
40+ byte [] bytes = instrumenter .instrumentClass (className , classfileBuffer );
41+ if (className .equals ("sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection" )) {
42+ System .out .println ("Transformed AbstractDelegateHttpsURLConnection:" + Base64 .getEncoder ().encodeToString (bytes ));
43+ }
44+ return bytes ;
4045 } else {
4146 // System.out.println("Not transforming " + className);
4247 return classfileBuffer ;
You can’t perform that action at this time.
0 commit comments