RFR JDK-8176029: Linebreak matcher is not equivalent to the pattern as stated in javadoc
Roger Riggs
Roger.Riggs at Oracle.com
Thu Mar 9 17:59:39 UTC 2017
Hi Sherman,
Sorry for the delay,
Looks fine to me,
Roger
On 3/7/2017 1:27 AM, Xueming Shen wrote:
> ping ...
>
> On 3/2/17, 6:56 PM, Xueming Shen wrote:
>> Hi,
>>
>> Please help review the change for JDK-8176029
>>
>> issue: https://bugs.openjdk.java.net/browse/JDK-8176029
>> webrev: http://cr.openjdk.java.net/~sherman/8176029/webrev
>>
>> It appears the API doc for \R is correct, instead the implementation
>> is buggy when
>> dealing with sequence "\r\n" (u+000du+000a). The existing
>> implementation fails to
>> backtrack to match \r and then next.match() when the attempt \r\n +
>> next.match()
>> failed. As a simple obvious sample both following should return true.
>> The existing
>> implementation returns false for the second.
>>
>> "\r\n".matches("\\R")
>> "\r\n".matches("\\R\\n")
>>
>> Thanks,
>> Sherman
>
More information about the core-libs-dev
mailing list