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

XPathExpressionEngine nodeKey method create a wrong key for attribute node

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3
    • 1.4
    • None
    • None
    • Any

    Description

      In org.apache.commons.configuration.tree.xpath.XPathExpressionEngine line 178

      if (node.isAttribute())

      { buf.append(ATTR_DELIMITER); }

      should be changed to

      if (node.isAttribute())

      { buf.append(NODE_PATH_DELIMITERS); }

      Using ATTR_DELIMITER will create key like element@attribute rather than element/@attribute and make config reload fail.

      Attachments

        1. ConfigTest.java
          2 kB
          Andy Yeung
        2. ConfigTest.java
          3 kB
          Andy Yeung

        Activity

          People

            oheger Oliver Heger
            andyyeung Andy Yeung
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: