Remove SchemaNode.getPath()
[yangtools.git] / parser / rfc6643-parser-support / src / main / java / org / opendaylight / yangtools / rfc6643 / parser / ImpliedEffectiveStatementImpl.java
index 22a014095057cf20a4b27987544e61207735a52d..6b32599c05dc34d81c1a05907651508c16f34a90 100644 (file)
@@ -13,22 +13,15 @@ import org.opendaylight.yangtools.rfc6643.model.api.ImpliedEffectiveStatement;
 import org.opendaylight.yangtools.rfc6643.model.api.ImpliedSchemaNode;
 import org.opendaylight.yangtools.rfc6643.model.api.ImpliedStatement;
 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 ImpliedEffectiveStatementImpl extends UnknownEffectiveStatementBase<String, ImpliedStatement>
         implements ImpliedEffectiveStatement, ImpliedSchemaNode {
-
-    private final SchemaPath path;
-
     ImpliedEffectiveStatementImpl(final Current<String, ImpliedStatement> stmt,
             final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
         super(stmt, substatements);
-        path = SchemaPathSupport.toOptionalPath(stmt.getEffectiveParent().getSchemaPath().createChild(getNodeType()));
     }
 
     @Override
@@ -36,12 +29,6 @@ final class ImpliedEffectiveStatementImpl extends UnknownEffectiveStatementBase<
         return getNodeType();
     }
 
-    @Override
-    @Deprecated
-    public SchemaPath getPath() {
-        return SchemaNodeDefaults.throwUnsupportedIfNull(this, path);
-    }
-
     @Override
     public ImpliedEffectiveStatement asEffectiveStatement() {
         return this;
@@ -49,7 +36,7 @@ final class ImpliedEffectiveStatementImpl extends UnknownEffectiveStatementBase<
 
     @Override
     public int hashCode() {
-        return Objects.hash(path, getNodeType(), getNodeParameter());
+        return Objects.hash(getNodeType(), getNodeParameter());
     }
 
     @Override
@@ -62,6 +49,6 @@ final class ImpliedEffectiveStatementImpl extends UnknownEffectiveStatementBase<
         }
         final ImpliedEffectiveStatementImpl other = (ImpliedEffectiveStatementImpl) obj;
         return Objects.equals(getNodeType(), other.getNodeType())
-            && Objects.equals(getNodeParameter(), other.getNodeParameter()) && Objects.equals(path, other.path);
+            && Objects.equals(getNodeParameter(), other.getNodeParameter());
     }
 }