aboutsummaryrefslogtreecommitdiffstats
path: root/grpc
diff options
context:
space:
mode:
authorSravanKumarGunda <sravan.kumar1@huawei.com>2020-06-18 19:05:44 +0530
committerSravanKumarGunda <sravan.kumar1@huawei.com>2020-07-02 16:02:50 +0530
commitc3391bef9e04c2ad38ed96bd28a5c43ab6d961de (patch)
treefbb3c017de9d5e016a7d9de88b0ea1193b9d6265 /grpc
parent022ee4b8daa1b852d72c1083658d1efb254f9dd5 (diff)
Code Improvements-Sonar Issue Fixes
Signed-off-by: SravanKumarGunda <sravan.kumar1@huawei.com> Issue-ID: CLI-270 Change-Id: Iba00ddc8c471bc5990d87ba3729af373e2bd6711
Diffstat (limited to 'grpc')
-rw-r--r--grpc/grpc-client/src/main/java/org/open/infc/grpc/client/OpenRemoteCli.java12
-rw-r--r--grpc/grpc-server/src/main/java/org/open/infc/grpc/server/OpenInterfaceGrpcServer.java1
2 files changed, 5 insertions, 8 deletions
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();
}
diff --git a/grpc/grpc-server/src/main/java/org/open/infc/grpc/server/OpenInterfaceGrpcServer.java b/grpc/grpc-server/src/main/java/org/open/infc/grpc/server/OpenInterfaceGrpcServer.java
index 9f236e5c..6bca7b38 100644
--- a/grpc/grpc-server/src/main/java/org/open/infc/grpc/server/OpenInterfaceGrpcServer.java
+++ b/grpc/grpc-server/src/main/java/org/open/infc/grpc/server/OpenInterfaceGrpcServer.java
@@ -126,6 +126,7 @@ public class OpenInterfaceGrpcServer {
private String outputs = "";
+ @Override
public void print(String msg) {
outputs += msg + "\n";
}