Remove the catch of NPE because this issue had resolved at Jetty 12.0.2.
Closes gh-34235 Signed-off-by: Mengqi Xu <2663479778@qq.com>
This commit is contained in:
@@ -183,13 +183,7 @@ public class JettyWebSocketSession extends AbstractWebSocketSession<Session> {
|
|||||||
this.extensions = getExtensions(session);
|
this.extensions = getExtensions(session);
|
||||||
|
|
||||||
if (this.user == null) {
|
if (this.user == null) {
|
||||||
try {
|
this.user = session.getUpgradeRequest().getUserPrincipal();
|
||||||
this.user = session.getUpgradeRequest().getUserPrincipal();
|
|
||||||
}
|
|
||||||
catch (NullPointerException ex) {
|
|
||||||
// Necessary until https://github.com/eclipse/jetty.project/issues/10498 is resolved
|
|
||||||
logger.error("Failure from UpgradeRequest while getting Principal", ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user