Skip to content

Commit

Permalink
[#noissue] Checks if pinpoint test module exists before exporting the…
Browse files Browse the repository at this point in the history
… module in JDK9+
  • Loading branch information
ga-ram committed Apr 7, 2021
1 parent bb0d11b commit f113c40
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,12 @@ private void prepareAgentModule(final ClassLoader classLoader, JavaModule agentM

// Error:class com.navercorp.pinpoint.bootstrap.AgentBootLoader$1 cannot access class com.navercorp.pinpoint.test.PluginTestAgent (in module pinpoint.agent)
// because module pinpoint.agent does not export com.navercorp.pinpoint.test to unnamed module @4b9e13df
agentModule.addExports("com.navercorp.pinpoint.test", bootstrapModule);
final String pinpointTestModule = "com.navercorp.pinpoint.test";
if (agentModule.getPackages().contains(pinpointTestModule)) {
agentModule.addExports(pinpointTestModule, agentModule);
} else {
logger.info(pinpointTestModule + " package not found");
}

agentModule.addReads(bootstrapModule);

Expand Down

0 comments on commit f113c40

Please sign in to comment.