Skip to content

Commit

Permalink
Merge pull request #7982 from eclipse/jetty-10.0.x-7977-WebSocketNPE
Browse files Browse the repository at this point in the history
Issue #7977 - prevent possible NPE from UpgradeHttpServletRequest
  • Loading branch information
lachlan-roberts committed May 16, 2022
2 parents 01363fc + a93896b commit 5a62a77
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -430,15 +430,17 @@ public void setAttribute(String name, Object value)
{
if (request == null)
attributes.put(name, value);
request.setAttribute(name, value);
else
request.setAttribute(name, value);
}

@Override
public void removeAttribute(String name)
{
if (request == null)
attributes.remove(name);
request.removeAttribute(name);
else
request.removeAttribute(name);
}

@Override
Expand Down

0 comments on commit 5a62a77

Please sign in to comment.