Issue #7977 - prevent possible NPE from UpgradeHttpServletRequest

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2022-05-12 16:10:15 +10:00
parent b47d9c41d7
commit a93896b22f
1 changed files with 4 additions and 2 deletions

View File

@ -430,7 +430,8 @@ public class UpgradeHttpServletRequest implements HttpServletRequest
{
if (request == null)
attributes.put(name, value);
request.setAttribute(name, value);
else
request.setAttribute(name, value);
}
@Override
@ -438,7 +439,8 @@ public class UpgradeHttpServletRequest implements HttpServletRequest
{
if (request == null)
attributes.remove(name);
request.removeAttribute(name);
else
request.removeAttribute(name);
}
@Override