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:
Mengqi Xu 2025-01-10 22:08:45 +08:00 committed by Brian Clozel
parent 4d0f1729cb
commit dc98a7960a
1 changed files with 1 additions and 7 deletions

View File

@ -183,13 +183,7 @@ public class JettyWebSocketSession extends AbstractWebSocketSession<Session> {
this.extensions = getExtensions(session);
if (this.user == null) {
try {
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);
}
this.user = session.getUpgradeRequest().getUserPrincipal();
}
}