Skip to content

Commit ac3210b

Browse files
committed
Update to Jackson v.2.5.2 which fixes the AfterBurner issue.
1 parent 8e000e0 commit ac3210b

3 files changed

Lines changed: 91 additions & 18 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ language: java
22
jdk:
33
- oraclejdk8
44
after_success:
5-
- mvn clean test jacoco:report coveralls:jacoco
5+
- mvn clean test jacoco:report coveralls:report

pom.xml

Lines changed: 89 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
4-
<parent>
5-
<groupId>org.sonatype.oss</groupId>
6-
<artifactId>oss-parent</artifactId>
7-
<version>9</version>
8-
</parent>
94
<groupId>org.zapodot</groupId>
105
<artifactId>jackson-databind-java-optional</artifactId>
116
<version>2.5.2-SNAPSHOT</version>
@@ -33,6 +28,9 @@
3328
</developer>
3429

3530
</developers>
31+
<prerequisites>
32+
<maven>3.1.0</maven>
33+
</prerequisites>
3634
<licenses>
3735
<license>
3836
<name>Apache License, Version 2.0</name>
@@ -42,15 +40,61 @@
4240
</licenses>
4341
<properties>
4442
<junit.version>4.12</junit.version>
45-
<jackson-core.version>2.5.1</jackson-core.version>
43+
<jackson-core.version>2.5.2</jackson-core.version>
4644
<jackson-databind.version>${jackson-core.version}</jackson-databind.version>
4745

4846
<packageVersion.package>org.zapodot.jackson.java8</packageVersion.package>
4947
<packageVersion.dir>org/zapodot/jackson/java8</packageVersion.dir>
5048
<packageVersion.template.input>${basedir}/src/main/templates/PackageVersion.java.in</packageVersion.template.input>
5149
<packageVersion.template.output>${project.basedir}/target/generated-sources/${packageVersion.dir}/PackageVersion.java</packageVersion.template.output>
50+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5251

52+
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
53+
<nexus-staging-maven-plugin.version>1.6.5</nexus-staging-maven-plugin.version>
54+
<maven-javadoc-plugin.version>2.10.2</maven-javadoc-plugin.version>
55+
<maven-source-plugin.version>2.4</maven-source-plugin.version>
56+
<maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
57+
<maven-replacer-plugin.version>1.5.3</maven-replacer-plugin.version>
58+
<maven-jacoco-plugin.version>0.7.5.201505241946</maven-jacoco-plugin.version>
59+
<maven-coveralls-plugin.version>3.1.0</maven-coveralls-plugin.version>
60+
<maven-bundle-plugin.version>2.5.4</maven-bundle-plugin.version>
61+
<maven-build-helper-plugin.version>1.9.1</maven-build-helper-plugin.version>
5362
</properties>
63+
<profiles>
64+
<profile>
65+
<id>release</id>
66+
<build>
67+
<plugins>
68+
<plugin>
69+
<groupId>org.apache.maven.plugins</groupId>
70+
<artifactId>maven-gpg-plugin</artifactId>
71+
<version>${maven-gpg-plugin.version}</version>
72+
<executions>
73+
<execution>
74+
<id>sign-artifacts</id>
75+
<phase>verify</phase>
76+
<goals>
77+
<goal>sign</goal>
78+
</goals>
79+
</execution>
80+
</executions>
81+
</plugin>
82+
<plugin>
83+
<groupId>org.sonatype.plugins</groupId>
84+
<artifactId>nexus-staging-maven-plugin</artifactId>
85+
<version>${nexus-staging-maven-plugin.version}</version>
86+
<extensions>true</extensions>
87+
<configuration>
88+
<serverId>sonatype-nexus-staging</serverId>
89+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
90+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
91+
</configuration>
92+
</plugin>
93+
</plugins>
94+
</build>
95+
</profile>
96+
</profiles>
97+
5498
<dependencies>
5599
<dependency>
56100
<groupId>com.fasterxml.jackson.core</groupId>
@@ -90,7 +134,7 @@
90134
<plugins>
91135
<plugin>
92136
<artifactId>maven-compiler-plugin</artifactId>
93-
<version>3.1</version>
137+
<version>${maven-compiler-plugin.version}</version>
94138
<configuration>
95139
<source>1.8</source>
96140
<target>1.8</target>
@@ -100,15 +144,48 @@
100144
</compilerArgs>
101145
</configuration>
102146
</plugin>
147+
<plugin>
148+
<groupId>org.apache.maven.plugins</groupId>
149+
<artifactId>maven-source-plugin</artifactId>
150+
<version>${maven-source-plugin.version}</version>
151+
<executions>
152+
<execution>
153+
<id>attach-sources</id>
154+
<goals>
155+
<goal>jar-no-fork</goal>
156+
</goals>
157+
</execution>
158+
</executions>
159+
</plugin>
160+
<plugin>
161+
<groupId>org.apache.maven.plugins</groupId>
162+
<artifactId>maven-javadoc-plugin</artifactId>
163+
<version>${maven-javadoc-plugin.version}</version>
164+
<executions>
165+
<execution>
166+
<id>attach-javadocs</id>
167+
<goals>
168+
<goal>jar</goal>
169+
</goals>
170+
</execution>
171+
</executions>
172+
<configuration>
173+
<windowtitle>Java Optional support for Jackson</windowtitle>
174+
<encoding>UTF-8</encoding>
175+
<locale>en</locale>
176+
<keywords>true</keywords>
177+
</configuration>
178+
</plugin>
179+
103180
<plugin>
104181
<groupId>org.eluder.coveralls</groupId>
105182
<artifactId>coveralls-maven-plugin</artifactId>
106-
<version>2.2.0</version>
183+
<version>${maven-coveralls-plugin.version}</version>
107184
</plugin>
108185
<plugin>
109186
<groupId>org.jacoco</groupId>
110187
<artifactId>jacoco-maven-plugin</artifactId>
111-
<version>0.7.1.201405082137</version>
188+
<version>${maven-jacoco-plugin.version}</version>
112189
<executions>
113190
<execution>
114191
<id>prepare-agent</id>
@@ -121,7 +198,7 @@
121198
<plugin>
122199
<groupId>com.google.code.maven-replacer-plugin</groupId>
123200
<artifactId>replacer</artifactId>
124-
<version>1.5.3</version>
201+
<version>${maven-replacer-plugin.version}</version>
125202
<executions>
126203
<execution>
127204
<id>process-packageVersion</id>
@@ -157,7 +234,7 @@
157234
<plugin>
158235
<groupId>org.codehaus.mojo</groupId>
159236
<artifactId>build-helper-maven-plugin</artifactId>
160-
<version>1.9.1</version>
237+
<version>${maven-build-helper-plugin.version}</version>
161238
<executions>
162239
<execution>
163240
<id>add-source</id>
@@ -176,7 +253,7 @@
176253
<plugin>
177254
<groupId>org.apache.felix</groupId>
178255
<artifactId>maven-bundle-plugin</artifactId>
179-
<version>2.5.3</version>
256+
<version>${maven-bundle-plugin.version}</version>
180257
<extensions>true</extensions>
181258
</plugin>
182259
</plugins>

src/test/java/org/zapodot/jackson/java8/AnotherAfterBurnerIssueTest.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ public void testSerializeJavaBeanWithAfterBurnerFirst() throws IOException {
3333

3434
assertEquals(CustomJsonObject.INT_VALUE, json.get("integer").asInt());
3535

36-
/* For JavaBeans where getters are used for serialization and AfterBurner is registered, empty optional
37-
will not be considered to be null as the Afterburner-optimized serializer will be used instead of the one provided
38-
by this module
39-
*/
40-
assertTrue(json.has("optionalEmpty"));
36+
assertFalse(json.has("optionalEmpty"));
4137
}
4238

4339
@Test

0 commit comments

Comments
 (0)