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

Regex's with wrong char range pattern are accepted by validator and schema parser

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.4
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Not verified

      Backports

        Description

        Attached 9 pairs (schema + xml document) which use the regex syntax '[a-c-1-4x-z-7-9]*'. This syntax is not valid in XML Schema, but current ri validates a xml document against appropriate schema whithout error.
        If Apache Xerces2.9.1 is used through the endorsed dirs mechanism, all tests fail as expected
        For example: For xml_schema/msData/regex/jaxp/reG32.html#reG32.v
        Error:
         file:/F:/JCK/JCK60b/JCK-runtime-6b/tests/xml_schema/msData/regex/reG32.xsd(20,47):
         InvalidRegex:
         Pattern value '[a-c-1-4x-z-7-9]*' is not a valid regular expression.
         The reported error was: ''-' is an invalid character range. Write '\-'.'.
        STATUS:Failed.ErrorHandler reports 1 errors, 0 warnings.

        See CR 6972016 for more detail.
        The following tests failed during JCK-runtime-7 testing for JDK 7 b112 but passed for JDK 7 b111:

        xml_schema/msData/regex/jaxp/reG26.html#reG26.v
        xml_schema/msData/regex/jaxp/reG27.html#reG27.v
        xml_schema/msData/regex/jaxp/reG28.html#reG28.v
        xml_schema/msData/regex/jaxp/reG29.html#reG29.v
        xml_schema/msData/regex/jaxp/reG30.html#reG30.v
        xml_schema/msData/regex/jaxp/reG31.html#reG31.v
        xml_schema/msData/regex/jaxp/reG32.html#reG32.v
        xml_schema/msData/regex/jaxp/reG33.html#reG33.v
        xml_schema/msData/regex/jaxp/reH19.html#reH19.v

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                joehw Joe Wang
                Reporter:
                lkuskov Leonid Kuskov
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: