Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4619564

XMl Comments in Preferences File

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.1
    • 1.4.0
    • core-libs
    • hopper
    • generic
    • generic
    • Verified



      Name: rl43681 Date: 01/04/2002


      java version "1.4.0-beta2"
      Java(TM) 2 Runtime Environment, Standard Edition (build
      1.4.0-beta2-b77)
      Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)



      It is not possible no make any XML comments in the Preferences node like:

      <preferences EXTERNAL_XML_VERSION="1.0">
        <root type="user">
          <map>
          </map>
          <node name="hlrAgent"> <!-- HLR Agent -->
            <map>
              <entry key="agentName" value="HLRAgent" />
            </map>
          </node>
        </root>
      </preferences>

      If I import the Preferences with the Command:
      // read the preferences from a file
      Preferences syspref = Preferences.userRoot();
      syspref.importPreferences(new FileInputStream(aXmlFileName));

      I get the following error:

          java.lang.ClassCastException: org.apache.crimson.tree.CommentNode
            java.util.prefs.XmlSupport.ImportSubtree(XmlSupport.java:248)
            java.util.prefs.XmlSupport.ImportSubtree(XmlSupport.java:260)
            java.util.prefs.XmlSupport.importPreferences(XmlSupport.java:198)
            java.util.prefs.Preferences.importPreferences(Preferences.java:1131)
            isa.common.xml.XmlConfig.<init>(Unknown Source)
            isa.common.agent.AgentFramework.init(AgentFramework.java:64)
            isa.hlragent.HLRAgentMain.main(HLRAgentMain.java:60)

      Without the XML Comment it is ok.
      (Review ID: 132019)
      ======================================================================

            kkladkosunw Konstantin Kladko (Inactive)
            rlewis Roger Lewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: