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

Fixes #11096 - IllegalAccessException when invoking WebSocket endpoint methods in Jetty 12 #11229

Merged
merged 10 commits into from
Jan 25, 2024

Conversation

sbordet
Copy link
Contributor

@sbordet sbordet commented Jan 7, 2024

Changed JettyWebSocketFrameHandlerFactory to use an application MethodHandle.Lookup (rather than a server one) when creating listener metadata. This fixes the JPMS problem so that now JPMS applications do not need any additional configuration to invoke endpoints. The (acceptable) downside is that anonymous inner classes (that are not public) cannot be used as listener endpoints.

This change affects core and EE10 WebSocket; EE9 and EE8 WebSocket have not been fixed (so they allow anonymous inner classes but are broken in JPMS).

Renamed "connectLatch" fields to "openLatch" in test classes.

* Renamed module "jetty-home-tester" to "jetty-testers".
* Moved JettyHomeTester to module jetty-testers.
* Introduced JPMSTester, refactoring common code with JettyHomeTester.
* Changed File-based APIs in favor of Path APIs.
* Introduced ProcessWrapper to simplify process forking.
* Refactored tests to follow refactoring changes.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
…t methods in Jetty 12

Changed `JettyWebSocketFrameHandlerFactory` to use an application MethodHandle.Lookup (rather than a server one) when creating listener metadata.
This fixes the JPMS problem so that now JPMS applications do not need any additional configuration to invoke endpoints.
The (acceptable) downside is that anonymous inner classes (that are not public) cannot be used as listener endpoints.

This change affects core and EE10 WebSocket; EE9 and EE8 WebSocket have not been fixed (so they allow anonymous inner classes but are broken in JPMS).

Renamed "connectLatch" fields to "openLatch" in test classes.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
@lachlan-roberts
Copy link
Contributor

@sbordet this is failing JPMSWebSocketTest

@sbordet
Copy link
Contributor Author

sbordet commented Jan 12, 2024

@olamy when you can, please look at the failures of this PR... No idea why the artifact could not be found.

sbordet and others added 2 commits January 15, 2024 10:20
…sitive.

This allows Jenkins (which has an empty local repository) to build the artifacts transitively.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Signed-off-by: Olivier Lamy <olamy@apache.org>
olamy added 2 commits January 16, 2024 09:18
Signed-off-by: Olivier Lamy <olamy@apache.org>
Signed-off-by: Olivier Lamy <olamy@apache.org>
olamy
olamy previously approved these changes Jan 16, 2024
@olamy
Copy link
Member

olamy commented Jan 16, 2024

@sbordet fix was this 6f82329

Base automatically changed from fix/jetty-12/jpms-tester to jetty-12.0.x January 24, 2024 17:56
@sbordet sbordet dismissed stale reviews from lachlan-roberts and olamy January 24, 2024 17:56

The base branch was changed.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
@sbordet sbordet merged commit b5d0fd6 into jetty-12.0.x Jan 25, 2024
8 checks passed
@sbordet sbordet deleted the fix/jetty-12/jpms-websocket branch January 25, 2024 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

IllegalAccessException when invoking WebSocket end point methods in Jetty 12
4 participants