Deprecate EffectiveStmtCtx.Current.original() 26/97926/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 10:19:30 +0000 (12:19 +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>
(cherry picked from commit 5442bfd168f34d386e872817ba5ce612d75c80d8)

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 66ad765afa84bc53301a1906773b6417186f2f21..48a4b56b0def28feabafaef3fda9b187af3533f4 100644 (file)
@@ -244,6 +244,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 82ce9bcd4b8f4039d0f6e408d973af80721050ed..29dbe2f7e49e753a7822bc210c0b545be2215642 100644 (file)
@@ -163,13 +163,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();
 
         /**