On Thu, 5 Sep 2024 22:36:59 GMT, Kevin Driver <kdri...@openjdk.org> wrote:
>> My personal opinion is that this adds complexity which is unnecessary. The >> `Arrays.copyOf` solution reads more simply and GC will take care of any >> extra allocation once it goes out of scope. I appreciate the alternate fix, >> but in this case the original solution is more easily understood and thus >> more maintainable. > > Made a couple small changes and accepted your proposed code. Thanks! See: https://github.com/openjdk/jdk/pull/20301/commits/59b1743fd225ff34e6bcce055fd47a887ed22a08 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1746248288