Codereview request 7067045: replaceAll("\u20ac", "$"); causses java.lang.StringIndexOutOfBoundsExceptio
xueming.shen at oracle.com
Thu Apr 12 13:09:19 PDT 2012
Please help review the change for 7067045.
The change is to throw a more meaningful IAE instead of the
if backslash or $ is the last character in the replacement string. (as
the API indicated, the backslash
and $ character in String's regex replacement and Matcher class have
special meanings, backslash
is for literal character escape and the $ is the capturing group
reference, which needs a group index).
More information about the core-libs-dev