From a522ed98fbcdecf8fd1d4f7977d9567f3cf42317 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Fri, 21 Dec 2012 15:32:24 +0000 Subject: [PATCH] NPE free git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1424973 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva/redback/rest/services/DefaultLoginService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultLoginService.java b/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultLoginService.java index 126c2903..ee3cc478 100644 --- a/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultLoginService.java +++ b/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultLoginService.java @@ -205,7 +205,7 @@ public class DefaultLoginService SecuritySession securitySession = httpAuthenticator.getSecuritySession( httpServletRequest.getSession( true ) ); Boolean isLogged = securitySession != null; log.debug( "isLogged {}", isLogged ); - return isLogged ? buildRestUser( securitySession.getUser() ) : null; + return isLogged && securitySession.getUser() != null ? buildRestUser( securitySession.getUser() ) : null; } public Boolean logout()