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

[configuration] ClassCastException in XMLConfiguration

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Nightly Builds
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: All

    • Bugzilla Id:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: