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

XPathExpressionEngine nodeKey method create a wrong key for attribute node

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.4
    • Component/s: None
    • Labels:
      None
    • Environment:

      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
          3 kB
          Andy Yeung
        2. ConfigTest.java
          2 kB
          Andy Yeung

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: