Cleanup Only - Replace calls to Arrays.asList with too few arguments.#3193
Cleanup Only - Replace calls to Arrays.asList with too few arguments.#3193currantw wants to merge 16 commits into
Arrays.asList with too few arguments.#3193Conversation
YANG-DB
left a comment
There was a problem hiding this comment.
can u use static import for the Collections.singletonList & List.of methods ?
c2fe00e to
d9bb503
Compare
74bbe73 to
c603113
Compare
For single responsibility, let's focus on replacing calls to Create a new issue for replacing
|
LantaoJin
left a comment
There was a problem hiding this comment.
Let's focus on cleanup calls to Arrays.asList in this PR.
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
… cases where `List` is already imported. Signed-off-by: currantw <taylor.curran@improving.com>
…ptyMap` with `List.of`/`Map.of` in cases where `List`/`Map` is already imported. Signed-off-by: currantw <taylor.curran@improving.com>
…nkchecker job to fail. Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
d8f31e0 to
82567d3
Compare
Thanks @LantaoJin. I've gone through and reverted all of the changes that aren't specifically related to Please let me know if you have any further review comments. |
Signed-off-by: currantw <taylor.curran@improving.com>
|
@currantw LGTM |
| assertEquals(UNKNOWN, expr.construct(Arrays.asList(STRING, BOOLEAN))); | ||
| assertEquals(UNKNOWN, expr.construct(Arrays.asList(INTEGER, DOUBLE, GEO_POINT))); |
There was a problem hiding this comment.
These two are missing.
Please search all code base again.
| public void compatibilityCheckShouldPassIfAnySpecificationCompatible() { | ||
| assertEquals(DOUBLE, test123.construct(Arrays.asList(DOUBLE))); | ||
| assertEquals(DOUBLE, test123.construct(List.of(DOUBLE))); | ||
| assertEquals(DATE, test123.construct(Arrays.asList(STRING, BOOLEAN))); |
Thanks @LantaoJin. As you'll see from the description, the original intent of this cleanup PR was only to replace My (limited) understanding is that, for lists with two or fewer elements, That being said, I am happy to go ahead with switching additional calls from Please let me know how you want to proceed. Thanks! |
|
Actually I don't think we have any necessary reason to refactor the calls in Tests. They are tests, they are not called in product. The main difference between |
@LantaoJin thanks for your feedback ! For better clarity and planning onward - before starting the actual coding work - lets first create a detailed issue with the following details:
Thanks again and for everyone's work and contributions - we are making great progress !! |
Thanks @LantaoJin and @YANG-DB. Based on the feedback, I'm just going to close this PR. Think I've dedicated enough time to this already! Will make sure to raise a dedicated issue in the future. |
Description
Cleanup Only - Replace calls to
Arrays.asListwith too few arguments.From IntelliJ IDEA:

Related Issues
None
Check List
--signoff.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.