Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#noissue] PinpointPluginTestSuite JDK9+ compatibility #7415

Conversation

acafela
Copy link
Contributor

@acafela acafela commented Nov 13, 2020

During the plugin integration test, I found that PinpointPluginTestSuite doesn't work on jdk9+.

I modified this so that it can be executed on jdk9+.
Please let me know if it's a issue to be resolved directly by team or if it's not within the scope of pinpoint support.
Then I'll close it.

1. In jdk 9+ environment, the SharedProcessManager.fork() running command does not have -cp argument.

This is because of the ClassLoader changed from jdk9+.
So i modified not to use URLClassLoader in jdk9+.

2. When using @JvmVersion(9+) annontation

class com.navercorp.pinpoint.bootstrapAgentBootLoader$1 cannot access class com.navercorp.pinpoint.test.PluginTestAgent exception occurred

This is because the PluginTestAgent cannot be accessed from the external module. So I added it to the export list.

Thank you.

return getClassPathList(cl, classPathCandidates);
}

private List<String> getJava9ClassPathList(String[] classPathCandidates) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The design of classloader dependent code seems to be bad.
If everything is fine, your code looks much better.
Could you replace the old code with yours?

     cl = cl.getParent();
     if (cl == null) {
         break;
      }

There may be a problem with the above code, but I'm not sure.
Please check that it works properly in all tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your review @emeroad
I'll change the old code and make sure there are no problems with all the tests.
When this test is completed i will commit again :)

@smilu97
Copy link
Contributor

smilu97 commented Nov 16, 2022

resolved in #9416. Thank you for issuing!

@smilu97 smilu97 closed this Nov 16, 2022
@emeroad emeroad linked an issue Nov 17, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PinpointPluginTestSuite JDK9+ compatibility
3 participants