Remove SchemaNode.getPath()
[yangtools.git] / parser / rfc6643-parser-support / src / main / java / org / opendaylight / yangtools / rfc6643 / parser / MaxAccessEffectiveStatementImpl.java
index 1abda1d33ec58bde10458a85517d1f7db379e351..45b474b63187bd55f25bbda198873d38a8a4678b 100644 (file)
@@ -14,21 +14,15 @@ import org.opendaylight.yangtools.rfc6643.model.api.MaxAccessEffectiveStatement;
 import org.opendaylight.yangtools.rfc6643.model.api.MaxAccessSchemaNode;
 import org.opendaylight.yangtools.rfc6643.model.api.MaxAccessStatement;
 import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.SchemaNodeDefaults;
-import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.UnknownEffectiveStatementBase;
 import org.opendaylight.yangtools.yang.parser.spi.meta.EffectiveStmtCtx.Current;
-import org.opendaylight.yangtools.yang.parser.spi.meta.SchemaPathSupport;
 
 final class MaxAccessEffectiveStatementImpl extends UnknownEffectiveStatementBase<MaxAccess, MaxAccessStatement>
         implements MaxAccessEffectiveStatement, MaxAccessSchemaNode {
-    private final SchemaPath path;
-
     MaxAccessEffectiveStatementImpl(final Current<MaxAccess, MaxAccessStatement> stmt,
             final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
         super(stmt, substatements);
-        path = SchemaPathSupport.toOptionalPath(stmt.getEffectiveParent().getSchemaPath().createChild(getNodeType()));
     }
 
     @Override
@@ -41,12 +35,6 @@ final class MaxAccessEffectiveStatementImpl extends UnknownEffectiveStatementBas
         return getNodeType();
     }
 
-    @Override
-    @Deprecated
-    public SchemaPath getPath() {
-        return SchemaNodeDefaults.throwUnsupportedIfNull(this, path);
-    }
-
     @Override
     public MaxAccessEffectiveStatement asEffectiveStatement() {
         return this;
@@ -54,7 +42,7 @@ final class MaxAccessEffectiveStatementImpl extends UnknownEffectiveStatementBas
 
     @Override
     public int hashCode() {
-        return Objects.hash(path, getNodeType(), getNodeParameter());
+        return Objects.hash(getNodeType(), getNodeParameter());
     }
 
     @Override
@@ -67,6 +55,6 @@ final class MaxAccessEffectiveStatementImpl extends UnknownEffectiveStatementBas
         }
         final MaxAccessEffectiveStatementImpl other = (MaxAccessEffectiveStatementImpl) obj;
         return Objects.equals(getNodeType(), other.getNodeType())
-            && Objects.equals(getNodeParameter(), other.getNodeParameter()) && Objects.equals(path, other.path);
+            && Objects.equals(getNodeParameter(), other.getNodeParameter());
     }
 }