Deprecate SchemaPath 54/97354/2
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 30 Aug 2021 08:54:26 +0000 (10:54 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 30 Aug 2021 08:59:31 +0000 (10:59 +0200)
SchemaPath has only a few remaining users, with two different concepts
added to cover the two significant use cases. Add pointers to
replacements and deprecate SchemaPath.

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

index 60d7f71739a524f0f5cd763a330fe48f4132538d..f22dfe92a704fd2f4809e6250c02cd2e2c70d0a4 100644 (file)
@@ -28,7 +28,19 @@ import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Desce
 
 /**
  * Represents unique path to the every node inside the module.
+ *
+ * @deprecated This path is not really unique, as it does not handle YANG namespace overlap correctly. There are two
+ *             different replacements for this class:
+ *             <ul>
+ *               <li>{@link SchemaNodeIdentifier} for use in
+ *                   <a href="https://datatracker.ietf.org/doc/html/rfc7950#section-6.5">YANG schema addressing</a>
+ *                   contexts</li>
+ *               <li>{@link EffectiveStatementInference} for use in contexts where the intent is to exchange pointer
+ *                   to a specific statement. Unlike SchemaPath, though, it does not require additional lookup in most
+ *                   cases</li>
+ *             </ul>
  */
+@Deprecated(since = "7.0.8")
 public abstract class SchemaPath implements Immutable {
 
     /**