Issue #7977 - prevent possible NPE from UpgradeHttpServletRequest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
b47d9c41d7
commit
a93896b22f
|
@ -430,6 +430,7 @@ public class UpgradeHttpServletRequest implements HttpServletRequest
|
|||
{
|
||||
if (request == null)
|
||||
attributes.put(name, value);
|
||||
else
|
||||
request.setAttribute(name, value);
|
||||
}
|
||||
|
||||
|
@ -438,6 +439,7 @@ public class UpgradeHttpServletRequest implements HttpServletRequest
|
|||
{
|
||||
if (request == null)
|
||||
attributes.remove(name);
|
||||
else
|
||||
request.removeAttribute(name);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue