File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
core/src/main/java/io/undertow/server/session Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -228,15 +228,18 @@ private String createAndSaveNewID(SessionImpl session) {
228228 public Session getSession (final HttpServerExchange serverExchange , final SessionConfig config ) {
229229 if (serverExchange != null ) {
230230 SessionImpl newSession = serverExchange .getAttachment (NEW_SESSION );
231- if (newSession != null ) {
231+ if (newSession != null ) {
232232 return newSession ;
233233 }
234- } else {
235- return null ;
236234 }
235+
236+ if (config == null ) {
237+ throw UndertowMessages .MESSAGES .couldNotFindSessionCookieConfig ();
238+ }
239+
237240 String sessionId = config .findSessionId (serverExchange );
238241 InMemorySessionManager .SessionImpl session = (SessionImpl ) getSession (sessionId );
239- if (session != null && serverExchange != null ) {
242+ if (session != null && serverExchange != null ) {
240243 session .requestStarted (serverExchange );
241244 }
242245 return session ;
You can’t perform that action at this time.
0 commit comments