[PATCH] minor regex cleanup: use switch for enum

Isaac Levy isaac.r.levy at gmail.com
Tue Apr 24 00:47:02 UTC 2018

On Mon, Apr 23, 2018 at 5:05 PM Xueming Shen <xueming.shen at oracle.com>

> I would assume in case of an exception thrown from
> appendExpandedReplacement() we don't
> want "text" to be pushed into the "sb".
> -sherman

Perhaps. Though the behavior under exception is undefined and this function
is probably primarily used though the replaceAll API, which wouldn’t return
the intermediate sb under the case of exception.

My reading of the blame was the temp StringBuilder was an artifact of the
api previously using StringBuffer externally.


More information about the core-libs-dev mailing list