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
Avoid illegal reflective access in CLI tests #26930
Avoid illegal reflective access in CLI tests #26930
Conversation
I've got a feeling that reflection hack might have been because other tests had ended up setting it, perhaps indirectly via |
@philwebb I tried without it and it horribly fails.
|
Thanks for trying that. It's strange that I guess |
@philwebb I'm confused. Where did you see
Yes, that's the idea behind the PR. |
I didn't look in detail, but I guess that In a regular app the |
That would surprise me in the CLI project. It might have been in other submodules, but then again they run in separate worker VMs (at least they should be) and thus don't interfere with each other. |
Thanks @dreis2211. I've merged this to 2.5.x and forward to |
Hi,
this is an attempt to get rid of illegal reflective access warnings in CLI tests. The idea is to use
TomcatURLStreamHandlerFactory.disable();
and thus not registering anyfactory
inURL
that we would otherwise need to reset via reflection.As this is part of the overall JDK 17 story under #26767, it should probably go into 2.5.x.
Let me know what you think.
Cheers,
Christoph
P.S.: I have this flaky / failing test that seems unrelated, but for completeness reasons: