Terminally deprecate SchemaNode.getPath() 53/97353/1
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 29 Aug 2021 09:01:21 +0000 (11:01 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 29 Aug 2021 09:04:48 +0000 (11:04 +0200)
This method has been on its slow way out. An alternative addressing
construct is presented through EffectiveStatementInference and
SchemaInferenceStack, so all downstreams should be able to migrate with
relative ease now. Add a stern warning with terminal deprecation with
the intent to remove in yangtools-8.

JIRA: YANGTOOLS-1071
Change-Id: Idfbff326eff741fb53af74f35238b999b812993e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
model/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/SchemaNode.java

index 441bc793a5b8e281a534d13e5cecc089e78d43d3..d4f70a1efe41a1bca707b76d1c04d671a0de42d1 100644 (file)
@@ -39,8 +39,11 @@ public interface SchemaNode extends DocumentedNode.WithStatus {
      *                   identity within a given {@link EffectiveModelContext}.
      *               </li>
      *             </ul>
+     *             An alternative method of exchanging pointers to schema nodes (well, statements, really), exists in
+     *             the form of {@link EffectiveStatementInference} and its ecosystem. This method is scheduled for
+     *             removal in the next major release.
      */
-    @Deprecated
+    @Deprecated(forRemoval = true)
     default @NonNull SchemaPath getPath() {
         return SchemaNodeDefaults.throwUnsupported(this);
     }