jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jalka...@apache.org
Subject svn commit: r703235 - /incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/XMLUserDatabase.java
Date Thu, 09 Oct 2008 19:29:50 GMT
Author: jalkanen
Date: Thu Oct  9 12:29:49 2008
New Revision: 703235

URL: http://svn.apache.org/viewvc?rev=703235&view=rev
Log:
Adding a NPE check to fight an annoying problem at jspwiki.org.

Modified:
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/XMLUserDatabase.java

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/XMLUserDatabase.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/XMLUserDatabase.java?rev=703235&r1=703234&r2=703235&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/XMLUserDatabase.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/XMLUserDatabase.java Thu Oct 
9 12:29:49 2008
@@ -611,6 +611,9 @@
         checkForRefresh();
         
         NodeList users = c_dom.getElementsByTagName( USER_TAG );
+        
+        if( users == null ) return null;
+        
         for( int i = 0; i < users.getLength(); i++ )
         {
             Element user = (Element) users.item( i );



Mime
View raw message