Uploaded image for project: 'Commons Configuration'
  1. Commons Configuration
  2. CONFIGURATION-403

XMLConfiguration isEmpty has altered behaviour between 1.4 and 1.6

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.7
    • Component/s: None
    • Labels:
      None
    • Environment:

      Windows Vista 64, JDK 1.6

      Description

      Given xml configuration file

       
      <?xml version="1.0" encoding="ISO-8859-1" ?>
      <empty></empty>
      
      XMLConfiguration xml = new XMLConfiguration(file);
      assertTrue(xml.isEmpty());
      

      isEmpty() returned true on version 1.4 ?, now it returns false, and the configuration contains a single empty string as key.
      Not sure if this should be considered a bug, but the documnetation reads: Checks if this configuration is empty. Empty means that there are no keys with any values, though there can be some (empty) nodes.

        Attachments

        1. configuration-403.patch
          2 kB
          Daniel Berg

          Issue Links

            Activity

              People

              • Assignee:
                oheger Oliver Heger
                Reporter:
                danielberg Daniel Berg
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: