YANGTOOLS-724: mark leaking fields
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / effective / AbstractEffectiveDataSchemaNode.java
index 12055f575e59af95f1a73c26bcfbfce8606532a6..ee08d972a92e167aaa86dfcd7347cc3e02d46baa 100644 (file)
@@ -19,12 +19,13 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 public abstract class AbstractEffectiveDataSchemaNode<D extends DeclaredStatement<QName>> extends
         AbstractEffectiveSchemaNode<D> implements DataSchemaNode {
 
-    // :FIXME Bug-7277
-    boolean augmenting;
     private final boolean addedByUses;
     private final boolean configuration;
     private final ConstraintDefinition constraints;
 
+    // FIXME: YANGTOOLS-724: this field should be final
+    private boolean augmenting;
+
     public AbstractEffectiveDataSchemaNode(final StmtContext<QName, D, ?> ctx) {
         super(ctx);
         this.constraints = EffectiveConstraintDefinitionImpl.forParent(this);
@@ -59,4 +60,15 @@ public abstract class AbstractEffectiveDataSchemaNode<D extends DeclaredStatemen
     public ConstraintDefinition getConstraints() {
         return constraints;
     }
+
+    /**
+     * Reset {@link #isAugmenting()} to false.
+     *
+     * @deprecated This method is a violation of immutable contract and is a side-effect of bad/incomplete lifecycle,
+     *             which needs to be fixed. Do not introduce new callers. This deficiency is tracked in YANGTOOLS-724.
+     */
+    @Deprecated
+    protected void resetAugmenting() {
+        augmenting = false;
+    }
 }