avoid potential NPE in RestapiCallNode 12/120212/1
authorSmokowski, Kevin (ks6305) <ks6305@us.att.com>
Mon, 5 Apr 2021 15:29:14 +0000 (15:29 +0000)
committerSmokowski, Kevin (ks6305) <ks6305@us.att.com>
Mon, 5 Apr 2021 15:29:14 +0000 (15:29 +0000)
avoid potential NPE in class sendRequest method sendRequest

Issue-ID: CCSDK-3246
Signed-off-by: Smokowski, Kevin (ks6305) <ks6305@us.att.com>
Change-Id: I3b378336887b43c55ec2a3cdb8a82a4578eb6260

plugins/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java

index e42dfa4..ad74b02 100755 (executable)
@@ -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;
             }