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

Issue #4888 Ensure HttpSessionListener can access session via #5220

Merged
merged 1 commit into from Sep 2, 2020

Conversation

janbartel
Copy link
Contributor

See issue #4888

The stack trace provided by @manovotn shows weld tries to access a session via a Request from inside a HttpSessionListener. Although that code path is not supported in the servlet api, we want to be as code-safe as possible.

For a description of the cause of the problem, see my explanation in issue #4888

This fix ensures that the newly created session is set onto the Request before any HttpSessionListeners are called.

Request.getSession()

Signed-off-by: Jan Bartel <janb@webtide.com>
Copy link
Contributor

@gregw gregw left a comment

Choose a reason for hiding this comment

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

LGTM

Jetty 9.4.32 automation moved this from In progress to Reviewer approved Sep 2, 2020
@janbartel janbartel merged commit ef0c752 into jetty-9.4.x Sep 2, 2020
Jetty 9.4.32 automation moved this from Reviewer approved to Done Sep 2, 2020
@janbartel janbartel deleted the jetty-9.4.x-4888-NPE-request-get-session branch September 2, 2020 09:53
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
Jetty 9.4.32
  
Done
Development

Successfully merging this pull request may close these issues.

Request getSession() method throws IllegalStateException when Session exists
2 participants