From e168ff065292fab2f5e7bcd48e19f514035638e6 Mon Sep 17 00:00:00 2001 From: Shadab Ahmad Date: Fri, 10 Nov 2023 16:31:31 +0000 Subject: [PATCH 1/4] update to java 17 --- json-parser/pom.xml | 7 ++++++- .../main/java/org/uniprot/core/json/parser/JsonConfig.java | 1 + pom.xml | 5 +++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/json-parser/pom.xml b/json-parser/pom.xml index 6e7da50bf..b158a603e 100644 --- a/json-parser/pom.xml +++ b/json-parser/pom.xml @@ -13,7 +13,7 @@ json-parser - 2.11.4 + 2.13.4 1.0.31 @@ -38,6 +38,11 @@ jackson-datatype-jdk8 ${jackson.version} + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson.version} + com.kjetland mbknor-jackson-jsonschema_2.12 diff --git a/json-parser/src/main/java/org/uniprot/core/json/parser/JsonConfig.java b/json-parser/src/main/java/org/uniprot/core/json/parser/JsonConfig.java index ee186c5eb..a26a9531f 100644 --- a/json-parser/src/main/java/org/uniprot/core/json/parser/JsonConfig.java +++ b/json-parser/src/main/java/org/uniprot/core/json/parser/JsonConfig.java @@ -41,6 +41,7 @@ protected ObjectMapper getSimpleObjectMapperWithIgnoredTypes(Set> ignor private ObjectMapper getDefaultObjectMapper() { ObjectMapper objMapper = new ObjectMapper(); + objMapper.findAndRegisterModules(); objMapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY); objMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); objMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.NONE); diff --git a/pom.xml b/pom.xml index bacd40d1c..969bb13d0 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ 3.8.1 0.8.4 https://wwwdev.ebi.ac.uk/uniprot/artifactory - 11 + 17 false false 30.0-jre @@ -40,7 +40,7 @@ jacoco-it.exec ${jacoco.outputDir}/${jacoco.out.it.file} - 0.8.5 + 0.8.8 @@ -184,6 +184,7 @@ * + --add-opens java.base/java.time=ALL-UNNAMED From 1969a3343a00b06194bc33d6ef41c0cd28dc601c Mon Sep 17 00:00:00 2001 From: Shadab Ahmad Date: Mon, 13 Nov 2023 16:09:02 +0000 Subject: [PATCH 2/4] update objectmapper --- json-parser/pom.xml | 1 - .../main/java/org/uniprot/core/json/parser/JsonConfig.java | 3 ++- .../core/json/parser/uniparc/UniParcCrossRefJsonConfig.java | 5 ++++- .../json/parser/uniparc/UniParcCrossRefJsonConfigTest.java | 1 + pom.xml | 2 ++ 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/json-parser/pom.xml b/json-parser/pom.xml index b158a603e..85bb4c44d 100644 --- a/json-parser/pom.xml +++ b/json-parser/pom.xml @@ -13,7 +13,6 @@ json-parser - 2.13.4 1.0.31 diff --git a/json-parser/src/main/java/org/uniprot/core/json/parser/JsonConfig.java b/json-parser/src/main/java/org/uniprot/core/json/parser/JsonConfig.java index a26a9531f..e5bc2dc19 100644 --- a/json-parser/src/main/java/org/uniprot/core/json/parser/JsonConfig.java +++ b/json-parser/src/main/java/org/uniprot/core/json/parser/JsonConfig.java @@ -7,9 +7,11 @@ import com.fasterxml.jackson.annotation.PropertyAccessor; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.ser.PropertyFilter; import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter; import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.github.bohnman.squiggly.filter.SquigglyPropertyFilter; import com.github.bohnman.squiggly.filter.SquigglyPropertyFilterMixin; @@ -41,7 +43,6 @@ protected ObjectMapper getSimpleObjectMapperWithIgnoredTypes(Set> ignor private ObjectMapper getDefaultObjectMapper() { ObjectMapper objMapper = new ObjectMapper(); - objMapper.findAndRegisterModules(); objMapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY); objMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); objMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.NONE); diff --git a/json-parser/src/main/java/org/uniprot/core/json/parser/uniparc/UniParcCrossRefJsonConfig.java b/json-parser/src/main/java/org/uniprot/core/json/parser/uniparc/UniParcCrossRefJsonConfig.java index fe5bd3875..920772b96 100644 --- a/json-parser/src/main/java/org/uniprot/core/json/parser/uniparc/UniParcCrossRefJsonConfig.java +++ b/json-parser/src/main/java/org/uniprot/core/json/parser/uniparc/UniParcCrossRefJsonConfig.java @@ -2,6 +2,7 @@ import java.time.LocalDate; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import org.uniprot.core.CrossReference; import org.uniprot.core.Database; import org.uniprot.core.impl.CrossReferenceImpl; @@ -48,7 +49,9 @@ public ObjectMapper getFullObjectMapper() { @Override public ObjectMapper getSimpleObjectMapper() { - return this.prettyMapper; + ObjectMapper simpleObjectMapper = getDefaultSimpleObjectMapper(); + simpleObjectMapper.registerModule(new JavaTimeModule()); + return simpleObjectMapper; } private ObjectMapper initObjectMapper() { diff --git a/json-parser/src/test/java/org/uniprot/core/json/parser/uniparc/UniParcCrossRefJsonConfigTest.java b/json-parser/src/test/java/org/uniprot/core/json/parser/uniparc/UniParcCrossRefJsonConfigTest.java index 82f0aef30..241ed6ed3 100644 --- a/json-parser/src/test/java/org/uniprot/core/json/parser/uniparc/UniParcCrossRefJsonConfigTest.java +++ b/json-parser/src/test/java/org/uniprot/core/json/parser/uniparc/UniParcCrossRefJsonConfigTest.java @@ -3,6 +3,7 @@ import static org.junit.jupiter.api.Assertions.fail; import static org.uniprot.core.json.parser.uniparc.UniParcEntryTest.getCompleteUniParcEntry; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import org.junit.jupiter.api.Test; import org.uniprot.core.json.parser.ValidateJson; import org.uniprot.core.uniparc.UniParcCrossReference; diff --git a/pom.xml b/pom.xml index 969bb13d0..b648971e2 100644 --- a/pom.xml +++ b/pom.xml @@ -11,6 +11,8 @@ UniProt Core Aggregator + 2.13.4 + 2.13.4 UTF-8 2.22.2 2.22.2 From e39ea93c6e7c5173395b93ccbe004a9b6d117f4d Mon Sep 17 00:00:00 2001 From: Shadab Ahmad Date: Tue, 14 Nov 2023 11:09:13 +0000 Subject: [PATCH 3/4] use hibernate validtor 6.2 --- ff-parser/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ff-parser/pom.xml b/ff-parser/pom.xml index 20311a182..e7ee1450b 100644 --- a/ff-parser/pom.xml +++ b/ff-parser/pom.xml @@ -15,7 +15,7 @@ UTF-8 4.5.3 - 6.1.5.Final + 6.2.5.Final From 00b8fe16c14c75abb231088aa8a947e04a5b10a4 Mon Sep 17 00:00:00 2001 From: Shadab Ahmad Date: Tue, 14 Nov 2023 15:45:17 +0000 Subject: [PATCH 4/4] change junit version to same as store --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b648971e2..719800f49 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ 3.0.0 1.7.28 1.2.3 - 5.5.2 + 5.8.2 1.3 3.8.1 0.8.4