From 43f538f8951a1f61f4adcbe2e1dcc0b2b44ae1ac Mon Sep 17 00:00:00 2001 From: Mariano Diaz Date: Tue, 3 Nov 2020 15:51:52 -0500 Subject: fix sonar issues Issue-ID: AAI-2882 Signed-off-by: Mariano Diaz Change-Id: I9d48b036ca7e0f50ecc775ea6ecb6503d4688165 --- .../src/main/java/org/onap/aai/TenantIsolation/DataImportTasks.java | 2 +- aai-resources/src/main/java/org/onap/aai/rest/BulkConsumer.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'aai-resources/src/main') diff --git a/aai-resources/src/main/java/org/onap/aai/TenantIsolation/DataImportTasks.java b/aai-resources/src/main/java/org/onap/aai/TenantIsolation/DataImportTasks.java index 917146f..c22251d 100644 --- a/aai-resources/src/main/java/org/onap/aai/TenantIsolation/DataImportTasks.java +++ b/aai-resources/src/main/java/org/onap/aai/TenantIsolation/DataImportTasks.java @@ -66,7 +66,7 @@ import org.apache.commons.io.filefilter.RegexFileFilter; public class DataImportTasks { private static final Logger LOGGER; - private static final SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss"); + private SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss"); private static final List EXTS = Arrays.asList("tar.gz", "tgz"); diff --git a/aai-resources/src/main/java/org/onap/aai/rest/BulkConsumer.java b/aai-resources/src/main/java/org/onap/aai/rest/BulkConsumer.java index 4bd1a0d..a2f83b0 100644 --- a/aai-resources/src/main/java/org/onap/aai/rest/BulkConsumer.java +++ b/aai-resources/src/main/java/org/onap/aai/rest/BulkConsumer.java @@ -321,7 +321,8 @@ public abstract class BulkConsumer extends RESTAPI { } UriComponents uriComponents = UriComponentsBuilder.fromUriString(itemURIfield.getAsString()).build(); - if (uriComponents.getPath().endsWith("/relationship-list/relationship")) { + if (uriComponents.getPath() != null && + uriComponents.getPath().endsWith("/relationship-list/relationship")) { if (method.equals(HttpMethod.PUT)) { bulkOperation.setHttpMethod(HttpMethod.PUT_EDGE); } else if (method.equals(HttpMethod.DELETE)) { -- cgit 1.2.3-korg