Updated Jackson dependency to require the latest for the JsonLineMapper
This commit is contained in:
@@ -76,8 +76,7 @@ allprojects {
|
||||
hibernateValidatorVersion = '5.3.0.CR1'
|
||||
hsqldbVersion = '2.3.3'
|
||||
ibatisVersion = '2.3.4.726'
|
||||
jacksonVersion = '1.9.13'
|
||||
jackson2Version = "2.4.6" //?
|
||||
jackson2Version = "2.8.6" //?
|
||||
javaMailVersion = '1.5.6'
|
||||
javaxBatchApiVersion = '1.0'
|
||||
javaxInjectVersion = '1'
|
||||
@@ -335,7 +334,7 @@ project('spring-batch-infrastructure') {
|
||||
|
||||
optional "javax.jms:javax.jms-api:$jmsVersion"
|
||||
optional "org.slf4j:slf4j-log4j12:$slf4jVersion"
|
||||
optional "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion"
|
||||
optional "com.fasterxml.jackson.core:jackson-databind:${jackson2Version}"
|
||||
compile("org.hibernate:hibernate-core:$hibernateVersion") { dep ->
|
||||
optional dep
|
||||
exclude group: 'org.jboss.spec.javax.transaction', module: 'jboss-transaction-api_1.1_spec'
|
||||
|
||||
@@ -17,8 +17,9 @@ package org.springframework.batch.item.file.mapping;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.codehaus.jackson.JsonParser;
|
||||
import org.codehaus.jackson.map.MappingJsonFactory;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.databind.MappingJsonFactory;
|
||||
|
||||
import org.springframework.batch.item.file.LineMapper;
|
||||
|
||||
/**
|
||||
@@ -51,7 +52,7 @@ public class JsonLineMapper implements LineMapper<Map<String, Object>> {
|
||||
@Override
|
||||
public Map<String, Object> mapLine(String line, int lineNumber) throws Exception {
|
||||
Map<String, Object> result;
|
||||
JsonParser parser = factory.createJsonParser(line);
|
||||
JsonParser parser = factory.createParser(line);
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> token = parser.readValueAs(Map.class);
|
||||
result = token;
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
*/
|
||||
package org.springframework.batch.item.file.mapping;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.codehaus.jackson.JsonParseException;
|
||||
import com.fasterxml.jackson.core.JsonParseException;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class JsonLineMapperTests {
|
||||
|
||||
private JsonLineMapper mapper = new JsonLineMapper();
|
||||
|
||||
Reference in New Issue
Block a user