From d9a489527750074eb8dd42bd2d0cfaef5de7c86f Mon Sep 17 00:00:00 2001 From: Jimmy Forsyth Date: Tue, 10 Mar 2020 11:25:48 -0400 Subject: Move back to spring-boot 1.5 for bugfix Issue-ID: AAI-2831 Signed-off-by: Jimmy Forsyth Change-Id: I1e3d278fe343e4f05cdfd71d2443aef19c8541c2 --- aai-core/pom.xml | 2 +- .../ValidationServiceNoAuthClient.java | 1 - .../java/org/onap/aai/restcore/util/URITools.java | 32 ++++++++++++---------- 3 files changed, 19 insertions(+), 16 deletions(-) (limited to 'aai-core') diff --git a/aai-core/pom.xml b/aai-core/pom.xml index eb8e8ee7..84fb4dc8 100644 --- a/aai-core/pom.xml +++ b/aai-core/pom.xml @@ -28,7 +28,7 @@ limitations under the License. org.onap.aai.aai-common aai-parent - 1.6.9-SNAPSHOT + 1.6.10-SNAPSHOT ../aai-parent/pom.xml aai-core diff --git a/aai-core/src/main/java/org/onap/aai/prevalidation/ValidationServiceNoAuthClient.java b/aai-core/src/main/java/org/onap/aai/prevalidation/ValidationServiceNoAuthClient.java index 6173e4bd..d373ae78 100644 --- a/aai-core/src/main/java/org/onap/aai/prevalidation/ValidationServiceNoAuthClient.java +++ b/aai-core/src/main/java/org/onap/aai/prevalidation/ValidationServiceNoAuthClient.java @@ -26,7 +26,6 @@ import org.onap.aai.restclient.NoAuthRestClient; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; -import org.springframework.http.client.ClientHttpRequestFactory; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.util.MultiValueMap; diff --git a/aai-core/src/main/java/org/onap/aai/restcore/util/URITools.java b/aai-core/src/main/java/org/onap/aai/restcore/util/URITools.java index fc32f859..a757d3db 100644 --- a/aai-core/src/main/java/org/onap/aai/restcore/util/URITools.java +++ b/aai-core/src/main/java/org/onap/aai/restcore/util/URITools.java @@ -47,21 +47,25 @@ public class URITools { MultivaluedMap result = new MultivaluedHashMap<>(); String queryParams = uri.getRawQuery(); if (queryParams != null) { - String[] sections = queryParams.split("&"); - String[] query = null; - String key, value = ""; - for (String section : sections) { - query = section.split("="); - key = UriUtils.decode(query[0], "UTF-8"); - if (query[1] != null) { - query[1] = query[1].replaceAll("\\+", "%20"); - } - value = UriUtils.decode(query[1], "UTF-8"); - if (result.containsKey(key)) { - result.add(key, value); - } else { - result.putSingle(key, value); + try { + String[] sections = queryParams.split("&"); + String[] query = null; + String key, value = ""; + for (String section : sections) { + query = section.split("="); + key = UriUtils.decode(query[0], "UTF-8"); + if (query[1] != null) { + query[1] = query[1].replaceAll("\\+", "%20"); + } + value = UriUtils.decode(query[1], "UTF-8"); + if (result.containsKey(key)) { + result.add(key, value); + } else { + result.putSingle(key, value); + } } + } catch (UnsupportedEncodingException e) { + } } return result; -- cgit 1.2.3-korg