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

[configuration] ClassCastException in XMLConfiguration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Nightly Builds
    • None
    • None
    • None
    • Operating System: other
      Platform: All

    • 30839

    Description

      In the XMLConfigurations addXMLProperty, it takes an Object as the value to set:
      Element child = document.createElement(nodes[nodes.length - 1]);
      parent.appendChild(child);
      if (attName == null)

      { CharacterData data = document.createTextNode((String) value); child.appendChild(data); } else { child.setAttribute(attName, (String) value); }
      This should be changed to :
      Element child = document.createElement(nodes[nodes.length - 1]);
      parent.appendChild(child);
      if (attName == null) { CharacterData data = document.createTextNode((String) value); child.appendChild(data); }

      else

      { child.setAttribute(attName, value.toString); }

      Thereby avoiding a potential ClasscastException.
      Since I can't get at the CVS, I am submitting the change this way.

      Hermod

      Attachments

        Activity

          People

            Unassigned Unassigned
            hermod.opstvedt@dnb.no Hermod Opstvedt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: