directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r503452 - /directory/apacheds/branches/1.0/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
Date Sun, 04 Feb 2007 18:34:06 GMT
Author: elecharny
Date: Sun Feb  4 10:34:05 2007
New Revision: 503452

URL: http://svn.apache.org/viewvc?view=rev&rev=503452
Log:
Fixed a potential NPE by testing the length of the objectClass array (testing it against null
is not enough)

Modified:
    directory/apacheds/branches/1.0/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java

Modified: directory/apacheds/branches/1.0/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?view=diff&rev=503452&r1=503451&r2=503452
==============================================================================
--- directory/apacheds/branches/1.0/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
(original)
+++ directory/apacheds/branches/1.0/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
Sun Feb  4 10:34:05 2007
@@ -998,7 +998,7 @@
                 
                 List ocSuperiors = (List)superiors.get( objectClass.getOid() );
                 
-                if ( ocSuperiors != null )
+                if ( ( ocSuperiors != null ) && ( ocSuperiors.size() != 0 ) )
                 {
                     Iterator iter = ocSuperiors.iterator();
                     



Mime
View raw message