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

ExceptionInInitializerError is caught when the pattern has precomposed character

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 6
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b119
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      FULL PRODUCT VERSION :
      java version "1.6.0_07"
      Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
      Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      ExceptionInInitializerError is caught when the pattern has precomposed characters in CANON_EQ mode.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile and run the program.

      ACTUAL -
      java.lang.ExceptionInInitializerError
      Caused by: java.util.regex.PatternSyntaxException: Unclosed group near index 27
      (?:e?e|?e|ee?(?:e?n|?n|en?)
                                 ^
      at java.util.regex.Pattern.error(Unknown Source)
      at java.util.regex.Pattern.accept(Unknown Source)
      at java.util.regex.Pattern.group0(Unknown Source)
      at java.util.regex.Pattern.sequence(Unknown Source)
      at java.util.regex.Pattern.expr(Unknown Source)
      at java.util.regex.Pattern.compile(Unknown Source)
      at java.util.regex.Pattern.<init>(Unknown Source)
      at java.util.regex.Pattern.compile(Unknown Source)
      at sample.RegexTest.<clinit>(RegexTest.java:6)

      Exception in thread "main"

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      package sample;

      import java.util.regex.*;

      public class RegexTest {
      static final Pattern pt = Pattern.compile("één", Pattern.CANON_EQ);

      public static void main(String[] args) {
      System.out.println(pt.matcher("één").matches());
      }
      }

      ---------- END SOURCE ----------

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sherman Xueming Shen
                Reporter:
                ndcosta Nelson Dcosta
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: