File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
server/src/main/java/org/elasticsearch/bootstrap Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 4040import org .elasticsearch .entitlement .runtime .policy .entitlements .LoadNativeLibrariesEntitlement ;
4141import org .elasticsearch .env .Environment ;
4242import org .elasticsearch .index .IndexVersion ;
43+ import org .elasticsearch .index .codec .vectors .reflect .OffHeapReflectionUtils ;
4344import org .elasticsearch .jdk .JarHell ;
4445import org .elasticsearch .jdk .RuntimeVersionFeature ;
4546import org .elasticsearch .monitor .jvm .HotThreads ;
@@ -232,7 +233,9 @@ private static void initPhase2(Bootstrap bootstrap) throws IOException {
232233 // RequestHandlerRegistry and MethodHandlers classes do nontrivial static initialization which should always succeed but load
233234 // it now (before SM) to be sure
234235 RequestHandlerRegistry .class ,
235- MethodHandlers .class
236+ MethodHandlers .class ,
237+ // Ensure member access and reflection lookup are as expected
238+ OffHeapReflectionUtils .class
236239 );
237240
238241 // load the plugin Java modules and layers now for use in entitlements
@@ -394,7 +397,7 @@ private static void reflectiveStartProcess(ProcessBuilder pb) throws Exception {
394397 private static void ensureInitialized (Class <?>... classes ) {
395398 for (final var clazz : classes ) {
396399 try {
397- MethodHandles .publicLookup ().ensureInitialized (clazz );
400+ MethodHandles .lookup ().ensureInitialized (clazz );
398401 } catch (IllegalAccessException unexpected ) {
399402 throw new AssertionError (unexpected );
400403 }
You can’t perform that action at this time.
0 commit comments