Skip to content

Commit

Permalink
Issue #7977 - prevent possible NPE from UpgradeHttpServletRequest
Browse files Browse the repository at this point in the history
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
  • Loading branch information
lachlan-roberts committed May 12, 2022
1 parent b47d9c4 commit a93896b
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 a93896b

Please sign in to comment.