On 01/27/2011 12:48 PM, Tom Christiansen wrote:
Sherman wrote:
Oh, I see the problem. Obviously I have been working on jdk7 too long
and forgot the latest release is still 6:-( There is indeed a bug in
the previous implementation which I fixed in 7 long time ago (I
mentioned this in one of the early emails but was not specific, my
apology), probably should backport to 6 update release asap. The test
case runs well (the "failures" in literals are expected)
Could you please elaborate a bit on that? Code points specified by
value are not to be re-evaluated for pattern-syntax senses ("meta-
ness"). Could you please show one sample string and one sample regex
containing a "\\uXXXX" mention that you expect to fail? There should
be no failures at all when doing that.
Mark's LITERALS test is something like this
String s = new StringBuilder().appendCodePoint(i).toString();
String target = "a" + s + "b";
Failures.LITERALS.checkMatch(i, "a" + s + "b", target);
In which it does not escape those meta characters. Some are simply because
of the PatternSyntaxException, such as "a[b" as a pattern, some are just not
matching, pattern a*b against the string "a*b". This "LITERALS" here
actually
has nothing to do with our hex notation discussion.
I will go through the other half of your email later, have something
else to finish.
-Sherman