Hi Vitaly,

> If there's no early bail out, there's an implicit null check when
> replacement.toString() is called...


Oh apologies! I had missed in the code that NPE does get thrown if
`replacement` is null, no matter if the `if (j < 0) { ... }` block is
entered or not, because `replacement.toString()` gets called immediately
after the if block, which of course executes an implicit null-check.

In that case, the patch LGTM. :)

Kind regards,
Jonathan

Reply via email to