From c3391bef9e04c2ad38ed96bd28a5c43ab6d961de Mon Sep 17 00:00:00 2001 From: SravanKumarGunda Date: Thu, 18 Jun 2020 19:05:44 +0530 Subject: Code Improvements-Sonar Issue Fixes Signed-off-by: SravanKumarGunda Issue-ID: CLI-270 Change-Id: Iba00ddc8c471bc5990d87ba3729af373e2bd6711 --- .../main/java/org/open/infc/grpc/client/OpenRemoteCli.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'grpc/grpc-client') diff --git a/grpc/grpc-client/src/main/java/org/open/infc/grpc/client/OpenRemoteCli.java b/grpc/grpc-client/src/main/java/org/open/infc/grpc/client/OpenRemoteCli.java index 724267e8..1875a761 100644 --- a/grpc/grpc-client/src/main/java/org/open/infc/grpc/client/OpenRemoteCli.java +++ b/grpc/grpc-client/src/main/java/org/open/infc/grpc/client/OpenRemoteCli.java @@ -44,8 +44,7 @@ public class OpenRemoteCli { OpenInterfaceGrpcClient client = new OpenInterfaceGrpcClient( host, port, timeout); try { - Result result = client.remoteCli(Args.newBuilder().setRequestId(this.requestId).addAllArgs(args).build()); - return result; + return client.remoteCli(Args.newBuilder().setRequestId(this.requestId).addAllArgs(args).build()); } finally { client.shutdown(); } @@ -63,8 +62,7 @@ public class OpenRemoteCli { params.put("format", "json"); Input input = Input.newBuilder().setAction(action).setRequestId(requestId).putAllOptions(options).putAllParams(params).build(); - Output output = client.invoke(input); - return output; + return client.invoke(input); } finally { client.shutdown(); } @@ -86,8 +84,7 @@ public class OpenRemoteCli { host, port); try { - Result result = client.remoteCli(Args.newBuilder().setRequestId(reqId).addAllArgs(args).build()); - return result; + return client.remoteCli(Args.newBuilder().setRequestId(reqId).addAllArgs(args).build()); } finally { client.shutdown(); } @@ -117,8 +114,7 @@ public class OpenRemoteCli { params.put("format", "json"); Input input = Input.newBuilder().setAction(action).setRequestId(reqId).putAllOptions(options).putAllParams(params).build(); - Output output = client.invoke(input); - return output; + return client.invoke(input); } finally { client.shutdown(); } -- cgit 1.2.3-korg