Use (Identifiable)Item.of() 87/72887/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 12 Jun 2018 15:25:33 +0000 (17:25 +0200)
committerStephen Kitt <skitt@redhat.com>
Tue, 12 Jun 2018 16:49:58 +0000 (16:49 +0000)
Constructors have been deprecated, use static factory methods
instead.

Change-Id: Ib456b7f4a0788d4074f73168b8b8cb73b8e0d68b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/LazyDataObjectModification.java

index d12ec53..eb2aed7 100644 (file)
@@ -21,7 +21,8 @@ import org.opendaylight.yangtools.yang.binding.ChildOf;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.Identifiable;
 import org.opendaylight.yangtools.yang.binding.Identifier;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.IdentifiableItem;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.Item;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.PathArgument;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
@@ -223,21 +224,20 @@ final class LazyDataObjectModification<T extends DataObject> implements DataObje
     @SuppressWarnings("unchecked")
     public <C extends Identifiable<K> & ChildOf<? super T>, K extends Identifier<C>> DataObjectModification<C>
             getModifiedChildListItem(final Class<C> listItem, final K listKey) {
-        return (DataObjectModification<C>) getModifiedChild(new InstanceIdentifier.IdentifiableItem<>(
-                listItem, listKey));
+        return (DataObjectModification<C>) getModifiedChild(IdentifiableItem.of(listItem, listKey));
     }
 
     @Override
     @SuppressWarnings("unchecked")
     public <C extends ChildOf<? super T>> DataObjectModification<C> getModifiedChildContainer(final Class<C> arg) {
-        return (DataObjectModification<C>) getModifiedChild(new InstanceIdentifier.Item<>(arg));
+        return (DataObjectModification<C>) getModifiedChild(Item.of(arg));
     }
 
     @Override
     @SuppressWarnings("unchecked")
     public <C extends Augmentation<T> & DataObject> DataObjectModification<C> getModifiedAugmentation(
             final Class<C> augmentation) {
-        return (DataObjectModification<C>) getModifiedChild(new InstanceIdentifier.Item<>(augmentation));
+        return (DataObjectModification<C>) getModifiedChild(Item.of(augmentation));
     }
 
     private T deserialize(final Optional<NormalizedNode<?, ?>> dataAfter) {

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.