From 01215e6125f5d8355d7b1a7508fd18cbd437a283 Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 5 Aug 2024 08:39:12 -0400 Subject: [PATCH] fix potential nullpointer when checking service url --- src/main/java/com/hcl/appscan/sdk/scanners/sast/SAClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/hcl/appscan/sdk/scanners/sast/SAClient.java b/src/main/java/com/hcl/appscan/sdk/scanners/sast/SAClient.java index 668a8253..62b0b510 100644 --- a/src/main/java/com/hcl/appscan/sdk/scanners/sast/SAClient.java +++ b/src/main/java/com/hcl/appscan/sdk/scanners/sast/SAClient.java @@ -362,7 +362,7 @@ private List getClientArgs(Map properties) { if(Boolean.parseBoolean(properties.getOrDefault(CoreConstants.ACCEPT_INVALID_CERTS, Boolean.toString(false)))) { args.add(OPT_ACCEPTS_SSL); } - if(properties.getOrDefault(CoreConstants.SERVER_URL, "").trim() != "") { //$NON-NLS-1$ //$NON-NLS-2$ + if(properties.get(CoreConstants.SERVER_URL) != null && properties.get(CoreConstants.SERVER_URL).trim() != "") { //$NON-NLS-1$ args.add("-D" + CoreConstants.BLUEMIX_SERVER + "=" + properties.get(CoreConstants.SERVER_URL)); //$NON-NLS-1$ //$NON-NLS-2$ }