From: Smokowski, Kevin (ks6305) Date: Mon, 5 Apr 2021 15:29:14 +0000 (+0000) Subject: avoid potential NPE in RestapiCallNode X-Git-Tag: 1.3.0~27 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F12%2F120212%2F1;p=ccsdk%2Fsli.git avoid potential NPE in RestapiCallNode avoid potential NPE in class sendRequest method sendRequest Issue-ID: CCSDK-3246 Signed-off-by: Smokowski, Kevin (ks6305) Change-Id: I3b378336887b43c55ec2a3cdb8a82a4578eb6260 --- diff --git a/plugins/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java b/plugins/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java index e42dfa484..ad74b02de 100755 --- a/plugins/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java +++ b/plugins/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java @@ -531,7 +531,7 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { } } catch (SvcLogicException e) { boolean shouldRetry = false; - if (e.getCause().getCause() instanceof SocketException) { + if (e.getCause() != null && (e.getCause() instanceof SocketException || (e.getCause().getCause() != null && e.getCause().getCause() instanceof SocketException))) { shouldRetry = true; }