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

Fix an 'illegal reflective access' warning on startup #7476

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

eirikbakke
Copy link
Contributor

This commit removes the warning below, which was observed when starting a NetBeans Platform application:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.openide.util.RequestProcessor$TopLevelThreadGroup (file:/C:/Users/ebakke/.m2/repository/org/netbeans/api/org-openide-util/RELEASE180ULT7/org-openide-util-RELEASE180ULT7.jar) to method sun.awt.AppContext.getAppContext()
WARNING: Please consider reporting this to the maintainers of org.openide.util.RequestProcessor$TopLevelThreadGroup
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

This commit removes the warning below, which was observed when starting a NetBeans Platform application:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.openide.util.RequestProcessor$TopLevelThreadGroup (file:/C:/Users/ebakke/.m2/repository/org/netbeans/api/org-openide-util/RELEASE180ULT7/org-openide-util-RELEASE180ULT7.jar) to method sun.awt.AppContext.getAppContext()
WARNING: Please consider reporting this to the maintainers of org.openide.util.RequestProcessor$TopLevelThreadGroup
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
@eirikbakke eirikbakke added Platform [ci] enable platform tests (platform/*) ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Jun 13, 2024
Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

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

Wouldn't it make sense to remove the code completely? Even when considering developments like OpenWebStart, I assume, that the developers from OWS do the sane thing and don't try to share the same java process for multiple executions. Thus this indeed is mood.

@eirikbakke
Copy link
Contributor Author

Yeah, I can remove it. I have a habit of keeping old code around until it actually gets in the way, but this one is unlikely to ever be needed again.

Copy link
Member

@mbien mbien left a comment

Choose a reason for hiding this comment

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

looks good!

+1 for removing it instead of keeping dead code. Refactorings and cleanups are healthy for old code bases. Git will remember anyway :).

@eirikbakke
Copy link
Contributor Author

Thanks for reviewing! Merging...

@eirikbakke eirikbakke merged commit e1c9ff4 into apache:master Jun 21, 2024
33 checks passed
@mbien
Copy link
Member

mbien commented Jun 21, 2024

forgot to squash :)

@mbien mbien added this to the NB23 milestone Jun 21, 2024
@eirikbakke
Copy link
Contributor Author

D'oh, sorry about that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Platform [ci] enable platform tests (platform/*)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants