commons-lang icon indicating copy to clipboard operation
commons-lang copied to clipboard

[LANG-1707] Add ArrayUtils.concat methods for concatenating multiple arrays

Open ivamly opened this issue 1 month ago • 3 comments

Implementation of the LANG-1707 suggestion: added the concat methods to ArrayUtils for convenient concatenation of multiple arrays in a single call.

  • [x] Read the contribution guidelines for this project.
  • [x] Read the ASF Generative Tooling Guidance if you use Artificial Intelligence (AI).
  • [x] I used AI to create any part of, or all of, this pull request. Which AI tool was used to create this pull request, and to what extent did it contribute?
  • [x] Run a successful build using the default Maven goal with mvn; that's mvn on the command line by itself.
  • [x] Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied. This may not always be possible, but it is a best practice.
  • [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • [x] Each commit in the pull request should have a meaningful subject line and body. Note that a maintainer may squash commits during the merge process.

ivamly avatar Dec 08 '25 15:12 ivamly

Hi! This is my first contribution to Apache Commons. I've started by implementing the concat methods for primitive arrays and their corresponding tests. I would appreciate verification that I'm on the right track. I'm happy to address any feedback and will gladly add the generic T[] method and its tests once the approach is confirmed.

ivamly avatar Dec 08 '25 15:12 ivamly

Hello @ivamly I'd like to understand why all this new code is needed? For example, where in Commons components themselves would this be needed? TY!

garydgregory avatar Dec 14 '25 14:12 garydgregory

I'm not entirely sure I understand the question correctly. My implementation was based on the Jira ticket and its comments, where adding these methods was discussed and approved (as I understood it).

Could you please clarify what I might be missing? I'd be happy to adjust the approach if needed.

ivamly avatar Dec 14 '25 15:12 ivamly