diff options
author | Piotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com> | 2020-07-27 16:28:52 +0200 |
---|---|---|
committer | Piotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com> | 2020-08-06 15:29:29 +0200 |
commit | 4710dd757cbe89a2ac38f07c1fbb977ed570becf (patch) | |
tree | 16690784ba6dc1ef4e5d7275cafedda7c39b1f8a /rest-services/dmaap-client | |
parent | 6f07a03be43f84bf251ff8376551d744ac2e646e (diff) |
Fix SDK vulnerabilities
- Update spring boot dependencies and fix warnings about deprecations.
- Update testcontainers version to 1.14.3
- Top up patch version to 1.4.1
Issue-ID: DCAEGEN2-2277
Signed-off-by: Piotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com>
Change-Id: I2173e0160728f2d404c7cf65e1869a642db49ece
Diffstat (limited to 'rest-services/dmaap-client')
3 files changed, 6 insertions, 9 deletions
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){ |