You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/02/03 23:46:47 UTC
[GitHub] [lucene] gsmiller opened a new pull request #644: LUCENE-10403: Add ArrayUtil#grow(T[])
gsmiller opened a new pull request #644:
URL: https://github.com/apache/lucene/pull/644
# Description
Add utility method to `ArrayUtil` allowing the user to omit a min size for generically typed arrays, adding parity with capabilities for primitive type arrays.
# Solution
Added a new method, delegating to the existing one, following the same methodology as all other `grow` methods.
# Tests
No new tests added.
# Checklist
Please review the following and check all that apply:
- [x] I have reviewed the guidelines for [How to Contribute](https://wiki.apache.org/lucene/HowToContribute) and my code conforms to the standards described there to the best of my ability.
- [x] I have created a Jira issue and added the issue ID to my pull request title.
- [x] I have given Lucene maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended)
- [x] I have developed this patch against the `main` branch.
- [x] I have run `./gradlew check`.
- [ ] I have added tests for my changes.
--
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-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
[GitHub] [lucene] gsmiller commented on pull request #644: LUCENE-10403: Add ArrayUtil#grow(T[])
Posted by GitBox <gi...@apache.org>.
gsmiller commented on pull request #644:
URL: https://github.com/apache/lucene/pull/644#issuecomment-1030444352
Thanks @msokolov. It's a little sneaky as a number of places appear to be good candidates to use the new method because they're doing a `+ 1`, but they're adding 1 to something other than the current array length in many cases. I looked at all the candidate usages and found two though that made sense to migrate to the new method. I've updated the PR.
--
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-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
[GitHub] [lucene] gsmiller merged pull request #644: LUCENE-10403: Add ArrayUtil#grow(T[])
Posted by GitBox <gi...@apache.org>.
gsmiller merged pull request #644:
URL: https://github.com/apache/lucene/pull/644
--
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-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
[GitHub] [lucene] gsmiller commented on pull request #644: LUCENE-10403: Add ArrayUtil#grow(T[])
Posted by GitBox <gi...@apache.org>.
gsmiller commented on pull request #644:
URL: https://github.com/apache/lucene/pull/644#issuecomment-1032888391
Thanks for the review @msokolov !
--
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-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org