]> source.dussan.org Git - archiva.git/commitdiff
NPE free
authorOlivier Lamy <olamy@apache.org>
Fri, 21 Dec 2012 15:32:24 +0000 (15:32 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 21 Dec 2012 15:32:24 +0000 (15:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1424973 13f79535-47bb-0310-9956-ffa450edef68

redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultLoginService.java

index 126c29033d187006b5b8340b304c26fe1ab67ca4..ee3cc47895f257a0b69f616e31c3d2195556ff19 100644 (file)
@@ -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()