Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.7.2
-
None
Description
If a newly created element has no children then a NullPointerException is thrown.
IMO in these cases the method should create a new TextElement and add the contents to it.
How to reproduce:
import groovy.xml.dom.DOMCategory use(DOMCategory) { def prop = doc.createElement('property') prop.setAttribute('name', 'cache.class') prop.setValue('true') }