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

LTP: XMLEncoder emits invalid XML

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b78
    • CPU:
      x86
    • OS:
      linux

      Description

      FULL PRODUCT VERSION :
      java version "1.5.0_02"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09)
      Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode, sharing)


      ADDITIONAL OS VERSION INFORMATION :
      True for Windows and Linux (all versions)

      A DESCRIPTION OF THE PROBLEM :
      XMLEncoder will produce invalid XML under a range of circumstances. Valid characters in XML (from http://www.w3.org/TR/REC-xml/) are:

      "Character Range
      [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] /* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */
      "

      No character that is outside this range may be put in an XML file.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Any function that returns a string where ANY of the characters are not permitted by the XML specification, or any method that returns a char where the char is not in the permitted range.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Strings should be encoded (Base64) before saving them to the file. Characters could be saved as ints or encoded strings.
      ACTUAL -
      Invalid characters are encoded directly into the file.

      REPRODUCIBILITY :
      This bug can be reproduced always.
      ###@###.### 2005-04-18 19:36:08 GMT

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              malenkov Sergey Malenkov (Inactive)
              Reporter:
              gmanwanisunw Girish Manwani (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: