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

empty xml:comment problem

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 5.0
    • 1.4.2
    • xml

    Description



      Name: rmT116609 Date: 06/12/2003


      FULL PRODUCT VERSION :
      java version "1.4.2-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b19)
      Java HotSpot(TM) Client VM (build 1.4.2-beta-b19, mixed mode)

      FULL OS VERSION :
      Microsoft Windows 2000 [Version 5.00.2195]

      A DESCRIPTION OF THE PROBLEM :
      The following xsl fragment suffices to cause the xslt processor
      to raise and ArrayOutOfBoundException -1:

      <xsl:comment/>

      The problem lies in the class org.apache.xalan.serialze.SerializerToXML
      method comment (char [], int, int), line 1298:

            if (ch[limit-1] == '-')

      when limit is 0 (and it is, when the comment content is empty)
      the described exception occurs.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1) make an xsl width an empty comment
      2) run the xsl

      ACTUAL -
      ArrayOutOfBoundException

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      ArrayOutOfBoundException

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      <xsl:comment/>
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      not write <xsl:comment/> in an xsl.
      (Review ID: 187841)
      ======================================================================

      Attachments

        Activity

          People

            ayadavsunw Arun Yadav (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: