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

Call to Pattern.flags() to check Pattern.CANNON_EQ results in InternalError

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P1 P1
    • None
    • 1.4.0
    • core-libs
    • None
    • sparc
    • solaris_8

      Call to Pattern.flags() to check Pattern.CANNON_EQ results in java.lang.InternalError on Sparc machine having Solaris8.
      It however runs fine on Linux6.2, Windows 2000 and Solaris8 on Intel. And test for all other fields passes.
      i.e
      import java.util.regex.*;
      public class Flags {
        public static void main(String[] args) throws Exception {
          Pattern p = Pattern.compile("aaa",Pattern.CANON_EQ);
          if(p.flags() != Pattern.CANON_EQ )
             System.out.println("False");
          else
             System.out.println("true");
          }
       }

      Gives
      Exception in thread "main" java.lang.InternalError: Normalizer access failure.
              at java.util.regex.Pattern.normalize(Pattern.java:710)
              at java.util.regex.Pattern.compile(Pattern.java:940)
              at java.util.regex.Pattern.<init>(Pattern.java:647)
              at java.util.regex.Pattern.compile(Pattern.java:556)
              at Flags.main(Flags.java:8)

            mmcclosksunw Michael Mccloskey (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: