maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r442912 - /maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/impl/DefaultUserManager.java
Date Wed, 13 Sep 2006 09:00:39 GMT
Author: carlos
Date: Wed Sep 13 02:00:39 2006
New Revision: 442912

URL: http://svn.apache.org/viewvc?view=rev&rev=442912
Log:
Avoid exception when user does not exist

Modified:
    maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/impl/DefaultUserManager.java

Modified: maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/impl/DefaultUserManager.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/impl/DefaultUserManager.java?view=diff&rev=442912&r1=442911&r2=442912
==============================================================================
--- maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/impl/DefaultUserManager.java
(original)
+++ maven/shared/trunk/maven-user/maven-user-model/src/main/java/org/apache/maven/user/model/impl/DefaultUserManager.java
Wed Sep 13 02:00:39 2006
@@ -115,8 +115,11 @@
     public void loginFailed( String username )
     {
         User user = getUser( username );
-        user.incrementFailedLoginAttempts();
-        updateUser( user );
+        if ( user != null )
+        {
+            user.incrementFailedLoginAttempts();
+            updateUser( user );
+        }
     }
 
     public void loginSuccessful( String username )



Mime
View raw message