summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/pom.xml57
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/controller/IntentController.java4
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/lcm/impl/SotnServiceTemplateServiceImplTest.java14
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 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jersey</artifactId>
+ <exclusions>
+ <exclusion>
+ <artifactId>tomcat-embed-websocket</artifactId>
+ <groupId>org.apache.tomcat.embed</groupId>
+ </exclusion>
+ </exclusions>
</dependency>
<!-- postgresql dependency-->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
- <version>42.3.1</version>
+ <version>42.3.6</version>
</dependency>
<dependency>
@@ -158,6 +164,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
+ <version>5.3.20</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
@@ -179,6 +186,12 @@
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-websocket</artifactId>
<version>8.5.58</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>tomcat-annotations-api</artifactId>
+ <groupId>org.apache.tomcat</groupId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
@@ -211,11 +224,17 @@
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-rest-webmvc</artifactId>
- <version>3.3.4.RELEASE</version>
+ <version>3.7.0</version>
+ </dependency>
+ <dependency>
+ <artifactId>spring-data-rest-core</artifactId>
+ <groupId>org.springframework.data</groupId>
+ <version>3.7.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
+ <version>5.3.20</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
@@ -225,6 +244,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
+ <version>5.3.20</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
@@ -237,14 +257,30 @@
<version>9.4.17.v20190418</version>
</dependency>
<dependency>
+ <groupId>com.squareup.okio</groupId>
+ <artifactId>okio</artifactId>
+ <version>3.2.0</version>
+ </dependency>
+ <dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>25.0-jre</version>
</dependency>
<dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-stdlib</artifactId>
+ <version>1.7.10</version>
+ </dependency>
+ <dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
- <version>3.12.1</version>
+ <version>4.9.3</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>kotlin-stdlib</artifactId>
+ <groupId>org.jetbrains.kotlin</groupId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
@@ -262,27 +298,33 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
- <version>${jackson.version}</version>
+ <version>2.13.3</version>
</dependency>
<!-- jackson-core -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
- <version>${jackson.version}</version>
+ <version>2.13.3</version>
</dependency>
<!-- jackson-annotations -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
- <version>${jackson.version}</version>
+ <version>2.13.3</version>
</dependency>
<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>retrofit</artifactId>
<version>2.7.2</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>okhttp</artifactId>
+ <groupId>com.squareup.okhttp3</groupId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>com.squareup.retrofit2</groupId>
@@ -303,7 +345,7 @@
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
- <version>1.2.74</version>
+ <version>2.0.6</version>
</dependency>
<dependency>
@@ -458,6 +500,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.8.5</version>
<executions>
<execution>
<id>prepare-agent</id>
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<String, String> 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<String, String> 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;