From: Robert Varga Date: Tue, 1 Jul 2014 15:41:16 +0000 (+0200) Subject: BUG-868: mark inherited methods as deprecated X-Git-Tag: release/helium~562^2~1 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=1016687261692060067b32c6f9115ef29f061e85 BUG-868: mark inherited methods as deprecated These methods are deprecated by the specifying class and we use them internally. Mark them as deprecated, silencing the warnings. Change-Id: Ib209ceed988e6407e833e16fafb69c54e350bf75 Signed-off-by: Robert Varga --- diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/SimpleNodeWrapper.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/SimpleNodeWrapper.java index 3131668ed9..b0959c8398 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/SimpleNodeWrapper.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/SimpleNodeWrapper.java @@ -7,6 +7,8 @@ */ package org.opendaylight.controller.sal.restconf.impl; +import com.google.common.base.Preconditions; + import java.net.URI; import org.opendaylight.yangtools.yang.common.QName; @@ -16,8 +18,6 @@ import org.opendaylight.yangtools.yang.data.api.MutableSimpleNode; import org.opendaylight.yangtools.yang.data.api.SimpleNode; import org.opendaylight.yangtools.yang.data.impl.NodeFactory; -import com.google.common.base.Preconditions; - public final class SimpleNodeWrapper implements NodeWrapper>, SimpleNode { private SimpleNode simpleNode; @@ -27,18 +27,18 @@ public final class SimpleNodeWrapper implements NodeWrapper>, Simp private URI namespace; private QName name; - public SimpleNodeWrapper(String localName, Object value) { + public SimpleNodeWrapper(final String localName, final Object value) { this.localName = Preconditions.checkNotNull(localName); this.value = value; } - public SimpleNodeWrapper(URI namespace, String localName, Object value) { + public SimpleNodeWrapper(final URI namespace, final String localName, final Object value) { this(localName, value); this.namespace = namespace; } @Override - public void setQname(QName name) { + public void setQname(final QName name) { Preconditions.checkState(simpleNode == null, "Cannot change the object, due to data inconsistencies."); this.name = name; } @@ -65,7 +65,7 @@ public final class SimpleNodeWrapper implements NodeWrapper>, Simp } @Override - public void setNamespace(URI namespace) { + public void setNamespace(final URI namespace) { Preconditions.checkState(simpleNode == null, "Cannot change the object, due to data inconsistencies."); this.namespace = namespace; } @@ -89,7 +89,7 @@ public final class SimpleNodeWrapper implements NodeWrapper>, Simp localName = null; name = null; } - return (SimpleNode) simpleNode; + return simpleNode; } @Override @@ -98,6 +98,7 @@ public final class SimpleNodeWrapper implements NodeWrapper>, Simp } @Override + @Deprecated public CompositeNode getParent() { return unwrap().getParent(); } @@ -108,6 +109,7 @@ public final class SimpleNodeWrapper implements NodeWrapper>, Simp } @Override + @Deprecated public ModifyAction getModificationAction() { return unwrap().getModificationAction(); } @@ -123,7 +125,7 @@ public final class SimpleNodeWrapper implements NodeWrapper>, Simp } @Override - public Object setValue(Object value) { + public Object setValue(final Object value) { return unwrap().setValue(value); }