remove the Jackson dependency (tas one will be picked) (#446)

change the mapper to exclude the null value as for NON_DEFAULT values some changes were added on Jackson after 2.8.3 version
This commit is contained in:
Rodica Sutu
2021-05-12 10:45:09 +03:00
committed by GitHub
parent 1b7ead965e
commit e18575f3d4
2 changed files with 2 additions and 13 deletions

View File

@@ -10,9 +10,6 @@
<version>11.35-SNAPSHOT</version>
</parent>
<properties>
<dependency.jackson-databind.version>2.7.9.1</dependency.jackson-databind.version> <!-- this should not be overridden - fixes 2 tests -->
</properties>
<build>
<plugins>
@@ -50,10 +47,6 @@
<groupId>org.alfresco.tas</groupId>
<artifactId>restapi</artifactId>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<groupId>org.alfresco.tas</groupId>
<artifactId>utility</artifactId>
@@ -91,9 +84,5 @@
<artifactId>docker-java</artifactId>
<version>3.0.14</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -90,8 +90,8 @@ public class PojoUtility
mapper.addMixIn(target, mixinSource);
}
//include only values that differ from default settings to be included
mapper.setSerializationInclusion(Include.NON_DEFAULT);
//include only non null values
mapper.setSerializationInclusion(Include.NON_NULL);
//return the json object
try