From 88a8aac162d54810d2cf824545a9e8e4d28a71a7 Mon Sep 17 00:00:00 2001 From: Tony Tkacik Date: Fri, 17 Oct 2014 14:05:06 +0200 Subject: [PATCH] Bug 865: Fixed use of removed deprecated YANGInstanceIdentifier methods. Some components in controller still used methods which was deprecated before Helium and was removed after Helium was released to accomodate API changes for 0.7.0 Yangtools. This patch migrates code to replacement methods. Change-Id: I146a08caefeb0d666223cf66600a4342a5b49165 Signed-off-by: Tony Tkacik --- .../sal/common/impl/util/compat/DataNormalizerTest.java | 8 ++++---- .../broker/BackwardsCompatibleMountPointManagerTest.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/opendaylight/md-sal/sal-common-impl/src/test/java/org/opendaylight/controller/md/sal/common/impl/util/compat/DataNormalizerTest.java b/opendaylight/md-sal/sal-common-impl/src/test/java/org/opendaylight/controller/md/sal/common/impl/util/compat/DataNormalizerTest.java index 1595288608..3fa8d4e5e9 100644 --- a/opendaylight/md-sal/sal-common-impl/src/test/java/org/opendaylight/controller/md/sal/common/impl/util/compat/DataNormalizerTest.java +++ b/opendaylight/md-sal/sal-common-impl/src/test/java/org/opendaylight/controller/md/sal/common/impl/util/compat/DataNormalizerTest.java @@ -119,7 +119,7 @@ public class DataNormalizerTest { static final Short OUTER_LIST_ID = (short) 10; - static final YangInstanceIdentifier OUTER_LIST_PATH_LEGACY = YangInstanceIdentifier.builder(TEST_QNAME) + static final YangInstanceIdentifier OUTER_LIST_PATH_LEGACY = YangInstanceIdentifier.builder(TEST_PATH) .nodeWithKey(OUTER_LIST_QNAME, ID_QNAME, OUTER_LIST_ID).build(); static final YangInstanceIdentifier LEAF_TWO_PATH_LEGACY = YangInstanceIdentifier.builder(OUTER_LIST_PATH_LEGACY) @@ -295,7 +295,7 @@ public class DataNormalizerTest { .withNodeIdentifier(new NodeIdentifier(TEST_QNAME)).withChild(testAnyXmlNode).build(); DataNormalizer normalizer = new DataNormalizer(createTestContext()); - Node legacyNode = normalizer.toLegacy(YangInstanceIdentifier.builder(TEST_QNAME).build(), testContainerNode); + Node legacyNode = normalizer.toLegacy(YangInstanceIdentifier.builder().node(TEST_QNAME).build(), testContainerNode); verifyLegacyNode( legacyNode, @@ -332,7 +332,7 @@ public class DataNormalizerTest { DataNormalizer normalizer = new DataNormalizer(createTestContext()); - Node legacyNode = normalizer.toLegacy(YangInstanceIdentifier.builder(TEST_QNAME).build(), testContainerNode); + Node legacyNode = normalizer.toLegacy(YangInstanceIdentifier.builder().node(TEST_QNAME).build(), testContainerNode); verifyLegacyNode( legacyNode, @@ -359,7 +359,7 @@ public class DataNormalizerTest { DataNormalizer normalizer = new DataNormalizer(createTestContext()); - Node legacyNode = normalizer.toLegacy(YangInstanceIdentifier.builder(TEST_QNAME).build(), testContainerNode); + Node legacyNode = normalizer.toLegacy(YangInstanceIdentifier.builder().node(TEST_QNAME).build(), testContainerNode); verifyLegacyNode( legacyNode, diff --git a/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/sal/dom/broker/BackwardsCompatibleMountPointManagerTest.java b/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/sal/dom/broker/BackwardsCompatibleMountPointManagerTest.java index 4d239a93f7..05c4793218 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/sal/dom/broker/BackwardsCompatibleMountPointManagerTest.java +++ b/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/sal/dom/broker/BackwardsCompatibleMountPointManagerTest.java @@ -48,7 +48,7 @@ public class BackwardsCompatibleMountPointManagerTest { private BackwardsCompatibleMountPointManager compatibleMountPointManager; static final QName qName = QName.create("namespace", "12-12-1212", "mount"); - static final YangInstanceIdentifier id = YangInstanceIdentifier.builder(qName).build(); + static final YangInstanceIdentifier id = YangInstanceIdentifier.of(qName); @Before public void setUp() throws Exception { -- 2.36.6