8058779: Faster implementation of String.replace(CharSequence, CharSequence)
Ulf Zibis
Ulf.Zibis at CoSoCo.de
Mon Jun 1 08:32:52 UTC 2015
Hi,
Am 31.05.2015 um 18:03 schrieb Ivan Gerasimov:
>
> On 31.05.2015 18:54, Ivan Gerasimov wrote:
>>
>> I fixed the code and added the case to the regression test in the new webrev.
>>
> Which is right here:
> http://cr.openjdk.java.net/~igerasim/8058779/05/webrev/
Shoudn't the user be informed via javadoc about the risk of an OutOfMemoryError, just from illegal
arguments of this method?
Example:
this.value.length() = 100
target.value.length() = 200
replacement.value.length() = 50
results in:
newLenHint = -500 --> OutOfMemoryError
In other words, is this a good reason to throw such an Error?
Little nit:
Indentation for line continuation should be 8 spaces.
-Ulf
More information about the core-libs-dev
mailing list