[Git][java-team/jackson-dataformat-xml][upstream] New upstream version 2.9.9
Markus Koschany
gitlab at salsa.debian.org
Sun Jul 21 23:15:08 BST 2019
Markus Koschany pushed to branch upstream at Debian Java Maintainers / jackson-dataformat-xml
Commits:
b3f67074 by Markus Koschany at 2019-07-21T22:01:26Z
New upstream version 2.9.9
- - - - -
3 changed files:
- pom.xml
- release-notes/VERSION-2.x
- src/main/java/com/fasterxml/jackson/dataformat/xml/XmlFactory.java
Changes:
=====================================
pom.xml
=====================================
@@ -4,11 +4,11 @@
<parent>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-base</artifactId>
- <version>2.9.8</version>
+ <version>2.9.9</version>
</parent>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
- <version>2.9.8</version>
+ <version>2.9.9</version>
<name>Jackson-dataformat-XML</name>
<packaging>bundle</packaging>
<description>Data format extension for Jackson (http://jackson.codehaus.org) to offer
@@ -21,7 +21,7 @@ Some data-binding types overridden as well (ObjectMapper sub-classed as XmlMappe
<connection>scm:git:git at github.com:FasterXML/jackson-dataformat-xml.git</connection>
<developerConnection>scm:git:git at github.com:FasterXML/jackson-dataformat-xml.git</developerConnection>
<url>http://github.com/FasterXML/jackson-dataformat-xml</url>
- <tag>jackson-dataformat-xml-2.9.8</tag>
+ <tag>jackson-dataformat-xml-2.9.9</tag>
</scm>
<properties>
<packageVersion.dir>com/fasterxml/jackson/dataformat/xml</packageVersion.dir>
@@ -82,7 +82,7 @@ Some data-binding types overridden as well (ObjectMapper sub-classed as XmlMappe
<dependency>
<groupId>com.fasterxml.woodstox</groupId>
<artifactId>woodstox-core</artifactId>
- <version>5.0.3</version>
+ <version>5.1.0</version>
</dependency>
<!-- 04-Feb-2018, tatu: Finally, Java 9 does not bundle JAXB, not even API;
=====================================
release-notes/VERSION-2.x
=====================================
@@ -4,6 +4,11 @@ Project: jackson-dataformat-xml
= Releases
------------------------------------------------------------------------
+2.9.9 (16-May-2019)
+
+#333: `OutputDecorator` not called with `XmlMapper`
+ (reported by Nelson D)
+
2.9.8 (15-Dec-2018)
#270: Add support for `writeBinary()` with `InputStream` to `ToXMLGenerator`
=====================================
src/main/java/com/fasterxml/jackson/dataformat/xml/XmlFactory.java
=====================================
@@ -448,19 +448,20 @@ public class XmlFactory extends JsonFactory
public ToXmlGenerator createGenerator(OutputStream out, JsonEncoding enc) throws IOException
{
// false -> we won't manage the stream unless explicitly directed to
- IOContext ctxt = _createContext(out, false);
+ final IOContext ctxt = _createContext(out, false);
ctxt.setEncoding(enc);
return new ToXmlGenerator(ctxt,
_generatorFeatures, _xmlGeneratorFeatures,
- _objectCodec, _createXmlWriter(out));
+ _objectCodec, _createXmlWriter(ctxt, out));
}
@Override
public ToXmlGenerator createGenerator(Writer out) throws IOException
{
- return new ToXmlGenerator(_createContext(out, false),
+ final IOContext ctxt = _createContext(out, false);
+ return new ToXmlGenerator(ctxt,
_generatorFeatures, _xmlGeneratorFeatures,
- _objectCodec, _createXmlWriter(out));
+ _objectCodec, _createXmlWriter(ctxt, out));
}
@SuppressWarnings("resource")
@@ -469,10 +470,10 @@ public class XmlFactory extends JsonFactory
{
OutputStream out = new FileOutputStream(f);
// true -> yes, we have to manage the stream since we created it
- IOContext ctxt = _createContext(out, true);
+ final IOContext ctxt = _createContext(out, true);
ctxt.setEncoding(enc);
return new ToXmlGenerator(ctxt, _generatorFeatures, _xmlGeneratorFeatures,
- _objectCodec, _createXmlWriter(out));
+ _objectCodec, _createXmlWriter(ctxt, out));
}
/*
@@ -580,7 +581,7 @@ public class XmlFactory extends JsonFactory
}
return xp;
}
-
+
@Override
protected FromXmlParser _createParser(byte[] data, int offset, int len, IOContext ctxt) throws IOException
{
@@ -612,22 +613,22 @@ public class XmlFactory extends JsonFactory
/**********************************************************************
*/
- protected XMLStreamWriter _createXmlWriter(OutputStream out) throws IOException
+ protected XMLStreamWriter _createXmlWriter(IOContext ctxt, OutputStream out) throws IOException
{
XMLStreamWriter sw;
try {
- sw = _xmlOutputFactory.createXMLStreamWriter(out, "UTF-8");
+ sw = _xmlOutputFactory.createXMLStreamWriter(_decorate(ctxt, out), "UTF-8");
} catch (XMLStreamException e) {
return StaxUtil.throwAsGenerationException(e, null);
}
return _initializeXmlWriter(sw);
}
- protected XMLStreamWriter _createXmlWriter(Writer w) throws IOException
+ protected XMLStreamWriter _createXmlWriter(IOContext ctxt, Writer w) throws IOException
{
XMLStreamWriter sw;
try {
- sw = _xmlOutputFactory.createXMLStreamWriter(w);
+ sw = _xmlOutputFactory.createXMLStreamWriter(_decorate(ctxt, w));
} catch (XMLStreamException e) {
return StaxUtil.throwAsGenerationException(e, null);
}
@@ -820,4 +821,31 @@ public class XmlFactory extends JsonFactory
}
}
+ /*
+ /**********************************************************
+ /* Decorators, output
+ /**********************************************************
+ */
+
+ protected OutputStream _decorate(IOContext ioCtxt, OutputStream out) throws IOException
+ {
+ if (_outputDecorator != null) {
+ OutputStream out2 = _outputDecorator.decorate(ioCtxt, out);
+ if (out2 != null) {
+ return out2;
+ }
+ }
+ return out;
+ }
+
+ protected Writer _decorate(IOContext ioCtxt, Writer out) throws IOException
+ {
+ if (_outputDecorator != null) {
+ Writer out2 = _outputDecorator.decorate(ioCtxt, out);
+ if (out2 != null) {
+ return out2;
+ }
+ }
+ return out;
+ }
}
View it on GitLab: https://salsa.debian.org/java-team/jackson-dataformat-xml/commit/b3f6707430e9ce7350314841e4239a5dea5eb963
--
View it on GitLab: https://salsa.debian.org/java-team/jackson-dataformat-xml/commit/b3f6707430e9ce7350314841e4239a5dea5eb963
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20190721/6d477eab/attachment.html>
More information about the pkg-java-commits
mailing list