From 434c95a0731b5135a1067f76dfaac9a30878d6cb Mon Sep 17 00:00:00 2001 From: Eylon Malin Date: Thu, 28 Nov 2019 15:35:16 +0200 Subject: upgrade some 3rd parties dependencies Issue-ID: VID-705 Change-Id: Idd72448ed1b2f033005ff8031856efe06f67cdf4 Signed-off-by: Eylon Malin --- vid-app-common/pom.xml | 10 ++--- .../OperationalEnvironmentController.java | 33 +++++++++------- .../java/org/onap/vid/services/AAIServiceTree.java | 44 ++++++++++++---------- 3 files changed, 49 insertions(+), 38 deletions(-) (limited to 'vid-app-common') diff --git a/vid-app-common/pom.xml b/vid-app-common/pom.xml index 9e5f58dd3..f618ec822 100755 --- a/vid-app-common/pom.xml +++ b/vid-app-common/pom.xml @@ -26,16 +26,16 @@ UTF-8 UTF-8 2.5.0 - 5.1.9.RELEASE + 5.2.0.RELEASE 4.3.22.RELEASE 4.3.11.Final - 2.9.9 - 2.9.9.3 + 2.10.1 + 2.10.1 1.6.1 - 2.29 + 2.29.1 2.22.1 3.141.59 **/webapp/**/*,**/*.js @@ -54,7 +54,7 @@ content/sites/site/org/onap/vid/${project.version} 1.8.9 - 1.3.30 + 1.3.60 1.8 1.6 diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/OperationalEnvironmentController.java b/vid-app-common/src/main/java/org/onap/vid/controller/OperationalEnvironmentController.java index 44bdc813b..d291f9925 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/OperationalEnvironmentController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controller/OperationalEnvironmentController.java @@ -20,10 +20,21 @@ */ package org.onap.vid.controller; +import static org.onap.vid.utils.Logging.getMethodCallerName; +import static org.onap.vid.utils.Logging.getMethodName; + import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.MoreObjects; import io.joshworks.restclient.http.HttpResponse; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.exception.ExceptionUtils; import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; @@ -42,19 +53,13 @@ import org.onap.vid.utils.SystemPropertiesWrapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.web.bind.MissingServletRequestParameterException; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletRequest; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import static org.onap.vid.utils.Logging.getMethodCallerName; -import static org.onap.vid.utils.Logging.getMethodName; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("operationalEnvironment") @@ -64,7 +69,7 @@ public class OperationalEnvironmentController extends VidRestrictedBaseControlle private final MsoBusinessLogic msoBusinessLogic; private final SystemPropertiesWrapper systemPropertiesWrapper; - private static final Pattern RECOVERY_ACTION_MESSAGE_PATTERN = Pattern.compile("from String \"(.*)\": value not"); + private static final Pattern RECOVERY_ACTION_MESSAGE_PATTERN = Pattern.compile("from String \"(.*)\": not one"); @Autowired diff --git a/vid-app-common/src/main/java/org/onap/vid/services/AAIServiceTree.java b/vid-app-common/src/main/java/org/onap/vid/services/AAIServiceTree.java index d62d5d5d4..7b0e5f56f 100644 --- a/vid-app-common/src/main/java/org/onap/vid/services/AAIServiceTree.java +++ b/vid-app-common/src/main/java/org/onap/vid/services/AAIServiceTree.java @@ -20,8 +20,25 @@ package org.onap.vid.services; +import static java.util.Comparator.comparing; +import static java.util.stream.Collectors.toSet; +import static org.apache.commons.lang3.ObjectUtils.defaultIfNull; +import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER; + import com.fasterxml.jackson.databind.JsonNode; import com.google.common.collect.ImmutableList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.concurrent.ConcurrentSkipListSet; +import java.util.concurrent.ExecutorService; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import javax.inject.Inject; +import javax.ws.rs.core.Response; import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.aai.AaiClientInterface; import org.onap.vid.aai.util.AAITreeConverter; @@ -36,19 +53,6 @@ import org.onap.vid.utils.Tree; import org.springframework.http.HttpMethod; import org.springframework.stereotype.Component; -import javax.inject.Inject; -import javax.ws.rs.core.Response; -import java.util.*; -import java.util.concurrent.ConcurrentSkipListSet; -import java.util.concurrent.ExecutorService; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import static java.util.Comparator.comparing; -import static java.util.stream.Collectors.toSet; -import static org.apache.commons.lang3.ObjectUtils.defaultIfNull; -import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER; - @Component public class AAIServiceTree { @@ -207,12 +211,14 @@ public class AAIServiceTree { Map modelNameByModelVersionId = new HashMap<>(); JsonNode models = getModels(aaiClient, invariantIDs); - for (JsonNode model: models) { - JsonNode modelVersions = model.get("model-vers").get("model-ver"); - for (JsonNode modelVersion: modelVersions) { - final String modelVersionId = modelVersion.get("model-version-id").asText(); - modelVersionByModelVersionId.put(modelVersionId, modelVersion.get("model-version").asText()); - modelNameByModelVersionId.put(modelVersionId, modelVersion.get("model-name").asText()); + if (models!=null) { + for (JsonNode model : models) { + JsonNode modelVersions = model.get("model-vers").get("model-ver"); + for (JsonNode modelVersion : modelVersions) { + final String modelVersionId = modelVersion.get("model-version-id").asText(); + modelVersionByModelVersionId.put(modelVersionId, modelVersion.get("model-version").asText()); + modelNameByModelVersionId.put(modelVersionId, modelVersion.get("model-name").asText()); + } } } -- cgit 1.2.3-korg