Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Flagged
Description
Hi there,
i stumbled upon a part of your code, namely:
reader = new StringReader(xmlText); Document doc = docBuilder.parse(new InputSource(reader));
This will throw NPEs whenever there is a head contribution that is a blank string.
Wouldn't it be an easy fix to do s.th. like this:
possible patch
if (org.apache.commons.lang3.StringUtils.isNotBlank(xmlText) { reader = new StringReader(xmlText); Document doc = docBuilder.parse(new InputSource(reader)); }