File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
distribution/tools/server-cli/src/main/java/org/elasticsearch/server/cli Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -167,13 +167,16 @@ private static Stream<String> maybeAttachEntitlementAgent(boolean useEntitlement
167167 } catch (IOException e ) {
168168 throw new IllegalStateException ("Failed to list entitlement jars in: " + dir , e );
169169 }
170- String modulesThatCallBridge = "java.logging" ;
170+ // We instrument classes in these modules to call the bridge. Because the bridge gets patched
171+ // into java.base, we must export the bridge from java.base to these modules.
172+ String modulesContainingEntitlementInstrumentation = "java.logging" ;
171173 return Stream .of (
172174 "-Des.entitlements.enabled=true" ,
173175 "-XX:+EnableDynamicAgentLoading" ,
174176 "-Djdk.attach.allowAttachSelf=true" ,
175177 "--patch-module=java.base=" + bridgeJar ,
176- "--add-exports=java.base/org.elasticsearch.entitlement.bridge=org.elasticsearch.entitlement," + modulesThatCallBridge
178+ "--add-exports=java.base/org.elasticsearch.entitlement.bridge=org.elasticsearch.entitlement,"
179+ + modulesContainingEntitlementInstrumentation
177180 );
178181 }
179182}
You can’t perform that action at this time.
0 commit comments