From eba6716092f00791c51ab9b6b8cd90835c89ed5d Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Fri, 26 Jun 2020 21:57:44 +0200 Subject: [PATCH] Fix javadoc to comply with JDK14 JDK14 has a stricter default doclet. Fix issues reported by it so that the code can be compiled with JDK14. Change-Id: Ieffe3450feeb0d4d9525f3434a17fd8e0dd8c0e4 Signed-off-by: Robert Varga --- .../yangtools/yang/common/Revision.java | 2 +- .../yang/data/api/YangInstanceIdentifier.java | 31 +++++++------------ .../data/api/schema/DataContainerChild.java | 15 +++++---- .../data/api/schema/DataContainerNode.java | 22 ++++++------- .../data/api/schema/LeafSetEntryNode.java | 26 ++++++---------- .../yang/data/api/schema/ValueNode.java | 12 +++---- .../stream/NormalizedNodeStreamWriter.java | 3 +- 7 files changed, 45 insertions(+), 66 deletions(-) diff --git a/yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/Revision.java b/yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/Revision.java index a4788d3d7f..a7e0d20905 100644 --- a/yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/Revision.java +++ b/yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/Revision.java @@ -26,7 +26,7 @@ import org.opendaylight.yangtools.concepts.Immutable; /** * Dedicated object identifying a YANG module revision. * - *

API design note

+ *

API design note

* This class defines the contents of a revision statement, but modules do not require to have a revision (e.g. they * have not started to keep track of revisions). * diff --git a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangInstanceIdentifier.java b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangInstanceIdentifier.java index 3c24ab3b85..d27ebd9ce2 100644 --- a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangInstanceIdentifier.java +++ b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangInstanceIdentifier.java @@ -55,31 +55,24 @@ import org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode; * Unique identifier of a particular node instance in the data tree. * *

- * Java representation of YANG Built-in type instance-identifier, - * which conceptually is XPath expression minimized to uniquely identify element - * in data tree which conforms to constraints maintained by YANG Model, + * Java representation of YANG Built-in type {@code instance-identifier}, which conceptually is XPath expression + * minimized to uniquely identify element in data tree which conforms to constraints maintained by YANG Model, * effectively this makes Instance Identifier a path to element in data tree. * *

- * Constraints put in YANG specification on instance-identifier allowed it to be - * effectively represented in Java and it's evaluation does not require - * full-blown XPath processor. + * Constraints put in YANG specification on instance-identifier allowed it to be effectively represented in Java and its + * evaluation does not require a full-blown XPath processor. * - *

- *

Path Arguments

- * Path to the node represented in instance identifier consists of - * {@link PathArgument} which carries necessary information to uniquely identify - * node on particular level in the subtree. + *

Path Arguments

+ * Path to the node represented in instance identifier consists of {@link PathArgument} which carries necessary + * information to uniquely identify node on particular level in the subtree. * * * * @see RFC6020 diff --git a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/DataContainerChild.java b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/DataContainerChild.java index 993949296a..fb1d803c66 100644 --- a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/DataContainerChild.java +++ b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/DataContainerChild.java @@ -12,16 +12,15 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgum /** * Marker interface for direct children of {@link DataContainerNode}. * - *

Implementation notes

- * This interface should not be implemented directly, but rather using one - * of its subinterfaces: + *

Implementation notes

+ * This interface should not be implemented directly, but rather using one of its subinterfaces: * * * * @param Path Argument Type which is used to identify node diff --git a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/DataContainerNode.java b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/DataContainerNode.java index c99b19b86e..d58126d144 100644 --- a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/DataContainerNode.java +++ b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/DataContainerNode.java @@ -11,18 +11,17 @@ import java.util.Collection; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument; /** - * Abstract node which does not have value but contains valid {@link DataContainerChild} nodes. - * Schema of this node is described by instance of {@link org.opendaylight.yangtools.yang.model.api.DataNodeContainer}. + * Abstract node which does not have value but contains valid {@link DataContainerChild} nodes. Schema of this node is + * described by instance of {@link org.opendaylight.yangtools.yang.model.api.DataNodeContainer}. * - *

*

Implementation notes

* This interface should not be implemented directly, but rather implementing one of it's subclasses *
    - *
  • {@link ContainerNode} - *
  • {@link MapEntryNode} - *
  • {@link UnkeyedListEntryNode} - *
  • {@link ChoiceNode} - *
  • {@link AugmentationNode} + *
  • {@link ContainerNode} + *
  • {@link MapEntryNode} + *
  • {@link UnkeyedListEntryNode} + *
  • {@link ChoiceNode} + *
  • {@link AugmentationNode} *
* * @param {@link PathArgument} which identifies instance of {@link DataContainerNode} @@ -30,13 +29,12 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgum public interface DataContainerNode extends NormalizedNodeContainer> { /** - * Returns iteration of all child nodes. - * Order of returned child nodes may be defined by subinterfaces. + * Returns iteration of all child nodes. Order of returned child nodes may be defined by subinterfaces. * *

* Implementation Notes: - * All nodes returned in this iterable, MUST also be accessible via - * {@link #getChild(PathArgument)} using their associated identifier. + * All nodes returned in this iterable, MUST also be accessible via {@link #getChild(PathArgument)} using their + * associated identifier. * * @return Iteration of all child nodes */ diff --git a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/LeafSetEntryNode.java b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/LeafSetEntryNode.java index 63f9127f32..6a257f0124 100644 --- a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/LeafSetEntryNode.java +++ b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/LeafSetEntryNode.java @@ -10,28 +10,20 @@ package org.opendaylight.yangtools.yang.data.api.schema; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeWithValue; /** - * Leaf node with multiplicity 0...n. + * Leaf node with multiplicity 0...n. Leaf node has a value, but no child nodes in the data tree, schema for leaf node + * and its value is described by {@link org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode}. * - *

- * Leaf node has a value, but no child nodes in the data tree, schema - * for leaf node and its value is described by - * {@link org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode}. - * - * @param - * Value type + * @param Value type */ public interface LeafSetEntryNode extends NormalizedNode, ValueNode { /** - * Returns {@link NodeWithValue} which identifies this leaf set entry. - * Returned {@link NodeWithValue} contains same value as this node. + * Returns {@link NodeWithValue} which identifies this leaf set entry. Returned {@link NodeWithValue} contains same + * value as this node. * - *

- *

Implementation notes

Invocation of - * {@link NodeWithValue#getValue()} on returned instance of - * {@link NodeWithValue} must returns - * same value as invocation of {@link #getValue()}, such as - * following condition is allways met: - * true == this.getIdentifier().getValue().equals(this.getValue()) + * Implementation note + * Invocation of {@link NodeWithValue#getValue()} on returned instance of {@link NodeWithValue} must return the + * same value as invocation of {@link #getValue()}, such as following condition is always met: + * {@code true == this.getIdentifier().getValue().equals(this.getValue())}. * * @return {@link NodeWithValue} which identifies this leaf set entry. */ diff --git a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/ValueNode.java b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/ValueNode.java index eb70bfaa98..1556d8bbec 100644 --- a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/ValueNode.java +++ b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/ValueNode.java @@ -12,8 +12,6 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgum /** * Interface holding the common trait of {@link LeafSetEntryNode} and {@link LeafNode}, which both hold a value. * - * @author Robert Varga - * * @param Local identifier of node * @param Value of node */ @@ -21,13 +19,11 @@ public interface ValueNode extends NormalizedNodeImplementation notes Invocation of {@link #getValue()} must - * provides same value as value in {@link #getIdentifier()}. - * true == this.getIdentifier().getValue().equals(this.getValue()) - * - * @return Returned value of this node. Value SHOULD meet criteria - * defined by schema. + * Implementation note + * Invocation of {@link #getValue()} must provide the same value as value in {@link #getIdentifier()}. + * {@code true == this.getIdentifier().getValue().equals(this.getValue())}. * + * @return Returned value of this node. Value SHOULD meet criteria defined by schema. */ @Override V getValue(); diff --git a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/stream/NormalizedNodeStreamWriter.java b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/stream/NormalizedNodeStreamWriter.java index 6b0cc051a8..b2d5ccb12b 100644 --- a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/stream/NormalizedNodeStreamWriter.java +++ b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/stream/NormalizedNodeStreamWriter.java @@ -25,7 +25,7 @@ import org.opendaylight.yangtools.yang.model.api.DataSchemaNode; /** * Event Stream Writer based on Normalized Node tree representation. * - *

Writing Event Stream

+ *

Writing Event Stream

* Each entity is emitted by invoking its corresponding {@code start*} event, optionally followed by interior events and * invoking {@link #endNode()}. Some entities supported nested entities, some do not, see below for restrictions. * @@ -392,6 +392,7 @@ public interface NormalizedNodeStreamWriter extends Closeable, Flushable, * @throws IllegalArgumentException if the argument does not represents a valid value * @throws IllegalStateException if a value-bearing node is not open or if it's value has already been set and this * implementation does not allow resetting the value. + * @throws IOException if an underlying IO error occurs */ void scalarValue(@NonNull Object value) throws IOException; -- 2.36.6