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 #4985 - fix NPE related to use of Attributes.Wrapper getAttributeNameSet() #5004

Merged
merged 3 commits into from
Jul 6, 2020

Conversation

lachlan-roberts
Copy link
Contributor

Issue #4985

This PR tries to prevent any of the Attributes.Wrapper implementations from returning a value in getAttributeNameSet() that corresponds to a null attribute when getAttribute() is called with the name.

For each Attributes.Wrapper we now do the following:

  • Ensure that if the value is set to null, we do not add the corresponding attribute name to the set.
  • Don't determine attribute values lazily as we won't know whether its null or not.
  • Ensure that any conflicting attributes from the wrapped Attributes are removed.

@mpetzold has tested this branch and it seems to have fixed the NPE originally reported
see #4985 (comment)

The NPE is gone. However, I still have a problem with the WebSocket connection of Vaadin / Atmosphere. This may be something else or related configuration.

… null value

Signed-off-by: Lachlan Roberts <lachlan@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 but you can remove the TODO before merging

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants