Merge pull request #7982 from eclipse/jetty-10.0.x-7977-WebSocketNPE
Issue #7977 - prevent possible NPE from UpgradeHttpServletRequest
This commit is contained in:
commit
5a62a77d03
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue