Permalink
Browse files

Add workaround for JDK-8191482.

  • Loading branch information...
archiecobbs committed Sep 9, 2018
1 parent 06030d8 commit d1294ee414ea9da0c290d8e45e63a266877f3c39
Showing with 5 additions and 1 deletion.
  1. +5 −1 permazen-coreapi/src/main/java/io/permazen/core/util/XMLObjectSerializer.java
@@ -842,7 +842,11 @@ private void writeOpenTag(XMLStreamWriter writer, boolean empty, QName element,
}
private void writeAttribute(XMLStreamWriter writer, QName attr, Object value) throws XMLStreamException {
writer.writeAttribute(attr.getNamespaceURI(), attr.getLocalPart(), "" + value);
final String ns = attr.getNamespaceURI();
if (ns == null || ns.length() == 0)
writer.writeAttribute(attr.getLocalPart(), "" + value);
else
writer.writeAttribute(attr.getNamespaceURI(), attr.getLocalPart(), "" + value);
}
/**

0 comments on commit d1294ee

Please sign in to comment.