jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomm...@apache.org
Subject svn commit: r1477164 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveType.java
Date Mon, 29 Apr 2013 15:56:40 GMT
Author: tommaso
Date: Mon Apr 29 15:56:40 2013
New Revision: 1477164

URL: http://svn.apache.org/r1477164
Log:
OAK-800 - fixed possible NPE in EffectiveType

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveType.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveType.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveType.java?rev=1477164&r1=1477163&r2=1477164&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveType.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveType.java
Mon Apr 29 15:56:40 2013
@@ -197,7 +197,10 @@ class EffectiveType {
         Set<String> names = newHashSet();
         for (NodeState type : types) {
             names.add(type.getProperty(JCR_NODETYPENAME).getValue(NAME));
-            Iterables.addAll(names, type.getProperty("oak:supertypes").getValue(NAMES));
+            PropertyState superTypes = type.getProperty("oak:supertypes");
+            if (superTypes != null) {
+                Iterables.addAll(names, superTypes.getValue(NAMES));
+            }
         }
         return names;
     }



Mime
View raw message