-
Bug
-
Resolution: Fixed
-
P3
-
8, 9
-
b161
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8176983 | 10 | Xueming Shen | P3 | Resolved | Fixed | b03 |
A DESCRIPTION OF THE PROBLEM :
The documentation for Linebreak Matcher \R states that it is equivalent to a specific pattern. However if we substitute that equivalent pattern into a regex, it can give different results.
See the following Stack Overflow question and answer for details--
http://stackoverflow.com/q/42474596/7098259
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
...is equivalent to (?<!\u000D\u000A|[\u000A\u000B\u000C\u000D\u0085\u2028\u2029])
ACTUAL -
...is equivalent to \u000D\u000A|[\u000A\u000B\u000C\u000D\u0085\u2028\u2029]
URL OF FAULTY DOCUMENTATION :
https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html
The documentation for Linebreak Matcher \R states that it is equivalent to a specific pattern. However if we substitute that equivalent pattern into a regex, it can give different results.
See the following Stack Overflow question and answer for details--
http://stackoverflow.com/q/42474596/7098259
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
...is equivalent to (?<!\u000D\u000A|[\u000A\u000B\u000C\u000D\u0085\u2028\u2029])
ACTUAL -
...is equivalent to \u000D\u000A|[\u000A\u000B\u000C\u000D\u0085\u2028\u2029]
URL OF FAULTY DOCUMENTATION :
https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html
- backported by
-
JDK-8176983 Linebreak matcher is not equivalent to the pattern as stated in javadoc
-
- Resolved
-
- relates to
-
JDK-8184706 Matcher doesn't indicate hitEnd after matching \u0D with \R at EOL
-
- Resolved
-