bug-classpath
[Top][All Lists]
Advanced

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

[Bug classpath/31057] New: java.util.regex.Pattern.toString() incorrect


From: swhite-gccbugs at decisionsoft dot com
Subject: [Bug classpath/31057] New: java.util.regex.Pattern.toString() incorrect according to Java 1.5 API
Date: 6 Mar 2007 14:14:15 -0000

java.util.regex.Pattern.toString() on a Sun 1.5 JVM returns the same as
pattern().  The javadoc states:

 Returns the string representation of this pattern. This is the regular
expression from which this pattern was compiled.

This is a change from Sun Java 1.4, where it returned the same as
Object.toString() - though this behaviour was not specified.  GNU Classpath
0.93 mirrors the undocumented behaviour in Java 1.4, but should probably be
updated to behave as per the documented behaviour in Java 1.5.  It is a trivial
change but I suspect increasingly code may depend on the 1.5 behaviour, as
people may rely on toString when they really should have called pattern().


-- 
           Summary: java.util.regex.Pattern.toString() incorrect according
                    to Java 1.5 API
           Product: classpath
           Version: 0.93
            Status: UNCONFIRMED
          Severity: trivial
          Priority: P3
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: swhite-gccbugs at decisionsoft dot com


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





reply via email to

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