Fix YangInstanceIdentifier.PathArgument definition 09/84009/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 27 Aug 2019 10:30:10 +0000 (12:30 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 27 Aug 2019 10:30:10 +0000 (12:30 +0200)
Javadoc and nullness guarantees do not match implementation behaviour,
align them.

Change-Id: Ifd981021a9261f06fc605d15d6790518e3915735
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangInstanceIdentifier.java

index f9bdc53abb1a03af52cd8498993eaa2634832aa8..0aa4a97de37c3413f75f662386fce19727266350 100644 (file)
@@ -447,16 +447,12 @@ public abstract class YangInstanceIdentifier implements Path<YangInstanceIdentif
      */
     public interface PathArgument extends Comparable<PathArgument>, Immutable, Serializable {
         /**
-         * If applicable returns unique QName of data node as defined in YANG
-         * Schema.
-         *
-         * <p>
-         * This method may return null, if the corresponding schema node, does
-         * not have QName associated, such as in cases of augmentations.
+         * Returns unique QName of data node as defined in YANG Schema, if available.
          *
          * @return Node type
+         * @throws UnsupportedOperationException if node type is not applicable, for example in case of an augmentation.
          */
-        QName getNodeType();
+        @NonNull QName getNodeType();
 
         /**
          * Return the string representation of this object for use in context
@@ -480,7 +476,7 @@ public abstract class YangInstanceIdentifier implements Path<YangInstanceIdentif
         }
 
         @Override
-        public final @NonNull QName getNodeType() {
+        public final QName getNodeType() {
             return nodeType;
         }