From: Robert Varga Date: Mon, 8 Aug 2022 08:38:13 +0000 (+0200) Subject: Mark deprecated methods for removal X-Git-Tag: v9.0.1~24 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=b6d012e4fb4130eaa9cb3487bbb352973584f86a;p=yangtools.git Mark deprecated methods for removal We have a number of methods deprecated, but not marked for removal. Update them along with the release where they were deprecated. Change-Id: I20d56689d1c0349dc8f41b823d293576f40b5bb7 Signed-off-by: Robert Varga --- diff --git a/codec/yang-data-codec-binfmt/src/main/java/org/opendaylight/yangtools/yang/data/codec/binfmt/NormalizedNodeDataInput.java b/codec/yang-data-codec-binfmt/src/main/java/org/opendaylight/yangtools/yang/data/codec/binfmt/NormalizedNodeDataInput.java index 19c447166e..03bebc4652 100644 --- a/codec/yang-data-codec-binfmt/src/main/java/org/opendaylight/yangtools/yang/data/codec/binfmt/NormalizedNodeDataInput.java +++ b/codec/yang-data-codec-binfmt/src/main/java/org/opendaylight/yangtools/yang/data/codec/binfmt/NormalizedNodeDataInput.java @@ -70,7 +70,7 @@ public interface NormalizedNodeDataInput extends QNameAwareDataInput { PathArgument readPathArgument() throws IOException; - @Deprecated(forRemoval = true) + @Deprecated(since = "5.0.0", forRemoval = true) SchemaPath readSchemaPath() throws IOException; SchemaNodeIdentifier readSchemaNodeIdentifier() throws IOException; @@ -108,7 +108,7 @@ public interface NormalizedNodeDataInput extends QNameAwareDataInput { * @return a new {@link NormalizedNodeDataInput} instance * @deprecated Use {@link #newDataInput(DataInput)} instead. */ - @Deprecated(forRemoval = true) + @Deprecated(since = "5.0.0", forRemoval = true) static @NonNull NormalizedNodeDataInput newDataInputWithoutValidation(final @NonNull DataInput input) { return new VersionedNormalizedNodeDataInput(input); } diff --git a/codec/yang-data-codec-binfmt/src/main/java/org/opendaylight/yangtools/yang/data/codec/binfmt/NormalizedNodeDataOutput.java b/codec/yang-data-codec-binfmt/src/main/java/org/opendaylight/yangtools/yang/data/codec/binfmt/NormalizedNodeDataOutput.java index fb2b68a2b6..d6da68ae80 100644 --- a/codec/yang-data-codec-binfmt/src/main/java/org/opendaylight/yangtools/yang/data/codec/binfmt/NormalizedNodeDataOutput.java +++ b/codec/yang-data-codec-binfmt/src/main/java/org/opendaylight/yangtools/yang/data/codec/binfmt/NormalizedNodeDataOutput.java @@ -32,7 +32,7 @@ public interface NormalizedNodeDataOutput extends AutoCloseable, QNameAwareDataO void writeYangInstanceIdentifier(YangInstanceIdentifier identifier) throws IOException; - @Deprecated(forRemoval = true) + @Deprecated(since = "5.0.0", forRemoval = true) void writeSchemaPath(SchemaPath path) throws IOException; void writeSchemaNodeIdentifier(SchemaNodeIdentifier path) throws IOException; diff --git a/data/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/SchemaOrderedNormalizedNodeWriter.java b/data/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/SchemaOrderedNormalizedNodeWriter.java index 78640d7b50..ecd478dc8e 100644 --- a/data/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/SchemaOrderedNormalizedNodeWriter.java +++ b/data/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/SchemaOrderedNormalizedNodeWriter.java @@ -101,7 +101,7 @@ public class SchemaOrderedNormalizedNodeWriter extends NormalizedNodeWriter { * @param path root path * @deprecated Use either one of the alternative constructors instead. */ - @Deprecated(since = "7.0.11") + @Deprecated(since = "7.0.11", forRemoval = true) public SchemaOrderedNormalizedNodeWriter(final NormalizedNodeStreamWriter writer, final EffectiveModelContext schemaContext, final SchemaPath path) { this(writer, SchemaInferenceStack.ofSchemaPath(schemaContext, path)); diff --git a/data/yang-data-util/src/main/java/org/opendaylight/yangtools/yang/data/util/NormalizedNodeStreamWriterStack.java b/data/yang-data-util/src/main/java/org/opendaylight/yangtools/yang/data/util/NormalizedNodeStreamWriterStack.java index dfc8389441..038e25fbf1 100644 --- a/data/yang-data-util/src/main/java/org/opendaylight/yangtools/yang/data/util/NormalizedNodeStreamWriterStack.java +++ b/data/yang-data-util/src/main/java/org/opendaylight/yangtools/yang/data/util/NormalizedNodeStreamWriterStack.java @@ -162,7 +162,7 @@ public final class NormalizedNodeStreamWriterStack implements LeafrefResolver { * @throws NullPointerException if any argument is null * @throws IllegalArgumentException if {@code path} does not point to a valid root */ - @Deprecated + @Deprecated(since = "7.0.0", forRemoval = true) public static @NonNull NormalizedNodeStreamWriterStack of(final EffectiveModelContext context, final SchemaPath path) { return new NormalizedNodeStreamWriterStack(SchemaInferenceStack.ofSchemaPath(context, path)); diff --git a/model/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/SchemaInferenceStack.java b/model/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/SchemaInferenceStack.java index ceda711cfd..3ccc337cc5 100644 --- a/model/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/SchemaInferenceStack.java +++ b/model/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/SchemaInferenceStack.java @@ -308,7 +308,7 @@ public final class SchemaInferenceStack implements Mutable, EffectiveModelContex * @throws IllegalArgumentException if {@code path} cannot be resolved in the effective model or if it is not an * absolute path. */ - @Deprecated + @Deprecated(since = "7.0.0", forRemoval = true) public static @NonNull SchemaInferenceStack ofInstantiatedPath(final EffectiveModelContext effectiveModel, final SchemaPath path) { checkArgument(path.isAbsolute(), "Cannot operate on relative path %s", path); @@ -328,7 +328,7 @@ public final class SchemaInferenceStack implements Mutable, EffectiveModelContex * @throws IllegalArgumentException if {@code path} cannot be resolved in the effective model or if it is not an * absolute path. */ - @Deprecated + @Deprecated(since = "7.0.2", forRemoval = true) public static @NonNull SchemaInferenceStack ofSchemaPath(final EffectiveModelContext effectiveModel, final SchemaPath path) { checkArgument(path.isAbsolute(), "Cannot operate on relative path %s", path); @@ -765,7 +765,7 @@ public final class SchemaInferenceStack implements Mutable, EffectiveModelContex * @throws IllegalStateException if current state is not instantiated * @deprecated This method is meant only for interoperation with SchemaPath-based APIs. */ - @Deprecated + @Deprecated(since = "5.0.0", forRemoval = true) public @NonNull SchemaPath toSchemaPath() { return SchemaPath.create(simplePathFromRoot(), true); } @@ -775,8 +775,9 @@ public final class SchemaInferenceStack implements Mutable, EffectiveModelContex * {@code toSchemaPath().getPathFromRoot().iterator()}. * * @return An unmodifiable iterator + * @deprecated Use {@link #toSchemaTreeInference()} instead. */ - @Deprecated + @Deprecated(since = "5.0.0", forRemoval = true) public @NonNull Iterator schemaPathIterator() { return Iterators.unmodifiableIterator(simplePathFromRoot().iterator()); }