public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/15724] New: Inconsistancy between regex match in java.util.regexp between gcj and Sun's java.
@ 2004-05-29 15:42 john at austin dot homelinux dot net
2004-05-30 15:48 ` [Bug libgcj/15724] " pinskia at gcc dot gnu dot org
2005-07-26 21:44 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: john at austin dot homelinux dot net @ 2004-05-29 15:42 UTC (permalink / raw)
To: java-prs
Playing around with the new java.util.regexp support I found that there is a
pretty major difference in the pattern matching of String.matches(regexp)
between gcj and Sun's java.
It appears to me that on Sun's VM, you have to match the whole string from
beginning to end, and on gcj, just a subset of the string.
Actually I consider the way gcj is doing it to be "correct", but if you want
consistancy with Sun's java, then it is not.
Here's small program:
import java.util.*;
public class test {
public static void main(String[] args) {
String data="key=value";
if (data.matches("^key=.*")) {
System.out.println("Match");
}
else {
System.out.println("Doesn't match");
}
if (data.matches("^key=")) {
System.out.println("Match");
}
else {
System.out.println("Doesn't match");
}
}
The output on Sun's VM:
Match
Doesn't match
The output when compiled in gcj:
Match
Match
If you need the configuration info for my gcc:
johnm:common]$ gcc -v
Reading specs
from /opt/gcc-3.5.0-20040528/lib/gcc/i686-pc-linux-gnu/3.5.0/specs
Configured with: ../gcc-3.5.0-20040528/configure
--prefix=/opt/gcc-3.5.0-20040528 --libexecdir=/opt/gcc-3.5.0-20040528/lib
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --enable-languages=c,c++,java
Thread model: posix
gcc version 3.5.0 20040528 (experimental)
--
Summary: Inconsistancy between regex match in java.util.regexp
between gcj and Sun's java.
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: john at austin dot homelinux dot net
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15724
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libgcj/15724] Inconsistancy between regex match in java.util.regexp between gcj and Sun's java.
2004-05-29 15:42 [Bug java/15724] New: Inconsistancy between regex match in java.util.regexp between gcj and Sun's java john at austin dot homelinux dot net
@ 2004-05-30 15:48 ` pinskia at gcc dot gnu dot org
2005-07-26 21:44 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-30 15:48 UTC (permalink / raw)
To: java-prs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-29 15:42 -------
Confirmed, I think this is a bug in Sun's JDK (I have tested with Apple's JDK but it gives the same result
as you reported that Sun's gives :( ).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|java |libgcj
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-05-29 15:42:13
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15724
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libgcj/15724] Inconsistancy between regex match in java.util.regexp between gcj and Sun's java.
2004-05-29 15:42 [Bug java/15724] New: Inconsistancy between regex match in java.util.regexp between gcj and Sun's java john at austin dot homelinux dot net
2004-05-30 15:48 ` [Bug libgcj/15724] " pinskia at gcc dot gnu dot org
@ 2005-07-26 21:44 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-26 21:44 UTC (permalink / raw)
To: java-prs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-26 21:44 -------
java.util.regexp is part of classpath.
But this is already fixed on the mainline, most likely by the "big" merge of classpath.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15724
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-07-26 21:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-29 15:42 [Bug java/15724] New: Inconsistancy between regex match in java.util.regexp between gcj and Sun's java john at austin dot homelinux dot net
2004-05-30 15:48 ` [Bug libgcj/15724] " pinskia at gcc dot gnu dot org
2005-07-26 21:44 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).