diff options
author | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2019-03-01 10:32:17 +0530 |
---|---|---|
committer | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2019-03-01 10:53:31 +0530 |
commit | 8d59ae0158a8b3f0d038194f42b95424e8c8b38a (patch) | |
tree | 2b96c2638722680dd6b04d511008c5b20f538945 /grpc | |
parent | adfc77d913cb8e54750d8fe167fde2bb4ffc57ef (diff) |
Fix the code vulnerabilities
Issue-ID: CLI-129
Change-Id: I441d7897c2e47b8eda13775d66327401656300ba
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'grpc')
-rw-r--r-- | grpc/grpc-server/src/main/java/org/open/infc/grpc/server/OpenInterfaceGrpcServer.java | 5 |
1 files changed, 4 insertions, 1 deletions
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 45a64084..afbd7682 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 @@ -208,7 +208,10 @@ public class OpenInterfaceGrpcServer { Builder reply = Output.newBuilder(); reply.setSuccess(true); reply.putAttrs(OnapCommandConstants.ERROR, "{}"); - reply.putAddons("execution-id", executionStoreContext.getExecutionId()); + + if (executionStoreContext != null) + reply.putAddons("execution-id", executionStoreContext.getExecutionId()); + try { reply.putAttrs(OnapCommandConstants.RESULTS, new ObjectMapper().readTree(printOut).toString()); } catch (IOException e) { |