Remove redundant local variable 26/106426/1
authorIvan Hrasko <ivan.hrasko@pantheon.tech>
Thu, 8 Jun 2023 11:51:29 +0000 (13:51 +0200)
committerIvan Hrasko <ivan.hrasko@pantheon.tech>
Thu, 8 Jun 2023 11:52:07 +0000 (13:52 +0200)
Local variable openApiObject is redundant we can directly return
from method.

Change-Id: I3497f4461d0b75498aeb5bdb8721e52fc9758687
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
restconf/restconf-openapi/src/main/java/org/opendaylight/restconf/openapi/mountpoints/MountPointOpenApi.java

index be380a5b830caa5cdf1596b9c7807f8730b6cef2..2106a66634a4c2bc6205a85ea694e6c4498353cc 100644 (file)
@@ -145,9 +145,7 @@ public class MountPointOpenApi implements DOMMountPointListener, AutoCloseable {
         if (DATASTORES_LABEL.equals(module) && DATASTORES_REVISION.equals(revision)) {
             return generateDataStoreOpenApi(uriInfo, urlPrefix, deviceName);
         }
-        final OpenApiObject openApiObject = openApiGenerator.getApiDeclaration(module, revision, uriInfo, context,
-                urlPrefix);
-        return openApiObject;
+        return openApiGenerator.getApiDeclaration(module, revision, uriInfo, context, urlPrefix);
     }
 
     public OpenApiObject getMountPointApi(final UriInfo uriInfo, final Long id, final Optional<Integer> pageNum) {