JDK-8241037 : GraphemeTest test does not verify Grapheme
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.regex
  • Affected Version: 15
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2020-03-12
  • Updated: 2020-06-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
The two files src/java.base/share/classes/java/util/regex/Grapheme.java and test/jdk/java/util/regex/GraphemeTest.java are a partial copy of each other after "// from java.util.regex.Grapheme.java" in GraphemeTest.


FREQUENCY : always



Comments
This is not a regression from JDK8 where emoji was not correctly working in regex. Although the current test does correctly verify the implementation, the discrepancy came from the performance fix made by 8225061. The test case should reflect the same fix with 8225061
17-03-2020

Further information from the submitter: The problem can be found by looking at the source code. http://hg.openjdk.java.net/jdk/jdk/file/7898edac8a27/src/java.base/share/classes/java/util/regex/Grapheme.java http://hg.openjdk.java.net/jdk/jdk/file/15d69d370743/test/jdk/java/util/regex/GraphemeTest.java GraphemeTest says on Line 97 that the remainder of the file originally comes from Grapheme. http://hg.openjdk.java.net/jdk/jdk/file/15d69d370743/test/jdk/java/util/regex/GraphemeTest.java#l97 but now it does not match anymore and the test does not verify the current implementation of Grapheme any longer. It looks like it was introduced with https://bugs.openjdk.java.net/browse/JDK-8221431. I filed this new bug as suggested in https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-March/065227.html. A potential approach to resolve is part of the patch attached to https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-March/065203.html.
14-03-2020