bruno-roustant opened a new pull request, #13360: URL: https://github.com/apache/lucene/pull/13360
ArrayUtil provides copySubArray() as replacement of Array.copyOf and Array.copyOfRange (with better bounds check). Unfortunately ArrayUtil does not provide copyArray(), so it is weird for callers to have to call a method named copySubArray() when we want to copy the full array. This PR adds ArrayUtil.copyArray(), and replaces the calls to ArrayUtil.copySubArray(array, 0, array.length) with calls to ArrayUtil.copyArray(array). I used the following regex to match all calls: `copyOfSubArray\(([^,]+), 0, .+\.length\) `and this one to replace `copyOf($1)` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org