diff options
Diffstat (limited to 'grpc')
-rw-r--r-- | grpc/grpc-client/src/main/java/org/open/infc/grpc/client/OpenInterfaceGrpcClient.java | 7 | ||||
-rw-r--r-- | grpc/grpc-server/src/main/java/org/open/infc/grpc/server/OpenInterfaceGrpcServer.java | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/grpc/grpc-client/src/main/java/org/open/infc/grpc/client/OpenInterfaceGrpcClient.java b/grpc/grpc-client/src/main/java/org/open/infc/grpc/client/OpenInterfaceGrpcClient.java index efc941f9..fc007a01 100644 --- a/grpc/grpc-client/src/main/java/org/open/infc/grpc/client/OpenInterfaceGrpcClient.java +++ b/grpc/grpc-client/src/main/java/org/open/infc/grpc/client/OpenInterfaceGrpcClient.java @@ -43,8 +43,7 @@ public class OpenInterfaceGrpcClient { public static class OpenInterfaceGrpcExecption extends Exception { private static final long serialVersionUID = -8755636432217894246L; - private int errorCode = -1; - + private int errorCode = -1; //NOSONAR public OpenInterfaceGrpcExecption(int errorCode, String message) { super(message); this.errorCode = errorCode; @@ -52,10 +51,10 @@ public class OpenInterfaceGrpcClient { } public static class OpenInterfaceGrpcTimeoutExecption extends OpenInterfaceGrpcExecption { - private static int errorCode = 1; + private static final int ERROR_CODE = 1; public OpenInterfaceGrpcTimeoutExecption(String message) { - super(errorCode, message); + super(ERROR_CODE, message); } } 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 a7c0b175..c2a61320 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 @@ -159,8 +159,8 @@ public class OpenInterfaceGrpcServer { //Set the profile to current one OnapCommandRegistrar.getRegistrar().setProfile( profile, - new ArrayList<String>(), - new ArrayList<String>()); + new ArrayList<>(), + new ArrayList<>()); //fill from profile Map<String, String> cache= OnapCommandRegistrar.getRegistrar().getParamCache(product); |