Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.2
-
None
-
None
Description
When using XMLConfiguration 2, tags containing only white spaces are not handled properly when xml:space="preserve" is set. 'null' is returned instead of the actual spaces. To reproduce:
XMLConfiguration xml = new BasicConfigurationBuilder<>( XMLConfiguration.class).configure( new Parameters().xml()).getConfiguration(); FileHandler fh = new FileHandler(xml); fh.load(new StringReader("<test xml:space=\"preserve\"> </test>")); System.out.println("TEST: '" + xml.getString("") + "'"); // Outputs -> TEST: 'null' // Should be -> TEST: ' '