BUG-868: remove deprecated YangInstanceIdentifier methods 21/11921/2
authorRobert Varga <rovarga@cisco.com>
Mon, 13 Oct 2014 08:58:56 +0000 (10:58 +0200)
committerRobert Varga <rovarga@cisco.com>
Mon, 13 Oct 2014 11:38:07 +0000 (13:38 +0200)
This cleans up the methods which were previously deprecated. We still
retain the getPath() and toInstance() -- these will be fixed up.

Change-Id: I37b869af069de256484b833608b082cb6edfb15a
Signed-off-by: Robert Varga <rovarga@cisco.com>
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangInstanceIdentifier.java
yang/yang-data-api/src/test/java/org/opendaylight/yangtools/yang/data/api/InstanceIdentifierTest.java

index 3423110bdc0e844996d90955a5c982f08ecba4a2..c882db6693bb9b2a9b97ecb31650f8d95c94004f 100644 (file)
@@ -316,19 +316,6 @@ public final class YangInstanceIdentifier implements Path<YangInstanceIdentifier
         return new BuilderImpl(origin.getPathArguments(), origin.hashCode());
     }
 
-    /**
-     * Returns new builder for InstanceIdentifier with first path argument set to {@link NodeIdentifier}.
-     *
-     * @param node QName of first {@link NodeIdentifier} path argument.
-     * @return  new builder for InstanceIdentifier with first path argument set to {@link NodeIdentifier}.
-     *
-     * @deprecated Either use {@link #node(QName)} or instantiate an intermediate builder.
-     */
-    @Deprecated
-    public static InstanceIdentifierBuilder builder(final QName node) {
-        return builder().node(node);
-    }
-
     /**
      * Path argument / component of InstanceIdentifier
      *
@@ -644,16 +631,6 @@ public final class YangInstanceIdentifier implements Path<YangInstanceIdentifier
             this.childNames = ImmutableSet.copyOf(childNames);
         }
 
-        /**
-         * Augmentation node has no QName
-         *
-         * @deprecated Use {@link #AugmentationIdentifier(Set)} instead.
-         */
-        @Deprecated
-        public AugmentationIdentifier(final QName nodeType, final Set<QName> childNames) {
-            this(childNames);
-        }
-
         /**
          * Returns set of all possible child nodes
          *
index d451d6e86166f359e8f79008f07318eb1d1957d3..cc34224da23a7cf8b6e40856e37c89c6651dd0c9 100644 (file)
@@ -168,7 +168,7 @@ public class InstanceIdentifierTest {
         assertEquals( "PathArg 3 node type", nodeName3, it.next().getNodeType() );
         assertEquals( "PathArg 4 node type", nodeName4, it.next().getNodeType() );
 
-        newID = YangInstanceIdentifier.builder( nodeName1 ).build();
+        newID = YangInstanceIdentifier.builder().node( nodeName1 ).build();
 
         assertNotNull( "InstanceIdentifier is null", newID );
         assertEquals( "Path size", 1, Iterables.size(newID.getPathArguments()) );