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

[WFCORE-6346] Module java.base must open java.net package to all unnamed modules #5498

Merged
merged 1 commit into from May 11, 2023

Conversation

ropalka
Copy link
Contributor

@ropalka ropalka commented May 9, 2023

@ropalka ropalka requested a review from bstansberry May 9, 2023 17:35
@github-actions github-actions bot added the deps-ok Dependencies have been checked, and there are no significant changes label May 9, 2023
@bstansberry
Copy link
Contributor

@ropalka @fjuma This seems like something to fix in the 20.x branch as well, for this month's WF 28.0.1, as it seems like a regression in WF 28.0.0 via the upgrade that brought in https://issues.redhat.com/browse/WEJBHTTP-108.

@fjuma
Copy link
Contributor

fjuma commented May 9, 2023

Good point, thanks @bstansberry.

@ropalka
Copy link
Contributor Author

ropalka commented May 9, 2023

@ropalka @fjuma This seems like something to fix in the 20.x branch as well, for this month's WF 28.0.1, as it seems like a regression in WF 28.0.0 via the upgrade that brought in https://issues.redhat.com/browse/WEJBHTTP-108.

Yes, I agree.

@@ -273,9 +273,11 @@ private void testJPMSArguments(final Collection<String> command, final int expec
assertArgumentExists(command, "--add-exports=java.naming/com.sun.jndi.url.ldap=ALL-UNNAMED", expectedCount);
assertArgumentExists(command, "--add-exports=java.naming/com.sun.jndi.url.ldaps=ALL-UNNAMED", expectedCount);
assertArgumentExists(command, "--add-exports=jdk.naming.dns/com.sun.jndi.dns=ALL-UNNAMED", expectedCount);
assertArgumentExists(command, "--add-opens=java.base/java.lang=ALL-UNNAMED", expectedCount);
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems as out of scope of this change.

Double checking if this is intentional.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is fine; this test is testing that the expected JVM modular options are also used when launching jar files or the server for the tests

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, this was just a missing assert that Rio took the opportunity to correct.

rem Needed for marshalling of proxies
set "DEFAULT_MODULAR_JVM_OPTIONS=!DEFAULT_MODULAR_JVM_OPTIONS! --add-opens=java.base/java.lang.reflect=ALL-UNNAMED"
rem Needed by JBoss Marshalling
set "DEFAULT_MODULAR_JVM_OPTIONS=!DEFAULT_MODULAR_JVM_OPTIONS! --add-opens=java.base/java.io=ALL-UNNAMED"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this intentional? Different open than java.net

Copy link
Collaborator

Choose a reason for hiding this comment

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

@mchoma This one should be fine, it was already there and down from L53 to keep it in the same order as it was declared in the other files

Copy link
Collaborator

@yersan yersan left a comment

Choose a reason for hiding this comment

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

LGTM, so approving from my side

rem Needed for marshalling of proxies
set "DEFAULT_MODULAR_JVM_OPTIONS=!DEFAULT_MODULAR_JVM_OPTIONS! --add-opens=java.base/java.lang.reflect=ALL-UNNAMED"
rem Needed by JBoss Marshalling
set "DEFAULT_MODULAR_JVM_OPTIONS=!DEFAULT_MODULAR_JVM_OPTIONS! --add-opens=java.base/java.io=ALL-UNNAMED"
Copy link
Collaborator

Choose a reason for hiding this comment

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

@mchoma This one should be fine, it was already there and down from L53 to keep it in the same order as it was declared in the other files

@@ -273,9 +273,11 @@ private void testJPMSArguments(final Collection<String> command, final int expec
assertArgumentExists(command, "--add-exports=java.naming/com.sun.jndi.url.ldap=ALL-UNNAMED", expectedCount);
assertArgumentExists(command, "--add-exports=java.naming/com.sun.jndi.url.ldaps=ALL-UNNAMED", expectedCount);
assertArgumentExists(command, "--add-exports=jdk.naming.dns/com.sun.jndi.dns=ALL-UNNAMED", expectedCount);
assertArgumentExists(command, "--add-opens=java.base/java.lang=ALL-UNNAMED", expectedCount);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is fine; this test is testing that the expected JVM modular options are also used when launching jar files or the server for the tests

@fjuma
Copy link
Contributor

fjuma commented May 10, 2023

@ropalka When you get a chance, please create a PR against the 20.x branch. Thanks!

@ropalka
Copy link
Contributor Author

ropalka commented May 10, 2023

Here you go @fjuma : #5500

Copy link
Contributor

@bstansberry bstansberry left a comment

Choose a reason for hiding this comment

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

@ropalka This LGTM but if there isn't one already, please file a JIRA to update https://github.com/wildfly/wildfly/blob/main/pom.xml#L175-L207

@ropalka
Copy link
Contributor Author

ropalka commented May 11, 2023

Thanks for spotting this out @bstansberry ! Here you go: wildfly/wildfly#16835

@yersan yersan added the ready-for-merge This PR is ready to be merged and fulfills all requirements label May 11, 2023
@yersan yersan merged commit 68356a9 into wildfly:main May 11, 2023
12 checks passed
@yersan
Copy link
Collaborator

yersan commented May 11, 2023

Thanks, @ropalka and all involved in the review

@ropalka ropalka deleted the WFCORE-6346 branch May 11, 2023 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
21.0.0.Beta1 deps-ok Dependencies have been checked, and there are no significant changes ready-for-merge This PR is ready to be merged and fulfills all requirements
Projects
None yet
6 participants