aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafAuthorizationFilter.java2
-rw-r--r--aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertAuthorizationFilter.java2
-rw-r--r--aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertFilter.java2
-rw-r--r--aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafFilter.java2
-rw-r--r--aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/CadiProps.java2
-rw-r--r--aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/GremlinFilter.java2
-rw-r--r--aai-core/pom.xml9
-rw-r--r--aai-core/src/main/java/org/onap/aai/util/PojoUtils.java8
-rw-r--r--aai-core/src/test/java/org/onap/aai/util/PojoUtilsTest.java12
-rw-r--r--aai-parent/pom.xml25
-rw-r--r--aai-schema-abstraction/pom.xml8
-rw-r--r--aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/oxm/RelationshipSchema.java2
12 files changed, 14 insertions, 62 deletions
diff --git a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafAuthorizationFilter.java b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafAuthorizationFilter.java
index 485fa7e3..fb7a58e6 100644
--- a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafAuthorizationFilter.java
+++ b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafAuthorizationFilter.java
@@ -32,7 +32,6 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.onap.aai.aaf.auth.ResponseFormatter;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter;
import org.springframework.context.annotation.Profile;
@@ -59,7 +58,6 @@ public class AafAuthorizationFilter extends OrderedRequestContextFilter {
private List<String> advancedKeywordsList;
- @Autowired
public AafAuthorizationFilter(GremlinFilter gremlinFilter, @Value("${permission.type}") String type,
@Value("${permission.instance}") String instance,
@Value("${advanced.keywords.list:}") String advancedKeys) {
diff --git a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertAuthorizationFilter.java b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertAuthorizationFilter.java
index 56799f1c..f19f4b8e 100644
--- a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertAuthorizationFilter.java
+++ b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertAuthorizationFilter.java
@@ -32,7 +32,6 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.onap.aai.aaf.auth.AafRequestFilter;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter;
import org.springframework.context.annotation.Profile;
@@ -60,7 +59,6 @@ public class AafCertAuthorizationFilter extends OrderedRequestContextFilter {
private List<String> advancedKeywordsList;
- @Autowired
public AafCertAuthorizationFilter(@Value("${permission.type}") String type,
@Value("${permission.instance}") String instance, @Value("${advanced.keywords.list:}") String advancedKeys,
CadiProps cadiProps) {
diff --git a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertFilter.java b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertFilter.java
index e423dc0a..a3ce12b0 100644
--- a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertFilter.java
+++ b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertFilter.java
@@ -32,7 +32,6 @@ import org.onap.aaf.cadi.filter.CadiFilter;
import org.onap.aai.aaf.auth.AafRequestFilter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter;
import org.springframework.context.annotation.Profile;
@@ -57,7 +56,6 @@ public class AafCertFilter extends OrderedRequestContextFilter {
private final CadiProps cadiProps;
- @Autowired
public AafCertFilter(@Value("${aaf.userchain.pattern}") String aafUserChainPattern, CadiProps cadiProps)
throws IOException, ServletException {
diff --git a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafFilter.java b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafFilter.java
index 5dbc2e7a..ae3a6ca6 100644
--- a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafFilter.java
+++ b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafFilter.java
@@ -32,7 +32,6 @@ import org.onap.aaf.cadi.filter.CadiFilter;
import org.onap.aai.aaf.auth.ResponseFormatter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
@@ -49,7 +48,6 @@ public class AafFilter extends OrderedRequestContextFilter {
private final CadiFilter cadiFilter;
- @Autowired
public AafFilter(CadiProps cadiProps) throws IOException, ServletException {
cadiFilter = new CadiFilter(new PropAccess((level, element) -> {
switch (level) {
diff --git a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/CadiProps.java b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/CadiProps.java
index 4bf9ea82..01b89148 100644
--- a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/CadiProps.java
+++ b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/CadiProps.java
@@ -30,7 +30,6 @@ import javax.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
@@ -46,7 +45,6 @@ public class CadiProps {
private Properties cadiProperties;
- @Autowired
public CadiProps(@Value("${aaf.cadi.file:./resources/cadi.properties}") String filename) {
cadiFileName = filename;
cadiProperties = new Properties();
diff --git a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/GremlinFilter.java b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/GremlinFilter.java
index dffa74ef..f800097f 100644
--- a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/GremlinFilter.java
+++ b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/GremlinFilter.java
@@ -33,7 +33,6 @@ import org.apache.commons.io.IOUtils;
import org.onap.aai.aaf.auth.ResponseFormatter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
@@ -54,7 +53,6 @@ public class GremlinFilter {
private CadiProps cadiProps;
- @Autowired
public GremlinFilter(@Value("${permission.type}") String type, @Value("${permission.instance}") String instance,
CadiProps cadiProps) {
this.type = type;
diff --git a/aai-core/pom.xml b/aai-core/pom.xml
index 8e0d23b1..d2aed3a0 100644
--- a/aai-core/pom.xml
+++ b/aai-core/pom.xml
@@ -152,14 +152,6 @@ limitations under the License.
<version>2.0.0-oss</version>
</dependency>
<dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-core-asl</artifactId>
- </dependency>
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-mapper-asl</artifactId>
- </dependency>
- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
@@ -272,6 +264,7 @@ limitations under the License.
<dependency>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-core</artifactId>
+ <version>${gremlin.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tinkerpop</groupId>
diff --git a/aai-core/src/main/java/org/onap/aai/util/PojoUtils.java b/aai-core/src/main/java/org/onap/aai/util/PojoUtils.java
index f974ba14..4c2ce942 100644
--- a/aai-core/src/main/java/org/onap/aai/util/PojoUtils.java
+++ b/aai-core/src/main/java/org/onap/aai/util/PojoUtils.java
@@ -27,6 +27,7 @@ import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.json.JsonMapper;
+import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule;
import com.google.common.base.CaseFormat;
import com.google.common.collect.Multimap;
@@ -124,12 +125,15 @@ public class PojoUtils {
*/
public <T> String getJsonFromObject(T clazz, boolean wrapRoot, boolean indent)
throws JsonGenerationException, JsonMappingException, IOException {
- ObjectMapper mapper = JsonMapper.builder().serializationInclusion(JsonInclude.Include.NON_NULL)
+ ObjectMapper mapper = JsonMapper.builder()
+ .addModule(new JaxbAnnotationModule())
+ .addModule(new JavaTimeModule())
+ .serializationInclusion(JsonInclude.Include.NON_NULL)
.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
.configure(SerializationFeature.INDENT_OUTPUT, indent)
.configure(SerializationFeature.WRAP_ROOT_VALUE, wrapRoot)
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
- .configure(DeserializationFeature.UNWRAP_ROOT_VALUE, wrapRoot).addModule(new JaxbAnnotationModule())
+ .configure(DeserializationFeature.UNWRAP_ROOT_VALUE, wrapRoot)
.build();
return mapper.writeValueAsString(clazz);
diff --git a/aai-core/src/test/java/org/onap/aai/util/PojoUtilsTest.java b/aai-core/src/test/java/org/onap/aai/util/PojoUtilsTest.java
index 68f01962..a6a8c33d 100644
--- a/aai-core/src/test/java/org/onap/aai/util/PojoUtilsTest.java
+++ b/aai-core/src/test/java/org/onap/aai/util/PojoUtilsTest.java
@@ -100,18 +100,8 @@ public class PojoUtilsTest {
LocalDateTime date = LocalDateTime.of(2017, Month.SEPTEMBER, 18, 10, 55, 0, 300);
String res = pojoUtils.getJsonFromObject(date);
-
+ assertEquals("\"2017-09-18T10:55:00.0000003\"", res);
assertNotNull(res);
- assertTrue(res.contains("\"dayOfMonth\" : 18"));
- assertTrue(res.contains("\"dayOfWeek\" : \"MONDAY\""));
- assertTrue(res.contains("\"dayOfYear\" : 261"));
- assertTrue(res.contains("\"hour\" : 10"));
- assertTrue(res.contains("\"minute\" : 55"));
- assertTrue(res.contains("\"month\" : \"SEPTEMBER\""));
- assertTrue(res.contains("\"monthValue\" : 9"));
- assertTrue(res.contains("\"nano\" : 300"));
- assertTrue(res.contains("\"second\" : 0"));
- assertTrue(res.contains("\"year\" : 2017"));
}
@Test
diff --git a/aai-parent/pom.xml b/aai-parent/pom.xml
index b13fb601..717049eb 100644
--- a/aai-parent/pom.xml
+++ b/aai-parent/pom.xml
@@ -47,7 +47,6 @@ limitations under the License.
<aaf.version>2.1.15</aaf.version>
<antlr.version>4.11.1</antlr.version>
<activemq.version>5.16.1</activemq.version>
- <codehaus.jackson.version>1.9.13</codehaus.jackson.version>
<commons.beanutils.version>1.9.4</commons.beanutils.version>
<commons.cli.version>1.5.0</commons.cli.version>
<commons.compress.version>1.21</commons.compress.version>
@@ -68,7 +67,6 @@ limitations under the License.
<gson.version>2.9.1</gson.version>
<hamcrest.junit.version>2.0.0.0</hamcrest.junit.version>
<hamcrest.core.version>2.2</hamcrest.core.version>
- <jackson.bom.version>2.11.4</jackson.bom.version>
<javatuples.version>1.2</javatuples.version>
<jaxb.version>2.3.1</jaxb.version>
<old.jaxb.version>2.3.0.1</old.jaxb.version>
@@ -91,8 +89,8 @@ limitations under the License.
Please don't upgrade to 2.3.0 or above for nexus iq or security scans
as it could potentially break our code
-->
- <spring.boot.version>2.4.13</spring.boot.version>
- <spring.version>5.3.13</spring.version>
+ <spring.boot.version>2.5.15</spring.boot.version>
+ <spring.version>5.3.39</spring.version>
<spring.jms.version>5.2.25.RELEASE</spring.jms.version>
<spring.test.version>${spring.version}</spring.test.version>
<json.path.version>2.2.0</json.path.version>
@@ -139,13 +137,6 @@ limitations under the License.
<dependencyManagement>
<dependencies>
<dependency>
- <groupId>com.fasterxml.jackson</groupId>
- <artifactId>jackson-bom</artifactId>
- <version>${jackson.bom.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
@@ -175,7 +166,7 @@ limitations under the License.
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
- <version>5.3.31</version>
+ <version>5.3.39</version>
</dependency>
@@ -505,12 +496,6 @@ limitations under the License.
</dependency>
<dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-core-asl</artifactId>
- <version>${codehaus.jackson.version}</version>
- </dependency>
-
- <dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
<version>${jersey.version}</version>
@@ -803,7 +788,7 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>3.0.0-M4</version>
+ <version>3.1.2</version>
<configuration>
<!-- Sets the VM argument line used when unit tests are run. -->
<argLine>${surefireArgLine}</argLine>
@@ -816,7 +801,7 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
- <version>3.0.0-M4</version>
+ <version>3.1.2</version>
<executions>
<!-- Ensures that both integration-test and verify goals of the Failsafe
Maven plugin are executed. -->
diff --git a/aai-schema-abstraction/pom.xml b/aai-schema-abstraction/pom.xml
index 00442e42..c89cf6eb 100644
--- a/aai-schema-abstraction/pom.xml
+++ b/aai-schema-abstraction/pom.xml
@@ -86,14 +86,6 @@
<artifactId>logback-access</artifactId>
</dependency>
<dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-core-asl</artifactId>
- </dependency>
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-mapper-asl</artifactId>
- </dependency>
- <dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
diff --git a/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/oxm/RelationshipSchema.java b/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/oxm/RelationshipSchema.java
index 921cff33..32350779 100644
--- a/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/oxm/RelationshipSchema.java
+++ b/aai-schema-abstraction/src/main/java/org/onap/aai/schemaif/oxm/RelationshipSchema.java
@@ -23,6 +23,7 @@
package org.onap.aai.schemaif.oxm;
+import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.Multimap;
import java.io.IOException;
@@ -35,7 +36,6 @@ import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
-import org.codehaus.jackson.map.ObjectMapper;
import org.onap.aai.cl.eelf.LoggerFactory;
import org.onap.aai.edges.EdgeRule;
import org.onap.aai.schemaif.SchemaProviderException;