Eliminate useless allocation 73/89373/2
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 25 Apr 2020 14:03:33 +0000 (16:03 +0200)
committerRobert Varga <nite@hq.sk>
Sat, 25 Apr 2020 20:15:57 +0000 (20:15 +0000)
For some reason we are going through an indirection instead of
getting the modules directly. Fix that.

Change-Id: Id49d5db3501dae6cb5368599f4f8c7855115a962
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/services/simple/impl/RestconfOperationsServiceImpl.java

index e543fd050a6404675ad76d129f4eb76b9f80831d..46e6b8cb76d61df12d969e441e1d7a2dee012464 100644 (file)
@@ -79,8 +79,7 @@ public class RestconfOperationsServiceImpl implements RestconfOperationsService
 
     @Override
     public NormalizedNodeContext getOperations(final UriInfo uriInfo) {
-        final SchemaContextRef ref = new SchemaContextRef(this.schemaContextHandler.get());
-        return getOperations(ref.getModules(), null);
+        return getOperations(schemaContextHandler.get().getModules(), null);
     }
 
     @Override