bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/25616] New: Unexpected java.util.regex.PatternSyntaxExcep


From: kaz at maczuka dot gcd dot org
Subject: [Bug classpath/25616] New: Unexpected java.util.regex.PatternSyntaxException: repeated token may be empty
Date: 31 Dec 2005 23:42:23 -0000

The following test program

$ cat W.java
public class W {
  public static void main(String[] args) {
    System.out.println(args[0].matches(args[1]));
  }
}

shows

$ java W 'b b c b b b c c c b ' '(((b )*(c )*)*)'
java.util.regex.PatternSyntaxException: At position 13 in regular expression
pattern:
repeated token may be empty
   at java.lang.VMThrowable.fillInStackTrace (VMThrowable.java:native)
   at java.lang.VMThrowable.fillInStackTrace (VMThrowable.java:79)
   at java.lang.Throwable.fillInStackTrace (Throwable.java:498)
   at java.lang.Throwable.<init> (Throwable.java:159)
   at java.lang.Exception.<init> (Exception.java:78)
   at java.lang.RuntimeException.<init> (RuntimeException.java:76)
   at java.lang.IllegalArgumentException.<init>
(IllegalArgumentException.java:74)
   at java.util.regex.PatternSyntaxException.<init>
(PatternSyntaxException.java:77)
   at java.util.regex.Pattern.<init> (Pattern.java:106)
   at java.util.regex.Pattern.compile (Pattern.java:143)
   at java.util.regex.Pattern.compile (Pattern.java:125)
   at java.util.regex.Pattern.matches (Pattern.java:159)
   at java.lang.String.matches (String.java:864)
   at W.main (W.java:3)

With Sun's JDK, this test prints "true" as expected.


-- 
           Summary: Unexpected java.util.regex.PatternSyntaxException:
                    repeated token may be empty
           Product: classpath
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kaz at maczuka dot gcd dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25616





reply via email to

[Prev in Thread] Current Thread [Next in Thread]