[NEW BUG]: Avoid allocations in String.replace(CharSequence, CharSequence) in case no replacement happened

Claes Redestad claes.redestad at oracle.com
Thu Mar 2 11:44:36 UTC 2017

On 03/02/2017 11:38 AM, Ulf Zibis wrote:
> Hi Vitaly,
> I don't see any contract to throw an NPE:
> https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#replace-java.lang.CharSequence-java.lang.CharSequence- 

"Unless otherwise noted, passing anullargument to a constructor or 
method in this class will cause a|NullPointerException| 
be thrown."


More information about the core-libs-dev mailing list