From: Robert Varga Date: Sun, 29 Aug 2021 09:01:21 +0000 (+0200) Subject: Terminally deprecate SchemaNode.getPath() X-Git-Tag: v7.0.8~11 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=71ad5da595c694f943a73e7a16148484780117e8;p=yangtools.git Terminally deprecate SchemaNode.getPath() 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 --- diff --git a/model/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/SchemaNode.java b/model/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/SchemaNode.java index 441bc793a5..d4f70a1efe 100644 --- a/model/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/SchemaNode.java +++ b/model/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/SchemaNode.java @@ -39,8 +39,11 @@ public interface SchemaNode extends DocumentedNode.WithStatus { * identity within a given {@link EffectiveModelContext}. * * + * 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); }