Name: gm110360 Date: 11/20/2003
FULL PRODUCT VERSION :
1.4.0 - 1.4.1_05 is OK.
1.4.2 - 1.4.2_02 is incorrect.
A DESCRIPTION OF THE PROBLEM :
following regular expression matching example should return true.
"\u3042".matches("[^a]")
jdk1.4.0 - jdk1.4.1_05 implementation returns true.
But, since 1.4.2, that expression returns false.
IMHO, java.util.regex.Pattern$BitClass#match(...) has a bug.
>> boolean match(Matcher matcher, int i, CharSequence seq) {
>> if (i < matcher.to) {
>> int c = seq.charAt(i);
>> if (c > 255)
>> return false;
would be something like ...
>> boolean match(Matcher matcher, int i, CharSequence seq) {
>> if (i < matcher.to) {
>> int c = seq.charAt(i);
>> if (c > 255)
>> return complementMe;
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
% java Test
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class Test {
static public final void main(final String [] args) {
System.out.println("\u3042".matches("[^a]"));
}
}
---------- END SOURCE ----------
Release Regression From : 1.4.1_05
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
(Incident Review ID: 226891)
======================================================================