Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.1.1
-
None
-
None
Description
When serializing XML a default namespace will throw a NPE in method serializeElement().
// Now write out the list of namespace declarations in this list that we constructed
// while doing the "set" processing.
if (writePrefixList != null) {
for (int i=0; i<writePrefixList.size(); i++) {
String prefix = (String) writePrefixList.get;
String namespace = (String) writeNSList.get;
========> if (prefix != null)
else
{ writer.writeDefaultNamespace(namespace); } }
}
Fix is easy: Replace marked section with:
if ( ! "".equals(prefix)) {