Skip to content

Commit 23a64ee

Browse files
ind1godkulp
authored andcommitted
Avoid NullPointerException when used with Axis2 1.5
1 parent e0a8758 commit 23a64ee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/org/codehaus/jettison/mapped/MappedXMLStreamWriter.java

+4
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,10 @@ public void writeStartDocument() throws XMLStreamException {
243243
}
244244

245245
public void writeStartElement(String prefix, String local, String ns) throws XMLStreamException {
246+
if (current == null) {
247+
this.writeStartDocument();
248+
}
249+
246250
String parentKey = current.getTreeKey();
247251
stack.push(current);
248252
String key = convention.createKey(prefix, ns, local);

0 commit comments

Comments
 (0)