Remove SchemaNode.getPath()
[yangtools.git] / parser / rfc6643-parser-support / src / main / java / org / opendaylight / yangtools / rfc6643 / parser / SubIdEffectiveStatementImpl.java
index 803975707e3678873a43d21e540019dbea344d1c..bff1f50ba5b7916bb78830297922d629f0694d85 100644 (file)
@@ -14,22 +14,15 @@ import org.opendaylight.yangtools.rfc6643.model.api.SubIdSchemaNode;
 import org.opendaylight.yangtools.rfc6643.model.api.SubIdStatement;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.Uint32;
-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 SubIdEffectiveStatementImpl extends UnknownEffectiveStatementBase<Uint32, SubIdStatement>
         implements SubIdEffectiveStatement, SubIdSchemaNode {
-
-    private final SchemaPath path;
-
     SubIdEffectiveStatementImpl(final Current<Uint32, SubIdStatement> stmt,
             final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
         super(stmt, substatements);
-        path = SchemaPathSupport.toOptionalPath(stmt.getEffectiveParent().getSchemaPath().createChild(getNodeType()));
     }
 
     @Override
@@ -37,12 +30,6 @@ final class SubIdEffectiveStatementImpl extends UnknownEffectiveStatementBase<Ui
         return getNodeType();
     }
 
-    @Override
-    @Deprecated
-    public SchemaPath getPath() {
-        return SchemaNodeDefaults.throwUnsupportedIfNull(this, path);
-    }
-
     @Override
     public SubIdEffectiveStatement asEffectiveStatement() {
         return this;
@@ -50,7 +37,7 @@ final class SubIdEffectiveStatementImpl extends UnknownEffectiveStatementBase<Ui
 
     @Override
     public int hashCode() {
-        return Objects.hash(path, getNodeType(), getNodeParameter());
+        return Objects.hash(getNodeType(), getNodeParameter());
     }
 
     @Override
@@ -63,6 +50,6 @@ final class SubIdEffectiveStatementImpl extends UnknownEffectiveStatementBase<Ui
         }
         final SubIdEffectiveStatementImpl other = (SubIdEffectiveStatementImpl) obj;
         return Objects.equals(getNodeType(), other.getNodeType())
-            && Objects.equals(getNodeParameter(), other.getNodeParameter()) && Objects.equals(path, other.path);
+            && Objects.equals(getNodeParameter(), other.getNodeParameter());
     }
 }