Skip to content

Commit 9b8e676

Browse files
committed
Upcast (?!) Java23EntitlementChecker to EntitlementChecker
1 parent c850b80 commit 9b8e676

File tree

1 file changed

+2
-0
lines changed
  • libs/entitlement/asm-provider/src/main/java/org/elasticsearch/entitlement/instrumentation/impl

1 file changed

+2
-0
lines changed

libs/entitlement/asm-provider/src/main/java/org/elasticsearch/entitlement/instrumentation/impl/InstrumenterImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import static org.objectweb.asm.ClassWriter.COMPUTE_FRAMES;
3838
import static org.objectweb.asm.ClassWriter.COMPUTE_MAXS;
3939
import static org.objectweb.asm.Opcodes.ACC_STATIC;
40+
import static org.objectweb.asm.Opcodes.CHECKCAST;
4041
import static org.objectweb.asm.Opcodes.INVOKEINTERFACE;
4142
import static org.objectweb.asm.Opcodes.INVOKESTATIC;
4243

@@ -323,6 +324,7 @@ private void invokeInstrumentationMethod() {
323324

324325
protected void pushEntitlementChecker(MethodVisitor mv) {
325326
mv.visitMethodInsn(INVOKESTATIC, handleClass, "instance", getCheckerClassMethodDescriptor, false);
327+
mv.visitTypeInsn(CHECKCAST, "org/elasticsearch/entitlement/bridge/EntitlementChecker");
326328
}
327329

328330
record ClassFileInfo(String fileName, byte[] bytecodes) {}

0 commit comments

Comments
 (0)