directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r607243 - /directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemachecker/SchemaChecker.java
Date Fri, 28 Dec 2007 13:58:43 GMT
Author: pamarcelot
Date: Fri Dec 28 05:58:43 2007
New Revision: 607243

URL: http://svn.apache.org/viewvc?rev=607243&view=rev
Log:
Fixed a NPE when the "dependenciesMap.get( at )" or "dependenciesMap.get( oc )" instructions
was returning null.

Modified:
    directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemachecker/SchemaChecker.java

Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemachecker/SchemaChecker.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemachecker/SchemaChecker.java?rev=607243&r1=607242&r2=607243&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemachecker/SchemaChecker.java
(original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemachecker/SchemaChecker.java
Fri Dec 28 05:58:43 2007
@@ -99,7 +99,11 @@
         public void attributeTypeModified( AttributeTypeImpl at )
         {
             List<Object> deps = new ArrayList<Object>();
-            deps.addAll( ( List<?> ) dependenciesMap.get( at ) );
+            List<?> atDeps = ( List<?> ) dependenciesMap.get( at );
+            if ( atDeps != null )
+            {
+                deps.addAll( atDeps );
+            }
 
             checkAttributeType( at );
 
@@ -112,7 +116,11 @@
         public void attributeTypeRemoved( AttributeTypeImpl at )
         {
             List<Object> deps = new ArrayList<Object>();
-            deps.addAll( ( List<?> ) dependenciesMap.get( at ) );
+            List<?> atDeps = ( List<?> ) dependenciesMap.get( at );
+            if ( atDeps != null )
+            {
+                deps.addAll( atDeps );
+            }
 
             removeSchemaObject( at );
 
@@ -137,7 +145,11 @@
         public void objectClassModified( ObjectClassImpl oc )
         {
             List<Object> deps = new ArrayList<Object>();
-            deps.addAll( ( List<?> ) dependenciesMap.get( oc ) );
+            List<?> ocDeps = ( List<?> ) dependenciesMap.get( oc );
+            if ( ocDeps != null )
+            {
+                deps.addAll( ocDeps );
+            }
 
             checkObjectClass( oc );
 
@@ -150,7 +162,11 @@
         public void objectClassRemoved( ObjectClassImpl oc )
         {
             List<Object> deps = new ArrayList<Object>();
-            deps.addAll( ( List<?> ) dependenciesMap.get( oc ) );
+            List<?> ocDeps = ( List<?> ) dependenciesMap.get( oc );
+            if ( ocDeps != null )
+            {
+                deps.addAll( ocDeps );
+            }
 
             removeSchemaObject( oc );
 



Mime
View raw message