Deprecate EffectiveStmtCtx.Current.original() 21/97921/1
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 16 Oct 2021 09:32:28 +0000 (11:32 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sat, 16 Oct 2021 09:32:28 +0000 (11:32 +0200)
These methods are used to pass information to getOriginal(Definition)
methods, which themselves are deprecated for removal. Mirror that
decision so we do not end up exposing things we do not need.

Change-Id: Ib977818bc749bf722b9ce0c50664b0c0fda0a593
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
parser/yang-parser-reactor/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/ReactorStmtCtx.java
parser/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/EffectiveStmtCtx.java

index b2963a0790f2081e9b9eb273ba62b830301023b6..5b90299c327a76c7cf4c3f71a0d6db0d96c3938f 100644 (file)
@@ -238,6 +238,7 @@ abstract class ReactorStmtCtx<A, D extends DeclaredStatement<A>, E extends Effec
     }
 
     @Override
+    @Deprecated(since = "7.0.9", forRemoval = true)
     public final EffectiveStatement<?, ?> original() {
         return getOriginalCtx().map(StmtContext::buildEffective).orElse(null);
     }
index 9f75ac7dcc48a3c1b1e11a8252d217345c14bcab..96f1c8b153397245ee45b209e6d62f8db9c1440c 100644 (file)
@@ -110,13 +110,15 @@ public interface EffectiveStmtCtx extends CommonStmtCtx, StmtContextCompat, Immu
 
         @NonNull QName moduleName();
 
+        @Deprecated(since = "7.0.9", forRemoval = true)
         @Nullable EffectiveStatement<?, ?> original();
 
+        @Deprecated(since = "7.0.9", forRemoval = true)
         default <T> @Nullable T original(final @NonNull Class<T> type) {
             return type.cast(original());
         }
 
-        // FIXME: 7.0.0: this method should be moved to stmt.type in some shape or form
+        // FIXME: 8.0.0: this method should be moved to stmt.type in some shape or form
         @NonNull QName argumentAsTypeQName();
 
         /**