diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/smile/SmileXContentGenerator.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/smile/SmileXContentGenerator.java index 2774d36a835..69bf853a3b3 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/smile/SmileXContentGenerator.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/smile/SmileXContentGenerator.java @@ -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); diff --git a/modules/jarjar/build.gradle b/modules/jarjar/build.gradle index 7f64527796f..b8c68653e34 100644 --- a/modules/jarjar/build.gradle +++ b/modules/jarjar/build.gradle @@ -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 }