Skip to content

Commit b23f50b

Browse files
committed
Inline call to getVersionSpecificCheckerClass.
This makes the code a smidge more like main to ease the backport
1 parent 19e9f10 commit b23f50b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libs/entitlement/src/main/java/org/elasticsearch/entitlement/initialization/EntitlementInitialization.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ public static EntitlementChecker checker() {
6565
public static void initialize(Instrumentation inst) throws Exception {
6666
manager = initChecker();
6767

68-
var latestCheckerInterface = EntitlementCheckerUtils.getVersionSpecificCheckerClass(
69-
EntitlementChecker.class,
70-
Runtime.version().feature()
71-
);
7268
var verifyBytecode = Booleans.parseBoolean(System.getProperty("es.entitlements.verify_bytecode", "false"));
7369
if (verifyBytecode) {
7470
ensureClassesSensitiveToVerificationAreInitialized();
7571
}
7672

77-
DynamicInstrumentation.initialize(inst, latestCheckerInterface, verifyBytecode);
73+
DynamicInstrumentation.initialize(
74+
inst,
75+
EntitlementCheckerUtils.getVersionSpecificCheckerClass(EntitlementChecker.class, Runtime.version().feature()),
76+
verifyBytecode
77+
);
7878
}
7979

8080
/**

0 commit comments

Comments
 (0)