Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed usage of WRITE_BIGDECIMAL_AS_PLAIN when XML pretty printer is
configured.
  • Loading branch information
kevindaub committed Apr 8, 2019
1 parent 794736c commit 6def77c
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1123,9 +1123,15 @@ public void writeNumber(BigDecimal dec) throws IOException
}
} else {
if (_xmlPrettyPrinter != null) {
_xmlPrettyPrinter.writeLeafElement(_xmlWriter,
_nextName.getNamespaceURI(), _nextName.getLocalPart(),
dec);
if (usePlain) {
_xmlPrettyPrinter.writeLeafElement(_xmlWriter,
_nextName.getNamespaceURI(), _nextName.getLocalPart(),
dec.toPlainString(), false);
} else {
_xmlPrettyPrinter.writeLeafElement(_xmlWriter,
_nextName.getNamespaceURI(), _nextName.getLocalPart(),
dec);
}
} else {
_xmlWriter.writeStartElement(_nextName.getNamespaceURI(), _nextName.getLocalPart());
if (usePlain) {
Expand Down

0 comments on commit 6def77c

Please sign in to comment.