From 96fad0c1841ab4eac0865bdb556e6e5b272dd2f7 Mon Sep 17 00:00:00 2001 From: hekeguang Date: Thu, 11 Aug 2022 09:44:15 +0800 Subject: PACKAGES UPGRADES IN DIRECT DEPENDENCIES FOR KOHN. Issue-ID: USECASEUI-679 Change-Id: I3274441c45bfbd9fa7811f2c97d0e015c0a9dce6 Signed-off-by: hekeguang --- server/pom.xml | 57 +++++++++++++++++++--- .../server/controller/IntentController.java | 4 +- .../impl/SotnServiceTemplateServiceImplTest.java | 14 ++++++ 3 files changed, 66 insertions(+), 9 deletions(-) diff --git a/server/pom.xml b/server/pom.xml index b123dae4..38eb449c 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -116,12 +116,18 @@ org.springframework.boot spring-boot-starter-jersey + + + tomcat-embed-websocket + org.apache.tomcat.embed + + org.postgresql postgresql - 42.3.1 + 42.3.6 @@ -158,6 +164,7 @@ org.springframework spring-context + 5.3.20 org.springframework @@ -179,6 +186,12 @@ org.apache.tomcat.embed tomcat-embed-websocket 8.5.58 + + + tomcat-annotations-api + org.apache.tomcat + + ch.qos.logback @@ -211,11 +224,17 @@ org.springframework.data spring-data-rest-webmvc - 3.3.4.RELEASE + 3.7.0 + + + spring-data-rest-core + org.springframework.data + 3.7.0 org.springframework spring-web + 5.3.20 org.springframework.data @@ -225,6 +244,7 @@ org.springframework spring-webmvc + 5.3.20 org.hibernate @@ -236,15 +256,31 @@ jetty-util 9.4.17.v20190418 + + com.squareup.okio + okio + 3.2.0 + com.google.guava guava 25.0-jre + + org.jetbrains.kotlin + kotlin-stdlib + 1.7.10 + com.squareup.okhttp3 okhttp - 3.12.1 + 4.9.3 + + + kotlin-stdlib + org.jetbrains.kotlin + + commons-beanutils @@ -262,27 +298,33 @@ com.fasterxml.jackson.core jackson-databind - ${jackson.version} + 2.13.3 com.fasterxml.jackson.core jackson-core - ${jackson.version} + 2.13.3 com.fasterxml.jackson.core jackson-annotations - ${jackson.version} + 2.13.3 com.squareup.retrofit2 retrofit 2.7.2 + + + okhttp + com.squareup.okhttp3 + + com.squareup.retrofit2 @@ -303,7 +345,7 @@ com.alibaba fastjson - 1.2.74 + 2.0.6 @@ -458,6 +500,7 @@ org.jacoco jacoco-maven-plugin + 0.8.5 prepare-agent diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/IntentController.java b/server/src/main/java/org/onap/usecaseui/server/controller/IntentController.java index 8de9efa4..86d8d6c9 100644 --- a/server/src/main/java/org/onap/usecaseui/server/controller/IntentController.java +++ b/server/src/main/java/org/onap/usecaseui/server/controller/IntentController.java @@ -222,7 +222,7 @@ public class IntentController { String url = IntentConstant.NLP_ONLINE_URL_BASE + "/api/online/predict"; HashMap headers = new HashMap<>(); String bodyStr = "{\"title\": \"predict\", \"text\": \"" + text - + "\", \"questions\":" + new JSONArray(Arrays.asList(questions)).toJSONString() + "}"; + + "\", \"questions\":" + new JSONArray().toJSONString(Arrays.asList(questions)) + "}"; logger.info("request body: " + bodyStr); HttpResponseResult result = HttpUtil.sendPostRequestByJson(url, headers, bodyStr); @@ -265,7 +265,7 @@ public class IntentController { String url = IntentConstant.NLP_ONLINE_URL_BASE + "/api/online/predict"; HashMap headers = new HashMap<>(); String bodyStr = "{\"title\": \"predict\", \"text\": \"" + text - + "\", \"questions\":" + new JSONArray(Arrays.asList(questions)).toJSONString() + "}"; + + "\", \"questions\":" + new JSONArray().toJSONString(Arrays.asList(questions)) + "}"; logger.info("request body: " + bodyStr); HttpResponseResult result = HttpUtil.sendPostRequestByJson(url, headers, bodyStr); diff --git a/server/src/test/java/org/onap/usecaseui/server/service/lcm/impl/SotnServiceTemplateServiceImplTest.java b/server/src/test/java/org/onap/usecaseui/server/service/lcm/impl/SotnServiceTemplateServiceImplTest.java index 9bbadd22..d1cec147 100644 --- a/server/src/test/java/org/onap/usecaseui/server/service/lcm/impl/SotnServiceTemplateServiceImplTest.java +++ b/server/src/test/java/org/onap/usecaseui/server/service/lcm/impl/SotnServiceTemplateServiceImplTest.java @@ -26,6 +26,7 @@ import okio.ByteString; import okio.Options; import okio.Sink; import okio.Timeout; +import org.jetbrains.annotations.NotNull; import org.junit.Before; import org.junit.Test; import org.onap.usecaseui.server.bean.lcm.sotne2eservice.E2EServiceInstanceRequest; @@ -499,6 +500,19 @@ public class SotnServiceTemplateServiceImplTest { @Override public BufferedSource source() { BufferedSource bufferedSource = new BufferedSource() { + + @NotNull + @Override + public BufferedSource peek() { + return null; + } + + @NotNull + @Override + public Buffer getBuffer() { + return null; + } + @Override public long read(Buffer buffer, long l) throws IOException { return 0; -- cgit 1.2.3-korg