Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8.4
-
None
-
linux, eclipse,
Description
The attached code triggers a class cast exception because in the groovy.util.Node plus operator, lines 179-180
https://github.com/groovy/groovy-core/blob/fc33b105f172629fc99d5b62da9e3c1adafff85c/src/main/groovy/util/Node.java
it is assumed that all children are nodes, but the parser does not seem to create textnodes but keeping them as string, either that or some strange conversion is happening because in 179 a class cast exception is raised for a java.lang.String to groovy.util.Node illegal conversion.
The proof of concept is the attached junit code. If the commented line is uncommented, the cast exception appears. If the text in the xml is removed, the failure does not show.
XMLParser is being used.