Hi Aleksej,

The patch looks good. It's good that you identified the issue so quickly. The definition of the XPath's substring function is indeed different. When the beginIndex is out of bound (0 in this case since it treats the position of the first character as 1), instead of getting an IOBE as String would with negative index, it actually uses it to calculate the length of the substring.

Best,
Joe

On 3/31/2015 6:29 AM, Aleksej Efimov wrote:
Hi,

Please review a fix for JCK test failure [2] that was caused by slightly incorrect fix for JDK-8074297 [3]. The problem is that the length of required string is incorrectly calculated when the start index is less or equal than zero: The pushed fix for JDK-8074297 assumes that length are specified from the first string character, but it should be counted from the specified start index - two added test cases for substring test illustrates it - one for string with supplementary characters, another one without.
All JCK xml related tests passes (including the failed one).
Tests set: api/xsl api/javax_xml api/org_xml xml_schema api/xinclude.
Test results: passed: 35,342

Thank you,
Aleksej

[1] Webrev: http://cr.openjdk.java.net/~aefimov/8076290/00/
[2] JBS: https://bugs.openjdk.java.net/browse/JDK-8076290
[3] JDK-8074297: https://bugs.openjdk.java.net/browse/JDK-8074297

Reply via email to