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

incorrect regular expression "(?!" is not diagnosed correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.0.4
    • xml

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


      ADDITIONAL OS VERSION INFORMATION :
      W2K, SP4

      A DESCRIPTION OF THE PROBLEM :
      xjc fails the following, otherwise legal, regular expression.
      [ERROR] InvalidRegex: Pattern value '(?![0-9]{1,255}$)[_a-zA-Z0-9][\-._a-zA-Z0-9]{0,254}' is not a valid regular expression. The reported error was: 'This expression is not supported in the current option setting.'.
        line 10 of BasicTypes.xsd

      The offending xml type is:
          <simpleType name="MyName">
              <restriction base="string">
                  <pattern value="(?![0-9]{1,255}$)[_a-zA-Z0-9][\-._a-zA-Z0-9]{0,254}"/>
              </restriction>
          </simpleType>

      This is not a critical problem, as one can change a regular expression to a more conventional one, but in some case it may be desirable


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create a schema that contains the above type and run xjc on it


      REPRODUCIBILITY :
      This bug can be reproduced always.

            jsuttorsunw Jeff Suttor (Inactive)
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: