RFR: 8247546: Pattern matching does not skip correctly over supplementary characters
naoto.sato at oracle.com
naoto.sato at oracle.com
Mon Jul 27 21:18:53 UTC 2020
On 7/27/20 11:51 AM, naoto.sato at oracle.com wrote:
> Apart from the original issue, there was a bug in Range() method
> (Pattern.java:5795), so it is fixed along.
Created a test case for this:
--- a/test/jdk/java/util/regex/SupplementaryTestCases.txt
+++ b/test/jdk/java/util/regex/SupplementaryTestCases.txt
@@ -149,6 +149,11 @@
\ud83d\udca9
false 0
+// @bug 8247546
+[\x{dc00}-\x{dfff}]
+\ud83d\udca9
+false 0
+
// use of x modifier
\ud800\udc61bc(?x)bl\ud800\udc61h
\ud800\udc61bcbl\ud800\udc61h
Low surrogate range check falls into using BmpCharPredicate, which
results in the same bug. The entire webrev is also revised:
http://cr.openjdk.java.net/~naoto/8247546/webrev.01/
Naoto
More information about the core-libs-dev
mailing list