dxbjavid opened a new pull request, #759:
URL: https://github.com/apache/commons-text/pull/759
The registry-based ExtendedMessageFormat constructor parses its pattern with
seekNonWs, which asks the split matcher about the character at the current
parse index without first checking it is still inside the buffer. A truncated
format element such as {, {0, or trailing text like {0}extra{ leaves the parse
position at the end of the pattern, so the matcher reads one past the char
array and the constructor throws ArrayIndexOutOfBoundsException rather than the
documented IllegalArgumentException that the plain constructor already gives
for the same input. This bounds the seek to the pattern length so those
patterns report the usual unterminated-format-element error; a regression test
covers the three shapes above.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]