Use InstanceIdentifier.empty() 24/96424/1
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 4 Jun 2021 13:01:57 +0000 (15:01 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 4 Jun 2021 13:02:23 +0000 (15:02 +0200)
We do not need a builder here, just use the empty identifier.

Change-Id: I65d6cd0d27e71316b5a8eed330157b583e406474
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/restconf/impl/ControllerContext.java

index 1ff954517348d7cbade7e3cde0dc150fbc8ec755..f2b3d64ad82973cb7eb80f7fc2d5a63fa603723d 100644 (file)
@@ -597,8 +597,8 @@ public final class ControllerContext implements EffectiveModelContextListener, C
                 }
 
                 if (returnJustMountPoint || strings.size() == 1) {
-                    final YangInstanceIdentifier instance = YangInstanceIdentifier.builder().build();
-                    return new InstanceIdentifierContext<>(instance, mountPointSchema, mount, mountPointSchema);
+                    return new InstanceIdentifierContext<>(YangInstanceIdentifier.empty(), mountPointSchema, mount,
+                        mountPointSchema);
                 }
 
                 final String moduleNameBehindMountPoint = toModuleName(strings.get(1));