Migrate ListSchemaNode to JDT annotations 12/77212/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 23 Oct 2018 14:06:22 +0000 (16:06 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 23 Oct 2018 14:06:58 +0000 (16:06 +0200)
This migrates the trivial use of @Nonnull to JDT's @NonNull.

Change-Id: I08c54870093c9e41ea1b5da2a16b6be90921a4d0
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ListSchemaNode.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/list/ListEffectiveStatementImpl.java

index 7175a9c478ce66e85ebac58b08680d1fbce85ec0..319d33f3eb6624ec2705439c835589754ad034ec 100644 (file)
@@ -9,7 +9,7 @@ package org.opendaylight.yangtools.yang.model.api;
 
 import java.util.Collection;
 import java.util.List;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.common.QName;
 
 /**
@@ -29,9 +29,8 @@ public interface ListSchemaNode extends DataNodeContainer, AugmentationTarget, D
     List<QName> getKeyDefinition();
 
     /**
-     * YANG 'ordered-by' statement. It defines whether the order of entries
-     * within a list are determined by the user or the system. If not present,
-     * default is false.
+     * YANG 'ordered-by' statement. It defines whether the order of entries within a list are determined by the user
+     * or the system. If not present, default is false.
      *
      * @return true if ordered-by argument is "user", false otherwise
      */
@@ -42,6 +41,5 @@ public interface ListSchemaNode extends DataNodeContainer, AugmentationTarget, D
      *
      * @return Collection of unique constraints of this list schema node
      */
-    @Nonnull
-    Collection<UniqueConstraint> getUniqueConstraints();
+    @NonNull Collection<UniqueConstraint> getUniqueConstraints();
 }
index f8721d892626a85eea427efba173754b98ff57fb..e9f13e07e6078562373eb821438b1b2891eb7a3e 100644 (file)
@@ -17,7 +17,7 @@ import java.util.List;
 import java.util.Objects;
 import java.util.Optional;
 import java.util.Set;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.ActionDefinition;
 import org.opendaylight.yangtools.yang.model.api.DerivableSchemaNode;
@@ -48,7 +48,7 @@ public final class ListEffectiveStatementImpl extends AbstractEffectiveSimpleDat
     private final ListSchemaNode original;
     private final Set<ActionDefinition> actions;
     private final Set<NotificationDefinition> notifications;
-    private final Collection<UniqueConstraint> uniqueConstraints;
+    private final @NonNull Collection<UniqueConstraint> uniqueConstraints;
     private final ElementCountConstraint elementCountConstraint;
     private final Collection<MustDefinition> mustConstraints;
 
@@ -128,7 +128,6 @@ public final class ListEffectiveStatementImpl extends AbstractEffectiveSimpleDat
     }
 
     @Override
-    @Nonnull
     public Collection<UniqueConstraint> getUniqueConstraints() {
         return uniqueConstraints;
     }