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

Compilability: TestUsageNamingConvention is not compliant with the future Java version. #751

Open
ZhengLin-Li opened this issue Mar 6, 2023 · 7 comments

Comments

@ZhengLin-Li
Copy link
Contributor

I am testing TestUsageNamingConvention and got the following warning:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.beust.jcommander.Parameterized (file:/C:/Users/11258/.m2/repository/com/beust/jcommander/1.82/jcommander-1.82.jar) to method java.lang.Class.checkPackageAccess(java.lang.SecurityManager,java.lang.ClassLoader,boolean)
WARNING: Please consider reporting this to the maintainers of com.beust.jcommander.Parameterized
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Acutally, when I test it with JDK 18, it shows the following error:

java.lang.reflect.InaccessibleObjectException: Unable to make private void java.lang.Class.checkPackageAccess(java.lang.SecurityManager,java.lang.ClassLoader,boolean) accessible: module java.base does not "opens java.lang" to unnamed module @204f30ec
at sqlancer.TestUsageNamingConvention.testNonEmptyDescription(TestUsageNamingConvention.java:25)

Screenshots:
Java 11:
image

Java 18:
image

@mrigger
Copy link
Contributor

mrigger commented Mar 6, 2023

That's interesting! Not really sure how to fix this. From the warning, this seems to be an issue with JCommander?

Please consider reporting this to the maintainers of com.beust.jcommander.Parameterized

I found an issue referencing this warning at cbeust/jcommander#437.

@ZhengLin-Li
Copy link
Contributor Author

Yes, I found cbeust/jcommander#437 too, but it was reported in 2018 and there have been no updates till now.🤣 Besides, it can run successfully but only warn on Java 11, but it cannot run successfully on Java 18, so I'd suggest that maybe let's leave this open?

@mrigger
Copy link
Contributor

mrigger commented Mar 6, 2023

Perhaps you can also comment on the JCommander issue (or I can if you prefer), so that this might get fixed in the future?

@ZhengLin-Li
Copy link
Contributor Author

Perhaps you can also comment on the JCommander issue (or I can if you prefer), so that this might get fixed in the future?

Sure, I have commented. Hope they will fix this soon.

@rjbpoddar
Copy link

HEy ! Zhenglin is the issue solved ??

@ZhengLin-Li
Copy link
Contributor Author

hi @rjbpoddar Not yet.

@sachinnandan
Copy link

I want to fix this issue. Is it solved ?? @ZhengLin-Li

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

No branches or pull requests

4 participants