summaryrefslogtreecommitdiffstats
path: root/aai-core/src/main/java/org/onap/aai/restcore/util/URITools.java
diff options
context:
space:
mode:
Diffstat (limited to 'aai-core/src/main/java/org/onap/aai/restcore/util/URITools.java')
-rw-r--r--aai-core/src/main/java/org/onap/aai/restcore/util/URITools.java32
1 files changed, 18 insertions, 14 deletions
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<String, String> 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;