Author: angela
Date: Wed Apr 10 14:58:04 2019
New Revision: 1857255

URL: http://svn.apache.org/viewvc?rev=1857255&view=rev
Log:
OAK-8216 : Consistently add nullability annotations with spi.nodetype package 
and implementation

Modified:
    
jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/DefinitionProvider.java
    
jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/EffectiveNodeType.java
    
jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/EffectiveNodeTypeProvider.java
    
jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/package-info.java
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveNodeTypeImpl.java
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ReadOnlyNodeTypeManager.java

Modified: 
jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/DefinitionProvider.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/DefinitionProvider.java?rev=1857255&r1=1857254&r2=1857255&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/DefinitionProvider.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/DefinitionProvider.java
 Wed Apr 10 14:58:04 2019
@@ -62,7 +62,7 @@ public interface DefinitionProvider {
      * @throws RepositoryException If another error occurs.
      */
     @NotNull
-    NodeDefinition getDefinition(Tree parent, Tree targetNode)
+    NodeDefinition getDefinition(@NotNull Tree parent, @NotNull Tree 
targetNode)
             throws ConstraintViolationException, RepositoryException;
 
     /**
@@ -76,8 +76,7 @@ public interface DefinitionProvider {
      * @throws RepositoryException If another error occurs.
      */
     @NotNull
-    PropertyDefinition getDefinition(
-            Tree parent, PropertyState propertyState, boolean exactTypeMatch)
+    PropertyDefinition getDefinition(@NotNull Tree parent, @NotNull 
PropertyState propertyState, boolean exactTypeMatch)
             throws ConstraintViolationException, RepositoryException;
 
 }

Modified: 
jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/EffectiveNodeType.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/EffectiveNodeType.java?rev=1857255&r1=1857254&r2=1857255&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/EffectiveNodeType.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/EffectiveNodeType.java
 Wed Apr 10 14:58:04 2019
@@ -25,35 +25,40 @@ import javax.jcr.nodetype.PropertyDefini
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Tree;
 import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 import org.osgi.annotation.versioning.ProviderType;
 
 @ProviderType
 public interface EffectiveNodeType {
-    boolean includesNodeType(String nodeTypeName);
+    boolean includesNodeType(@NotNull String nodeTypeName);
 
-    boolean includesNodeTypes(String[] nodeTypeNames);
+    boolean includesNodeTypes(@NotNull String[] nodeTypeNames);
 
-    boolean supportsMixin(String mixin);
+    boolean supportsMixin(@NotNull String mixin);
 
+    @NotNull
     Iterable<NodeDefinition> getNodeDefinitions();
 
+    @NotNull
     Iterable<PropertyDefinition> getPropertyDefinitions();
 
+    @NotNull
     Iterable<NodeDefinition> getAutoCreateNodeDefinitions();
 
+    @NotNull
     Iterable<PropertyDefinition> getAutoCreatePropertyDefinitions();
 
+    @NotNull
     Iterable<NodeDefinition> getMandatoryNodeDefinitions();
 
+    @NotNull
     Iterable<PropertyDefinition> getMandatoryPropertyDefinitions();
 
     @NotNull
-    Iterable<NodeDefinition> getNamedNodeDefinitions(
-            String oakName);
+    Iterable<NodeDefinition> getNamedNodeDefinitions(@NotNull String oakName);
 
     @NotNull
-    Iterable<PropertyDefinition> getNamedPropertyDefinitions(
-            String oakName);
+    Iterable<PropertyDefinition> getNamedPropertyDefinitions(@NotNull String 
oakName);
 
     @NotNull
     Iterable<NodeDefinition> getResidualNodeDefinitions();
@@ -61,22 +66,20 @@ public interface EffectiveNodeType {
     @NotNull
     Iterable<PropertyDefinition> getResidualPropertyDefinitions();
 
-    void checkSetProperty(PropertyState property) throws RepositoryException;
+    void checkSetProperty(@NotNull PropertyState property) throws 
RepositoryException;
 
-    void checkRemoveProperty(PropertyState property) throws 
RepositoryException;
+    void checkRemoveProperty(@NotNull PropertyState property) throws 
RepositoryException;
 
-    void checkMandatoryItems(Tree tree) throws ConstraintViolationException;
+    void checkMandatoryItems(@NotNull Tree tree) throws 
ConstraintViolationException;
 
     void checkOrderableChildNodes() throws 
UnsupportedRepositoryOperationException;
 
-    PropertyDefinition getPropertyDefinition(
-            String propertyName, boolean isMultiple,
-            int type, boolean exactTypeMatch)
-            throws ConstraintViolationException;
-
-    PropertyDefinition getPropertyDefinition(String name, int type, boolean 
unknownMultiple);
-
-    NodeDefinition getNodeDefinition(
-            String childName, EffectiveNodeType childEffective)
-            throws ConstraintViolationException;
+    @NotNull
+    PropertyDefinition getPropertyDefinition(@NotNull String propertyName, 
boolean isMultiple, int type, boolean exactTypeMatch) throws 
ConstraintViolationException;
+
+    @Nullable
+    PropertyDefinition getPropertyDefinition(@NotNull String name, int type, 
boolean unknownMultiple);
+
+    @NotNull
+    NodeDefinition getNodeDefinition(@NotNull String childName, @Nullable 
EffectiveNodeType childEffective) throws ConstraintViolationException;
 }

Modified: 
jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/EffectiveNodeTypeProvider.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/EffectiveNodeTypeProvider.java?rev=1857255&r1=1857254&r2=1857255&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/EffectiveNodeTypeProvider.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/EffectiveNodeTypeProvider.java
 Wed Apr 10 14:58:04 2019
@@ -40,7 +40,7 @@ public interface EffectiveNodeTypeProvid
      * @param nodeTypeName The internal oak name of the node type to be tested.
      * @return true if the specified node is of the given node type.
      */
-    boolean isNodeType(Tree tree, String nodeTypeName);
+    boolean isNodeType(@NotNull Tree tree, @NotNull String nodeTypeName);
 
     /**
      * Returns {@code true} if {@code typeName} is of the specified primary 
node
@@ -65,7 +65,7 @@ public interface EffectiveNodeTypeProvid
      * @param superName The internal oak name of the super type to be tested 
for.
      * @return {@code true} if the specified node type is of the given node 
type.
      */
-    boolean isNodeType(String typeName, String superName);
+    boolean isNodeType(@NotNull String typeName, @NotNull String superName);
 
     /**
      * Calculates and returns the effective node types of the given node.
@@ -77,7 +77,8 @@ public interface EffectiveNodeTypeProvid
      * @throws RepositoryException if the type information can not be accessed
      * @see <a href="http://www.jcp.org/en/jsr/detail?id=283";>JCR 2.0 
Specification, Section 3.7.6.5</a>
      */
-    EffectiveNodeType getEffectiveNodeType(Node targetNode) throws 
RepositoryException;
+    @NotNull
+    EffectiveNodeType getEffectiveNodeType(@NotNull Node targetNode) throws 
RepositoryException;
 
     /**
      * Calculates and returns the effective node types of the given tree.
@@ -89,5 +90,6 @@ public interface EffectiveNodeTypeProvid
      * @throws RepositoryException if the type information can not be accessed,
      * @see <a href="http://www.jcp.org/en/jsr/detail?id=283";>JCR 2.0 
Specification, Section 3.7.6.5</a>
      */
-    EffectiveNodeType getEffectiveNodeType(Tree tree) throws 
RepositoryException;
+    @NotNull
+    EffectiveNodeType getEffectiveNodeType(@NotNull Tree tree) throws 
RepositoryException;
 }

Modified: 
jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/package-info.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/package-info.java?rev=1857255&r1=1857254&r2=1857255&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/package-info.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/nodetype/package-info.java
 Wed Apr 10 14:58:04 2019
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-@Version("1.0.1")
+@Version("1.0.2")
 package org.apache.jackrabbit.oak.spi.nodetype;
 
 import org.osgi.annotation.versioning.Version;

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveNodeTypeImpl.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveNodeTypeImpl.java?rev=1857255&r1=1857254&r2=1857255&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveNodeTypeImpl.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveNodeTypeImpl.java
 Wed Apr 10 14:58:04 2019
@@ -40,6 +40,7 @@ import org.apache.jackrabbit.oak.api.Tre
 import org.apache.jackrabbit.oak.plugins.value.jcr.PartialValueFactory;
 import org.apache.jackrabbit.oak.spi.nodetype.EffectiveNodeType;
 import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -63,9 +64,7 @@ class EffectiveNodeTypeImpl implements E
 
     private final PartialValueFactory valueFactory;
 
-    EffectiveNodeTypeImpl(
-            NodeTypeImpl primary, NodeTypeImpl[] mixins,
-            ReadOnlyNodeTypeManager ntMgr) {
+    EffectiveNodeTypeImpl(@NotNull NodeTypeImpl primary, @NotNull 
NodeTypeImpl[] mixins, @NotNull ReadOnlyNodeTypeManager ntMgr) {
         this.ntMgr = ntMgr;
         this.valueFactory = new PartialValueFactory(ntMgr.getNamePathMapper());
 
@@ -84,11 +83,11 @@ class EffectiveNodeTypeImpl implements E
         }
     }
 
-    EffectiveNodeTypeImpl(NodeTypeImpl primary, ReadOnlyNodeTypeManager ntMgr) 
{
+    EffectiveNodeTypeImpl(@NotNull NodeTypeImpl primary, @NotNull 
ReadOnlyNodeTypeManager ntMgr) {
         this(primary, NO_MIXINS, ntMgr);
     }
 
-    private void addNodeType(NodeTypeImpl type) {
+    private void addNodeType(@NotNull NodeTypeImpl type) {
         String name = type.getName();
         if (!nodeTypes.containsKey(name)) {
             nodeTypes.put(name, type);
@@ -107,7 +106,7 @@ class EffectiveNodeTypeImpl implements E
      * @return {@code true} if the given node type is included, otherwise 
{@code false}.
      */
     @Override
-    public boolean includesNodeType(String nodeTypeName) {
+    public boolean includesNodeType(@NotNull String nodeTypeName) {
         return nodeTypes.containsKey(nodeTypeName);
     }
 
@@ -121,7 +120,7 @@ class EffectiveNodeTypeImpl implements E
      *         otherwise {@code false}
      */
     @Override
-    public boolean includesNodeTypes(String[] nodeTypeNames) {
+    public boolean includesNodeTypes(@NotNull String[] nodeTypeNames) {
         for (String ntName : nodeTypeNames) {
             if (!includesNodeType(ntName)) {
                 return false;
@@ -137,7 +136,7 @@ class EffectiveNodeTypeImpl implements E
      * @return {@code true} if the mixin type is supported, otherwise {@code 
false}
      */
     @Override
-    public boolean supportsMixin(String mixin) {
+    public boolean supportsMixin(@NotNull String mixin) {
         if (includesNodeType(mixin)) {
             return true;
         }
@@ -155,6 +154,7 @@ class EffectiveNodeTypeImpl implements E
         return true;
     }
 
+    @NotNull
     @Override
     public Iterable<NodeDefinition> getNodeDefinitions() {
         List<NodeDefinition> definitions = new ArrayList<NodeDefinition>();
@@ -164,6 +164,7 @@ class EffectiveNodeTypeImpl implements E
         return definitions;
     }
 
+    @NotNull
     @Override
     public Iterable<PropertyDefinition> getPropertyDefinitions() {
         List<PropertyDefinition> definitions = new 
ArrayList<PropertyDefinition>();
@@ -173,6 +174,7 @@ class EffectiveNodeTypeImpl implements E
         return definitions;
     }
 
+    @NotNull
     @Override
     public Iterable<NodeDefinition> getAutoCreateNodeDefinitions() {
         return Iterables.filter(getNodeDefinitions(), new 
Predicate<NodeDefinition>() {
@@ -183,6 +185,7 @@ class EffectiveNodeTypeImpl implements E
         });
     }
 
+    @NotNull
     @Override
     public Iterable<PropertyDefinition> getAutoCreatePropertyDefinitions() {
         return Iterables.filter(getPropertyDefinitions(), new 
Predicate<PropertyDefinition>() {
@@ -193,6 +196,7 @@ class EffectiveNodeTypeImpl implements E
         });
     }
 
+    @NotNull
     @Override
     public Iterable<NodeDefinition> getMandatoryNodeDefinitions() {
         return Iterables.filter(getNodeDefinitions(), new 
Predicate<NodeDefinition>() {
@@ -203,6 +207,7 @@ class EffectiveNodeTypeImpl implements E
         });
     }
 
+    @NotNull
     @Override
     public Iterable<PropertyDefinition> getMandatoryPropertyDefinitions() {
         return Iterables.filter(getPropertyDefinitions(), new 
Predicate<PropertyDefinition>() {
@@ -219,10 +224,9 @@ class EffectiveNodeTypeImpl implements E
      * @param oakName An internal oak name.
      * @return All node definitions that match the given internal oak name.
      */
-    @Override
     @NotNull
-    public Iterable<NodeDefinition> getNamedNodeDefinitions(
-            final String oakName) {
+    @Override
+    public Iterable<NodeDefinition> getNamedNodeDefinitions(@NotNull final 
String oakName) {
         return Iterables.concat(Iterables.transform(
                 nodeTypes.values(),
                 new Function<NodeTypeImpl, Iterable<NodeDefinition>>() {
@@ -239,10 +243,9 @@ class EffectiveNodeTypeImpl implements E
      * @param oakName An internal oak name.
      * @return All property definitions that match the given internal oak name.
      */
-    @Override
     @NotNull
-    public Iterable<PropertyDefinition> getNamedPropertyDefinitions(
-            String oakName) {
+    @Override
+    public Iterable<PropertyDefinition> getNamedPropertyDefinitions(@NotNull 
String oakName) {
         List<PropertyDefinition> definitions = newArrayList();
         for (NodeTypeImpl type : nodeTypes.values()) {
             
definitions.addAll(type.getDeclaredNamedPropertyDefinitions(oakName));
@@ -255,8 +258,8 @@ class EffectiveNodeTypeImpl implements E
      *
      * @return All residual node definitions.
      */
-    @Override
     @NotNull
+    @Override
     public Iterable<NodeDefinition> getResidualNodeDefinitions() {
         List<NodeDefinition> definitions = newArrayList();
         for (NodeTypeImpl type : nodeTypes.values()) {
@@ -270,8 +273,8 @@ class EffectiveNodeTypeImpl implements E
      *
      * @return All residual property definitions.
      */
-    @Override
     @NotNull
+    @Override
     public Iterable<PropertyDefinition> getResidualPropertyDefinitions() {
         List<PropertyDefinition> definitions = newArrayList();
         for (NodeTypeImpl type : nodeTypes.values()) {
@@ -281,7 +284,7 @@ class EffectiveNodeTypeImpl implements E
     }
 
     @Override
-    public void checkSetProperty(PropertyState property) throws 
RepositoryException {
+    public void checkSetProperty(@NotNull PropertyState property) throws 
RepositoryException {
         PropertyDefinition definition = getDefinition(property);
         if (definition.isProtected()) {
             return;
@@ -302,7 +305,7 @@ class EffectiveNodeTypeImpl implements E
     }
 
     @Override
-    public void checkRemoveProperty(PropertyState property) throws 
RepositoryException {
+    public void checkRemoveProperty(@NotNull PropertyState property) throws 
RepositoryException {
         PropertyDefinition definition = getDefinition(property);
         if (definition.isProtected()) {
             return;
@@ -314,7 +317,7 @@ class EffectiveNodeTypeImpl implements E
     }
 
     @Override
-    public void checkMandatoryItems(Tree tree) throws 
ConstraintViolationException {
+    public void checkMandatoryItems(@NotNull Tree tree) throws 
ConstraintViolationException {
         for (NodeType nodeType : nodeTypes.values()) {
             for (PropertyDefinition pd : nodeType.getPropertyDefinitions()) {
                 String name = pd.getName();
@@ -357,9 +360,10 @@ class EffectiveNodeTypeImpl implements E
      * @return the applicable definition for the target property.
      * @throws ConstraintViolationException If no matching definition can be 
found.
      */
+    @NotNull
     @Override
     public PropertyDefinition getPropertyDefinition(
-            String propertyName, boolean isMultiple,
+            @NotNull String propertyName, boolean isMultiple,
             int type, boolean exactTypeMatch)
             throws ConstraintViolationException {
        // TODO: This may need to be optimized
@@ -393,8 +397,9 @@ class EffectiveNodeTypeImpl implements E
      * @param unknownMultiple {@code true} if the target property has an 
unknown type, {@code false} if it is known to be a multi-valued property.
      * @return the applicable definition for the target property or {@code 
null} if no matching definition can be found.
      */
+    @Nullable
     @Override
-    public PropertyDefinition getPropertyDefinition(String name, int type, 
boolean unknownMultiple) {
+    public PropertyDefinition getPropertyDefinition(@NotNull String name, int 
type, boolean unknownMultiple) {
         // TODO check multivalue handling
         Iterable<PropertyDefinition> definitions = 
getNamedPropertyDefinitions(name);
 
@@ -430,10 +435,9 @@ class EffectiveNodeTypeImpl implements E
      * @return the node definition
      * @throws ConstraintViolationException
      */
+    @NotNull
     @Override
-    public NodeDefinition getNodeDefinition(
-            String childName, EffectiveNodeType childEffective)
-            throws ConstraintViolationException {
+    public NodeDefinition getNodeDefinition(@NotNull String childName, 
@Nullable EffectiveNodeType childEffective) throws ConstraintViolationException 
{
        for (NodeDefinition def : getNamedNodeDefinitions(childName)) {
            boolean match = true;
            if (childEffective != null && 
!childEffective.includesNodeTypes(def.getRequiredPrimaryTypeNames())) {
@@ -459,8 +463,8 @@ class EffectiveNodeTypeImpl implements E
    }
 
     //------------------------------------------------------------< private 
>---
-
-    private PropertyDefinition getDefinition(PropertyState property) throws 
RepositoryException {
+    @NotNull
+    private PropertyDefinition getDefinition(@NotNull PropertyState property) 
throws RepositoryException {
         String propertyName = property.getName();
         int propertyType = property.getType().tag();
         boolean isMultiple = property.isArray();

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ReadOnlyNodeTypeManager.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ReadOnlyNodeTypeManager.java?rev=1857255&r1=1857254&r2=1857255&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ReadOnlyNodeTypeManager.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ReadOnlyNodeTypeManager.java
 Wed Apr 10 14:58:04 2019
@@ -249,7 +249,7 @@ public abstract class ReadOnlyNodeTypeMa
     //------------------------------------------< EffectiveNodeTypeProvider 
>---
 
     @Override
-    public boolean isNodeType(Tree tree, String oakNtName) {
+    public boolean isNodeType(@NotNull Tree tree, @NotNull String oakNtName) {
         // shortcuts for common cases
         if (JcrConstants.NT_BASE.equals(oakNtName)) {
             return true;
@@ -284,8 +284,7 @@ public abstract class ReadOnlyNodeTypeMa
     }
 
     @Override
-    public boolean isNodeType(@Nullable String primaryTypeName, @NotNull 
Iterator<String> mixinTypes,
-                              @NotNull String nodeTypeName) throws 
NoSuchNodeTypeException, RepositoryException {
+    public boolean isNodeType(@Nullable String primaryTypeName, @NotNull 
Iterator<String> mixinTypes, @NotNull String nodeTypeName) {
         // shortcut
         if (JcrConstants.NT_BASE.equals(nodeTypeName)) {
             return true;
@@ -318,7 +317,7 @@ public abstract class ReadOnlyNodeTypeMa
     }
 
     @Override
-    public boolean isNodeType(String typeName, String superName) {
+    public boolean isNodeType(@NotNull String typeName, @NotNull String 
superName) {
         return isa(getTypes(), typeName, superName);
     }
 
@@ -330,8 +329,9 @@ public abstract class ReadOnlyNodeTypeMa
      * @return all types of the given node
      * @throws RepositoryException if the type information can not be accessed
      */
+    @NotNull
     @Override
-    public EffectiveNodeType getEffectiveNodeType(Node node)
+    public EffectiveNodeType getEffectiveNodeType(@NotNull Node node)
             throws RepositoryException {
         NodeTypeImpl primary = (NodeTypeImpl) node.getPrimaryNodeType(); // 
FIXME
         NodeType[] mixins = node.getMixinNodeTypes();
@@ -342,8 +342,9 @@ public abstract class ReadOnlyNodeTypeMa
         return new EffectiveNodeTypeImpl(primary, mixinImpls, this);
     }
 
+    @NotNull
     @Override
-    public EffectiveNodeType getEffectiveNodeType(Tree tree) throws 
RepositoryException {
+    public EffectiveNodeType getEffectiveNodeType(@NotNull Tree tree) throws 
RepositoryException {
         NodeTypeImpl primaryType;
         PropertyState jcrPrimaryType = tree.getProperty(JCR_PRIMARYTYPE);
         if (jcrPrimaryType != null) {
@@ -385,8 +386,7 @@ public abstract class ReadOnlyNodeTypeMa
 
     @NotNull
     @Override
-    public NodeDefinition getDefinition(
-            @NotNull Tree parent, @NotNull Tree targetNode)
+    public NodeDefinition getDefinition(@NotNull Tree parent, @NotNull Tree 
targetNode)
             throws RepositoryException {
         checkNotNull(parent);
         checkNotNull(targetNode);
@@ -398,8 +398,7 @@ public abstract class ReadOnlyNodeTypeMa
 
     @NotNull
     @Override
-    public PropertyDefinition getDefinition(
-            Tree parent, PropertyState property, boolean exactTypeMatch)
+    public PropertyDefinition getDefinition(@NotNull Tree parent, @NotNull 
PropertyState property, boolean exactTypeMatch)
             throws RepositoryException {
         Type<?> type = property.getType();
         EffectiveNodeType effective = getEffectiveNodeType(parent);
@@ -409,7 +408,8 @@ public abstract class ReadOnlyNodeTypeMa
 
     //-----------------------------------------------------------< internal 
>---
 
-    NodeTypeImpl internalGetNodeType(String oakName) throws 
NoSuchNodeTypeException {
+    @NotNull
+    NodeTypeImpl internalGetNodeType(@NotNull String oakName) throws 
NoSuchNodeTypeException {
         Tree types = getTypes();
         if (types != null) {
             Tree type = types.getChild(oakName);


Reply via email to