Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLR-17027: Removing list.toArray calls with pre sized arrays - core #2003

Merged

Conversation

renatoh
Copy link
Contributor

@renatoh renatoh commented Oct 11, 2023

@renatoh renatoh changed the title Removing list.to array calls with pre sized arrays Removing list.toArray calls with pre sized arrays Oct 11, 2023
@renatoh
Copy link
Contributor Author

renatoh commented Oct 12, 2023

@risdenk
thanks for review my PR, are you able to merge the PR?

@risdenk
Copy link
Contributor

risdenk commented Oct 12, 2023

@renatoh on your branch - I see that there are still ~54 outstanding toArray with sizes according to intellij? Is that expected?

@renatoh
Copy link
Contributor Author

renatoh commented Oct 12, 2023

@risdenk yes, since I only cleaned them up in the module solr/core

@risdenk risdenk changed the title Removing list.toArray calls with pre sized arrays SOLR-17027: Removing list.toArray calls with pre sized arrays - core Oct 12, 2023
@risdenk
Copy link
Contributor

risdenk commented Oct 12, 2023

Ah thanks @renatoh makes sense - I created https://issues.apache.org/jira/browse/SOLR-17027 and updated the description to mention this is just core so far. We can use SOLR-17027 to tie other modules together by commit message.

@risdenk risdenk self-assigned this Oct 12, 2023
@risdenk risdenk merged commit 663a64b into apache:main Oct 12, 2023
1 of 2 checks passed
@risdenk
Copy link
Contributor

risdenk commented Oct 12, 2023

@renatoh feel free to open another PR or two for the remaining:

Remaining findings
solr-root.solr.core.test - 40
solr-root.solr.modules.analysis-extras.main - 1
solr-root.solr.modules.sql.main - 1
solr-root.solr.solrj-streaming.main - 3
solr-root.solr.solrj.main - 3
solr-root.solr.test-framework.main - 1

@renatoh
Copy link
Contributor Author

renatoh commented Oct 12, 2023

@risdenk were you able to scan the code for this specific issue within intellij to get the tally for each module for that exact warning? if so how did you do it?

@risdenk
Copy link
Contributor

risdenk commented Oct 12, 2023

IntelliJ -> right click on top level project module solr-root -> Analyze -> Run Inspection By Name -> search for "toArray call style" -> whole project -> wait for it to finish

@renatoh
Copy link
Contributor Author

renatoh commented Oct 12, 2023

@risdenk
oh, I was searching exactly for this feature when I was doing the clean up, but was not able to find it.
thanks al lot, that is very useful!

risdenk added a commit that referenced this pull request Oct 15, 2023
…2003)

Co-authored-by: Renato Haeberli <>
Co-authored-by: Kevin Risden <krisden@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants