Deprecate AugmentationSchemaNode.getOriginalDefinition() 17/97917/1
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 16 Oct 2021 08:56:14 +0000 (10:56 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sat, 16 Oct 2021 08:58:35 +0000 (10:58 +0200)
This method is on its way out, mark them as deprecated, so downstreams
are aware of that.

JIRA: YANGTOOLS-1349
Change-Id: Id1a4d631d31185567984ed694397f0b871777dd6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
model/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/AugmentationSchemaNode.java
model/yang-model-ri/src/main/java/org/opendaylight/yangtools/yang/model/ri/stmt/impl/eff/AugmentEffectiveStatementImpl.java

index ac44a33246a32b6bc7233025c9cb13b134055e00..5ee675d35f76b28fa369016a647e3a60b7139563 100644 (file)
@@ -20,24 +20,24 @@ import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier;
 public interface AugmentationSchemaNode extends DataNodeContainer, NotificationNodeContainer, ActionNodeContainer,
         WhenConditionAware, WithStatus, EffectiveStatementEquivalent<AugmentEffectiveStatement> {
     /**
-     * Returns augmentation schema path.
+     * Returns augmentation target path.
      *
-     * @return SchemaNodeIdentifier that identifies a node in the schema tree. This node
-     *         is called the augment's target node. The target node MUST be
-     *         either a container, list, choice, case, input, output, or
-     *         notification node. It is augmented with the nodes defined as
-     *         child nodes of this AugmentationSchema.
+     * @return SchemaNodeIdentifier that identifies a node in the schema tree. This node is called the augment's target
+     *         node. The target node MUST be either a container, list, choice, case, input, output, or anotification
+     *         node. It is augmented with the nodes defined as child nodes of this AugmentationSchema.
      */
     default SchemaNodeIdentifier getTargetPath() {
         return asEffectiveStatement().argument();
     }
 
     /**
-     * Returns Augmentation Definition from which this augmentation is derived
-     * if augmentation was added transitively via augmented uses.
+     * Returns Augmentation Definition from which this augmentation is derived if augmentation was added transitively
+     * via augmented uses.
      *
-     * @return Augmentation Definition from which this augmentation is derived
-     *         if augmentation was added transitively via augmented uses.
+     * @return Augmentation Definition from which this augmentation is derived if augmentation was added transitively
+     *         via augmented uses.
+     * @deprecated This method has only a single user, who should be able to do without it.
      */
+    @Deprecated(since = "7.0.9", forRemoval = true)
     Optional<AugmentationSchemaNode> getOriginalDefinition();
 }
index f367214ae73247718e606572e0dabd2384d2c2ec..70603e469f2da1bceaa40813f48241b96fc5ef16 100644 (file)
@@ -54,8 +54,9 @@ public final class AugmentEffectiveStatementImpl
     }
 
     @Override
+    @Deprecated(since = "7.0.9", forRemoval = true)
     public Optional<AugmentationSchemaNode> getOriginalDefinition() {
-        return Optional.ofNullable(this.original);
+        return Optional.ofNullable(original);
     }
 
     @Override