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

[#8890] ServiceLoader does not work properly in OpenJ9 #8903

Merged

Conversation

smilu97
Copy link
Member

@smilu97 smilu97 commented Jun 2, 2022

In OpenJ9 JDK11, All modules are forced to have System.bootLayer as their layer when they are defined by java.lang.Access::defineModule source. This difference between HotSpot and OpenJ9 is currently disrupting java.util.ServiceLoader finding service providers in OpenJ9.

This problem can be resolved by binding Java9ClassLoader to System.bootLayer manually, but I'm not sure this is a good idea.

@smilu97 smilu97 force-pushed the #8890_openj9_module_layer_binding branch from 536710d to ad65f36 Compare June 2, 2022 05:48
@codecov
Copy link

codecov bot commented Jun 2, 2022

Codecov Report

Merging #8903 (bc29bb0) into master (8a09c7c) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff            @@
##             master    #8903   +/-   ##
=========================================
  Coverage     39.83%   39.83%           
- Complexity    11838    11840    +2     
=========================================
  Files          3353     3353           
  Lines         91136    91140    +4     
  Branches      10093    10094    +1     
=========================================
+ Hits          36300    36303    +3     
- Misses        51733    51734    +1     
  Partials       3103     3103           
Impacted Files Coverage Δ
...navercorp/pinpoint/bootstrap/module/Providers.java 0.00% <0.00%> (ø)
...m/navercorp/pinpoint/rpc/client/ConnectFuture.java 70.83% <0.00%> (-8.34%) ⬇️
...tor/metric/datasource/DefaultDataSourceMetric.java 85.18% <0.00%> (-3.71%) ⬇️
...point/rpc/client/DefaultPinpointClientHandler.java 70.42% <0.00%> (-1.41%) ⬇️
...java/com/navercorp/pinpoint/rpc/DefaultFuture.java 76.14% <0.00%> (+1.83%) ⬆️
...rc/main/java/com/navercorp/pinpoint/test/Item.java 75.92% <0.00%> (+3.70%) ⬆️
...p/pinpoint/rpc/client/WriteFailFutureListener.java 81.25% <0.00%> (+25.00%) ⬆️
...pinpoint/rpc/ChannelWriteFailListenableFuture.java 71.42% <0.00%> (+28.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a09c7c...bc29bb0. Read the comment docs.

@smilu97 smilu97 force-pushed the #8890_openj9_module_layer_binding branch from ad65f36 to 971b7a8 Compare June 3, 2022 09:37
@smilu97 smilu97 force-pushed the #8890_openj9_module_layer_binding branch 3 times, most recently from 5535013 to e105eb8 Compare June 15, 2022 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment