Remove StatementWriter.{resume,store}Statement default implementations 69/87669/7
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 13 Feb 2020 12:17:37 +0000 (13:17 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 13 Feb 2020 12:53:53 +0000 (13:53 +0100)
We have only a single implementation of this interface, let's require
implementations to supply these methods.

JIRA: YANGTOOLS-652
Change-Id: I891c3757d0eea6b8d87844e288b98fcc6dca65ca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/StatementWriter.java

index db52ffe17f5d49508e097eb7f83d0ab70f8d07f7..9de9b23c4f53d920b2c0a6cd84a51bdba831bca4 100644 (file)
@@ -65,10 +65,7 @@ public interface StatementWriter {
      * @param childId Child
      * @return A resumed statement or empty if the statement has not previously been defined.
      */
-    @Beta
-    default Optional<? extends ResumedStatement> resumeStatement(final int childId) {
-        return Optional.empty();
-    }
+    Optional<? extends ResumedStatement> resumeStatement(int childId);
 
     /**
      * Store a defined statement, hinting at the number of children it is expected to have and indicating whether
@@ -78,10 +75,7 @@ public interface StatementWriter {
      * @param expectedChildren Number of expected children, cannot be negative
      * @param fullyDefined True if the statement and all its descendants have been defined.
      */
-    @Beta
-    default void storeStatement(final int expectedChildren, final boolean fullyDefined) {
-        // No-op
-    }
+    void storeStatement(int expectedChildren, boolean fullyDefined);
 
     /**
      * Starts statement with supplied name and location in source.