Re-enable Jetty in spring-websocket tests

This commit is contained in:
rstoyanchev
2023-09-13 08:53:19 +01:00
parent 5d454390f0
commit 29e3acc887
2 changed files with 8 additions and 1 deletions

View File

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