summaryrefslogtreecommitdiffstats
path: root/rest-services
diff options
context:
space:
mode:
Diffstat (limited to 'rest-services')
-rw-r--r--rest-services/cbs-client/pom.xml2
-rw-r--r--rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/impl/streams/gson/GsonUtils.java4
-rw-r--r--rest-services/dmaap-client/pom.xml4
-rw-r--r--rest-services/dmaap-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/impl/MessageRouterSubscriberImpl.java6
-rw-r--r--rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/MessageRouterTestsUtils.java5
-rw-r--r--rest-services/http-client/pom.xml4
-rw-r--r--rest-services/model/pom.xml2
-rw-r--r--rest-services/pom.xml2
8 files changed, 13 insertions, 16 deletions
diff --git a/rest-services/cbs-client/pom.xml b/rest-services/cbs-client/pom.xml
index be44724f..2ea991f1 100644
--- a/rest-services/cbs-client/pom.xml
+++ b/rest-services/cbs-client/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>org.onap.dcaegen2.services.sdk</groupId>
<artifactId>dcaegen2-services-sdk-rest-services</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
diff --git a/rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/impl/streams/gson/GsonUtils.java b/rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/impl/streams/gson/GsonUtils.java
index 0881c082..2df63359 100644
--- a/rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/impl/streams/gson/GsonUtils.java
+++ b/rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/impl/streams/gson/GsonUtils.java
@@ -2,7 +2,7 @@
* ============LICENSE_START====================================
* DCAEGEN2-SERVICES-SDK
* =========================================================
- * Copyright (C) 2019 Nokia. All rights reserved.
+ * Copyright (C) 2019-2020 Nokia. All rights reserved.
* =========================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -93,7 +93,7 @@ public final class GsonUtils {
public static JsonElement readFromResource(String resource) throws IOException {
try (Reader reader = new InputStreamReader(GsonUtils.class.getResourceAsStream(resource))) {
- return new JsonParser().parse(reader);
+ return JsonParser.parseReader(reader);
}
}
diff --git a/rest-services/dmaap-client/pom.xml b/rest-services/dmaap-client/pom.xml
index c6ac6063..586c97e3 100644
--- a/rest-services/dmaap-client/pom.xml
+++ b/rest-services/dmaap-client/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>org.onap.dcaegen2.services.sdk</groupId>
<artifactId>dcaegen2-services-sdk-rest-services</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
@@ -77,4 +77,4 @@
<artifactId>junit-jupiter</artifactId>
</dependency>
</dependencies>
-</project> \ No newline at end of file
+</project>
diff --git a/rest-services/dmaap-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/impl/MessageRouterSubscriberImpl.java b/rest-services/dmaap-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/impl/MessageRouterSubscriberImpl.java
index 1edaf72f..72c0bad3 100644
--- a/rest-services/dmaap-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/impl/MessageRouterSubscriberImpl.java
+++ b/rest-services/dmaap-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/impl/MessageRouterSubscriberImpl.java
@@ -2,7 +2,7 @@
* ============LICENSE_START====================================
* DCAEGEN2-SERVICES-SDK
* =========================================================
- * Copyright (C) 2019 Nokia. All rights reserved.
+ * Copyright (C) 2019-2020 Nokia. All rights reserved.
* =========================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -80,12 +80,10 @@ public class MessageRouterSubscriberImpl implements MessageRouterSubscriber {
}
private List<JsonElement> getAsJsonElements(HttpResponse httpResponse){
- JsonParser parser = new JsonParser();
-
JsonArray bodyAsJsonArray = httpResponse
.bodyAsJson(StandardCharsets.UTF_8, gson, JsonArray.class);
- return List.ofAll(bodyAsJsonArray).map(arrayElement -> parser.parse(arrayElement.getAsString()));
+ return List.ofAll(bodyAsJsonArray).map(arrayElement -> JsonParser.parseString(arrayElement.getAsString()));
}
private String buildSubscribeUrl(MessageRouterSubscribeRequest request) {
diff --git a/rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/MessageRouterTestsUtils.java b/rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/MessageRouterTestsUtils.java
index 52946f56..8561e0b0 100644
--- a/rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/MessageRouterTestsUtils.java
+++ b/rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/MessageRouterTestsUtils.java
@@ -2,7 +2,7 @@
* ============LICENSE_START====================================
* DCAEGEN2-SERVICES-SDK
* =========================================================
- * Copyright (C) 2019 Nokia. All rights reserved.
+ * Copyright (C) 2019-2020 Nokia. All rights reserved.
* =========================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,7 +43,6 @@ import reactor.core.publisher.Flux;
public final class MessageRouterTestsUtils {
- private static final JsonParser parser = new JsonParser();
private MessageRouterTestsUtils() {}
public static MessageRouterPublishRequest createPublishRequest(String topicUrl){
@@ -78,7 +77,7 @@ public final class MessageRouterTestsUtils {
}
public static List<JsonElement> getAsJsonElements(List<String> messages){
- return messages.map(parser::parse);
+ return messages.map(JsonParser::parseString);
}
public static List<JsonObject> getAsJsonObjects(List<String> messages){
diff --git a/rest-services/http-client/pom.xml b/rest-services/http-client/pom.xml
index aae9aaf5..018bb33e 100644
--- a/rest-services/http-client/pom.xml
+++ b/rest-services/http-client/pom.xml
@@ -28,7 +28,7 @@
<parent>
<groupId>org.onap.dcaegen2.services.sdk</groupId>
<artifactId>dcaegen2-services-sdk-rest-services</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
@@ -88,4 +88,4 @@
<scope>test</scope>
</dependency>
</dependencies>
-</project> \ No newline at end of file
+</project>
diff --git a/rest-services/model/pom.xml b/rest-services/model/pom.xml
index bd6d9905..962f35bb 100644
--- a/rest-services/model/pom.xml
+++ b/rest-services/model/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.onap.dcaegen2.services.sdk</groupId>
<artifactId>dcaegen2-services-sdk-rest-services</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
diff --git a/rest-services/pom.xml b/rest-services/pom.xml
index 64514c1e..679c9da8 100644
--- a/rest-services/pom.xml
+++ b/rest-services/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>org.onap.dcaegen2.services</groupId>
<artifactId>sdk</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.dcaegen2.services.sdk</groupId>