upgrade to jackson 1.7, also fix (really unused case) of getting compressed smile stored through REST with smile context type
This commit is contained in:
parent
b9be6d9ea7
commit
286a6fac76
|
@ -25,6 +25,7 @@ import org.elasticsearch.common.xcontent.XContentType;
|
|||
import org.elasticsearch.common.xcontent.json.JsonXContentGenerator;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
/**
|
||||
|
@ -40,6 +41,17 @@ public class SmileXContentGenerator extends JsonXContentGenerator {
|
|||
return XContentType.SMILE;
|
||||
}
|
||||
|
||||
@Override public void writeRawField(String fieldName, InputStream content, OutputStream bos) throws IOException {
|
||||
writeFieldName(fieldName);
|
||||
SmileParser parser = SmileXContent.smileFactory.createJsonParser(content);
|
||||
try {
|
||||
parser.nextToken();
|
||||
generator.copyCurrentStructure(parser);
|
||||
} finally {
|
||||
parser.close();
|
||||
}
|
||||
}
|
||||
|
||||
@Override public void writeRawField(String fieldName, byte[] content, OutputStream bos) throws IOException {
|
||||
writeFieldName(fieldName);
|
||||
SmileParser parser = SmileXContent.smileFactory.createJsonParser(content);
|
||||
|
|
|
@ -15,8 +15,8 @@ dependencies {
|
|||
runtime 'joda-time:joda-time:1.6.1'
|
||||
runtime 'org.mvel:mvel2:2.0.19'
|
||||
|
||||
runtime 'org.codehaus.jackson:jackson-core-asl:1.6.3'
|
||||
runtime 'org.codehaus.jackson:jackson-smile:1.6.3'
|
||||
runtime 'org.codehaus.jackson:jackson-core-asl:1.7.0'
|
||||
runtime 'org.codehaus.jackson:jackson-smile:1.7.0'
|
||||
runtime 'org.yaml:snakeyaml:1.6'
|
||||
|
||||
runtime('org.jboss.netty:netty:3.2.3.Final') { transitive = false }
|
||||
|
|
Loading…
Reference in New Issue