Skip to content

Commit bf5d66a

Browse files
author
Rustam Aliyev
committed
Dependency update: updated jackson to 2.x
1 parent 36d3fdf commit bf5d66a

File tree

10 files changed

+82
-48
lines changed

10 files changed

+82
-48
lines changed

itests/pom.xml

+21-6
Original file line numberDiff line numberDiff line change
@@ -171,23 +171,38 @@
171171
<type>bundle</type>
172172
<scope>provided</scope>
173173
</dependency>
174+
175+
<dependency>
176+
<groupId>com.fasterxml.jackson.core</groupId>
177+
<artifactId>jackson-annotations</artifactId>
178+
<version>${bundle.jackson.version}</version>
179+
<type>bundle</type>
180+
<scope>provided</scope>
181+
</dependency>
182+
<dependency>
183+
<groupId>com.fasterxml.jackson.core</groupId>
184+
<artifactId>jackson-core</artifactId>
185+
<version>${bundle.jackson.version}</version>
186+
<type>bundle</type>
187+
<scope>provided</scope>
188+
</dependency>
174189
<dependency>
175-
<groupId>org.codehaus.jackson</groupId>
176-
<artifactId>jackson-mapper-asl</artifactId>
190+
<groupId>com.fasterxml.jackson.core</groupId>
191+
<artifactId>jackson-databind</artifactId>
177192
<version>${bundle.jackson.version}</version>
178193
<type>bundle</type>
179194
<scope>provided</scope>
180195
</dependency>
181196
<dependency>
182-
<groupId>org.codehaus.jackson</groupId>
183-
<artifactId>jackson-core-asl</artifactId>
197+
<groupId>com.fasterxml.jackson.jaxrs</groupId>
198+
<artifactId>jackson-jaxrs-json-provider</artifactId>
184199
<version>${bundle.jackson.version}</version>
185200
<type>bundle</type>
186201
<scope>provided</scope>
187202
</dependency>
188203
<dependency>
189-
<groupId>org.codehaus.jackson</groupId>
190-
<artifactId>jackson-jaxrs</artifactId>
204+
<groupId>com.fasterxml.jackson.jaxrs</groupId>
205+
<artifactId>jackson-jaxrs-xml-provider</artifactId>
191206
<version>${bundle.jackson.version}</version>
192207
<type>bundle</type>
193208
<scope>provided</scope>

itests/src/test/java/com/elasticinbox/itests/AbstractIntegrationTest.java

+8-5
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,14 @@ public Option[] config()
6565
wrappedBundle(mavenBundle().groupId("com.jayway.restassured").artifactId("rest-assured").versionAsInProject()).
6666
imports("org.apache.http.impl.conn,org.apache.http.impl.client,org.apache.commons.lang3,org.apache.commons.lang3.math,org.codehaus.jackson.map,groovy.lang,org.hamcrest,*"),
6767
wrappedBundle(mavenBundle().groupId("org.hamcrest").artifactId("hamcrest-all").versionAsInProject()),
68-
mavenBundle().groupId("org.codehaus.groovy").artifactId("groovy-all").version("1.8.6"),
68+
mavenBundle().groupId("org.codehaus.groovy").artifactId("groovy-all").version("1.8.8"),
6969
mavenBundle().groupId("org.apache.commons").artifactId("commons-lang3").version("3.1"),
7070
mavenBundle().groupId("commons-collections").artifactId("commons-collections").version("3.2.1"),
7171
mavenBundle().groupId("org.apache.httpcomponents").artifactId("httpcore-osgi").version("4.2.2"),
7272
mavenBundle().groupId("org.apache.httpcomponents").artifactId("httpclient-osgi").version("4.2.2"),
73+
mavenBundle().groupId("org.codehaus.jackson").artifactId("jackson-core-asl").version("1.8.5"),
74+
mavenBundle().groupId("org.codehaus.jackson").artifactId("jackson-mapper-asl").version("1.8.5"),
75+
mavenBundle().groupId("org.codehaus.jackson").artifactId("jackson-jaxrs").version("1.8.5"),
7376
wrappedBundle(mavenBundle().groupId("org.apache.httpcomponents").artifactId("httpmime").version("4.2.2")),
7477
wrappedBundle(mavenBundle("oauth.signpost", "signpost-commonshttp4", "1.2.1.2")),
7578
wrappedBundle(mavenBundle("oauth.signpost", "signpost-core", "1.2.1.2")),
@@ -88,10 +91,10 @@ public Option[] config()
8891
mavenBundle("org.99soft.guice", "rocoto", "6.1"),
8992

9093
// ElasticInbox Bundles
91-
mavenBundle().groupId("com.google.guava").artifactId("guava").versionAsInProject(),
92-
mavenBundle().groupId("org.codehaus.jackson").artifactId("jackson-core-asl").versionAsInProject(),
93-
mavenBundle().groupId("org.codehaus.jackson").artifactId("jackson-mapper-asl").versionAsInProject(),
94-
mavenBundle().groupId("org.codehaus.jackson").artifactId("jackson-jaxrs").versionAsInProject(),
94+
mavenBundle().groupId("com.google.guava").artifactId("guava").versionAsInProject(),
95+
mavenBundle().groupId("com.fasterxml.jackson.core").artifactId("jackson-core").versionAsInProject(),
96+
mavenBundle().groupId("com.fasterxml.jackson.core").artifactId("jackson-databind").versionAsInProject(),
97+
mavenBundle().groupId("com.fasterxml.jackson.core").artifactId("jackson-annotations").versionAsInProject(),
9598
mavenBundle().groupId("com.ning").artifactId("compress-lzf").versionAsInProject(),
9699
mavenBundle().groupId("com.sun.jersey").artifactId("jersey-core").versionAsInProject(),
97100
mavenBundle().groupId("com.sun.jersey").artifactId("jersey-server").versionAsInProject(),

modules/common/pom.xml

+21-14
Original file line numberDiff line numberDiff line change
@@ -89,21 +89,28 @@
8989
<type>bundle</type>
9090
<scope>provided</scope>
9191
</dependency>
92+
<dependency>
93+
<groupId>com.fasterxml.jackson.core</groupId>
94+
<artifactId>jackson-annotations</artifactId>
95+
<version>${bundle.jackson.version}</version>
96+
<type>bundle</type>
97+
<scope>provided</scope>
98+
</dependency>
99+
<dependency>
100+
<groupId>com.fasterxml.jackson.core</groupId>
101+
<artifactId>jackson-core</artifactId>
102+
<version>${bundle.jackson.version}</version>
103+
<type>bundle</type>
104+
<scope>provided</scope>
105+
</dependency>
106+
<dependency>
107+
<groupId>com.fasterxml.jackson.core</groupId>
108+
<artifactId>jackson-databind</artifactId>
109+
<version>${bundle.jackson.version}</version>
110+
<type>bundle</type>
111+
<scope>provided</scope>
112+
</dependency>
92113

93-
<dependency>
94-
<groupId>org.codehaus.jackson</groupId>
95-
<artifactId>jackson-mapper-asl</artifactId>
96-
<version>${bundle.jackson.version}</version>
97-
<type>bundle</type>
98-
<scope>provided</scope>
99-
</dependency>
100-
<dependency>
101-
<groupId>org.codehaus.jackson</groupId>
102-
<artifactId>jackson-core-asl</artifactId>
103-
<version>${bundle.jackson.version}</version>
104-
<type>bundle</type>
105-
<scope>provided</scope>
106-
</dependency>
107114
<dependency>
108115
<groupId>org.slf4j</groupId>
109116
<artifactId>slf4j-api</artifactId>

modules/common/src/main/java/com/elasticinbox/common/utils/JSONUtils.java

+9-8
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@
3232
import java.util.List;
3333
import java.util.UUID;
3434

35-
import org.codehaus.jackson.map.ObjectMapper;
36-
import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
37-
import org.codehaus.jackson.map.SerializationConfig.Feature;
38-
import org.codehaus.jackson.type.TypeReference;
3935
import org.slf4j.Logger;
4036
import org.slf4j.LoggerFactory;
4137

38+
import com.fasterxml.jackson.annotation.JsonInclude.Include;
39+
import com.fasterxml.jackson.core.type.TypeReference;
40+
import com.fasterxml.jackson.databind.ObjectMapper;
41+
import com.fasterxml.jackson.databind.SerializationFeature;
42+
4243
/**
4344
* Set of tools for dealing with JSON objects
4445
*
@@ -61,7 +62,7 @@ public class JSONUtils
6162
*/
6263
public static <T> T toObject(byte[] value, T ref)
6364
{
64-
JSON_MAPPER.configure(Feature.WRITE_NULL_MAP_VALUES, false);
65+
JSON_MAPPER.configure(SerializationFeature.WRITE_NULL_MAP_VALUES, false);
6566

6667
try {
6768
return JSON_MAPPER.readValue(value, 0, value.length,
@@ -101,9 +102,9 @@ public static List<UUID> toUUIDList(String value)
101102
*/
102103
public static <T> byte[] fromObject(T value)
103104
{
104-
JSON_MAPPER.configure(Feature.WRITE_NULL_MAP_VALUES, false);
105-
JSON_MAPPER.configure(Feature.WRITE_DATES_AS_TIMESTAMPS, false);
106-
JSON_MAPPER.getSerializationConfig().withSerializationInclusion(Inclusion.NON_NULL);
105+
JSON_MAPPER.configure(SerializationFeature.WRITE_NULL_MAP_VALUES, false);
106+
JSON_MAPPER.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
107+
JSON_MAPPER.getSerializationConfig().withSerializationInclusion(Include.NON_NULL);
107108
//JSON_MAPPER.getSerializationConfig().setDateFormat(myDateFormat);
108109

109110
try {

modules/core/pom.xml

+18-10
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,24 @@
9191
<scope>provided</scope>
9292
</dependency>
9393
<dependency>
94-
<groupId>org.codehaus.jackson</groupId>
95-
<artifactId>jackson-core-asl</artifactId>
94+
<groupId>com.fasterxml.jackson.core</groupId>
95+
<artifactId>jackson-annotations</artifactId>
9696
<version>${bundle.jackson.version}</version>
97-
<type>jar</type>
97+
<type>bundle</type>
98+
<scope>provided</scope>
99+
</dependency>
100+
<dependency>
101+
<groupId>com.fasterxml.jackson.core</groupId>
102+
<artifactId>jackson-core</artifactId>
103+
<version>${bundle.jackson.version}</version>
104+
<type>bundle</type>
105+
<scope>provided</scope>
106+
</dependency>
107+
<dependency>
108+
<groupId>com.fasterxml.jackson.core</groupId>
109+
<artifactId>jackson-databind</artifactId>
110+
<version>${bundle.jackson.version}</version>
111+
<type>bundle</type>
98112
<scope>provided</scope>
99113
</dependency>
100114

@@ -323,13 +337,7 @@
323337
<dependency>
324338
<groupId>org.yaml</groupId>
325339
<artifactId>snakeyaml</artifactId>
326-
<version>1.8</version>
327-
<scope>test</scope>
328-
</dependency>
329-
<dependency>
330-
<groupId>org.codehaus.jackson</groupId>
331-
<artifactId>jackson-mapper-asl</artifactId>
332-
<version>${bundle.jackson.version}</version>
340+
<version>${bundle.snakeyaml.version}</version>
333341
<scope>test</scope>
334342
</dependency>
335343
<dependency>

modules/core/src/main/java/com/elasticinbox/core/model/Address.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
package com.elasticinbox.core.model;
3030

31-
import org.codehaus.jackson.annotate.JsonIgnore;
31+
import com.fasterxml.jackson.annotation.JsonIgnore;
3232

3333
/**
3434
* This class represents a single e-mail address.

modules/core/src/main/java/com/elasticinbox/core/model/Labels.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import java.util.Map;
3434
import java.util.Set;
3535

36-
import org.codehaus.jackson.annotate.JsonValue;
36+
import com.fasterxml.jackson.annotation.JsonValue;
3737

3838
/**
3939
* This class stores multiple labels with counters (total size, total messages,

modules/core/src/main/java/com/elasticinbox/core/model/Message.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import java.util.Map;
3737
import java.util.Set;
3838

39-
import org.codehaus.jackson.annotate.JsonIgnore;
39+
import com.fasterxml.jackson.annotation.JsonIgnore;
4040

4141
import com.elasticinbox.core.blob.store.BlobStoreConstants;
4242
import com.elasticinbox.core.blob.store.BlobStoreProxy;

modules/core/src/main/java/com/elasticinbox/core/model/MimePart.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
import javax.mail.Part;
3636
import javax.mail.internet.ContentType;
3737

38-
import org.codehaus.jackson.annotate.JsonIgnore;
3938
import org.slf4j.Logger;
4039
import org.slf4j.LoggerFactory;
4140

4241
import com.elasticinbox.common.utils.IOUtils;
42+
import com.fasterxml.jackson.annotation.JsonIgnore;
4343

4444
/**
4545
* Representation of MIME part which is referenced from and belong to MIME

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
<bundle.aopalliance.version>1.0_5</bundle.aopalliance.version>
7878
<bundle.net.oauth.version>20100527_1</bundle.net.oauth.version>
7979
<bundle.jersey.version>1.14</bundle.jersey.version>
80-
<bundle.jackson.version>1.9.9</bundle.jackson.version>
80+
<bundle.jackson.version>2.1.2</bundle.jackson.version>
8181
<bundle.compress-lzf.version>0.9.6</bundle.compress-lzf.version>
8282
<bundle.javamail.version>1.4.5</bundle.javamail.version>
8383
<bundle.java-xmlbuilder.version>0.4_1</bundle.java-xmlbuilder.version>

0 commit comments

Comments
 (0)