Branch to test the original jackson

This commit is contained in:
Luca Frosini 2020-04-29 19:46:48 +02:00
parent 9a3932610b
commit d986457fbe
2 changed files with 6 additions and 3 deletions

View File

@ -17,6 +17,7 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jackson.version>2.8.11</jackson.version>
<serviceClass>InformationSystem</serviceClass> <serviceClass>InformationSystem</serviceClass>
</properties> </properties>
@ -49,14 +50,17 @@
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId> <artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId> <artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId> <artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.gcube.core</groupId> <groupId>org.gcube.core</groupId>

View File

@ -162,10 +162,9 @@ public class SerializationTest {
propagationConstraint.setAddConstraint(AddConstraint.propagate); propagationConstraint.setAddConstraint(AddConstraint.propagate);
propagationConstraint.setRemoveConstraint(RemoveConstraint.cascadeWhenOrphan); propagationConstraint.setRemoveConstraint(RemoveConstraint.cascadeWhenOrphan);
ObjectMapper mapper = new ObjectMapper(); String pg = ElementMapper.marshal(propagationConstraint);
String pg = mapper.writeValueAsString(propagationConstraint);
PropagationConstraint pgUnm = mapper.readValue(pg, PropagationConstraint.class); PropagationConstraint pgUnm = ElementMapper.unmarshal(PropagationConstraint.class, pg);
logger.debug("{}", pgUnm); logger.debug("{}", pgUnm);
} }