archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1424973 - /archiva/redback/redback-core/trunk/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultLoginService.java
Date Fri, 21 Dec 2012 15:32:24 GMT
Author: olamy
Date: Fri Dec 21 15:32:24 2012
New Revision: 1424973

URL: http://svn.apache.org/viewvc?rev=1424973&view=rev
Log:
NPE free

Modified:
    archiva/redback/redback-core/trunk/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultLoginService.java

Modified: archiva/redback/redback-core/trunk/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultLoginService.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultLoginService.java?rev=1424973&r1=1424972&r2=1424973&view=diff
==============================================================================
--- archiva/redback/redback-core/trunk/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultLoginService.java
(original)
+++ archiva/redback/redback-core/trunk/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultLoginService.java
Fri Dec 21 15:32:24 2012
@@ -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()



Mime
View raw message