sonatype-lift[bot] commented on code in PR #912:
URL: https://github.com/apache/solr/pull/912#discussion_r902723580
##########
solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/RecursiveEvaluator.java:
##########
@@ -180,10 +180,9 @@ public RecursiveEvaluator(
Set<String> namedParameters =
factory.getNamedOperands(expression).stream()
- .map(param -> param.getName())
+ .map(StreamExpressionNamedParameter::getName)
.collect(Collectors.toSet());
- long ignorableCount =
- ignoredNamedParameters.stream().filter(name ->
namedParameters.contains(name)).count();
+ long ignorableCount =
ignoredNamedParameters.stream().filter(namedParameters::contains).count();
Review Comment:
*[UnusedVariable](https://errorprone.info/bugpattern/UnusedVariable):* The
local variable 'ignorableCount' is never read.
Reply with *"**@sonatype-lift help**"* for more info.
Reply with *"**@sonatype-lift ignore**"* to tell LiftBot to leave out the
above finding from this PR.
Reply with *"**@sonatype-lift ignoreall**"* to tell LiftBot to leave out all
the findings from this PR and from the status bar in Github.
When talking to LiftBot, you need to **refresh** the page to see its
response. [Click here](https://help.sonatype.com/lift/talking-to-lift) to get
to know more about LiftBot commands.
---
Was this a good recommendation?
[ [🙁 Not
relevant](https://www.sonatype.com/lift-comment-rating?comment=281932877&lift_comment_rating=1)
] - [ [😕 Won't
fix](https://www.sonatype.com/lift-comment-rating?comment=281932877&lift_comment_rating=2)
] - [ [😑 Not critical, will
fix](https://www.sonatype.com/lift-comment-rating?comment=281932877&lift_comment_rating=3)
] - [ [🙂 Critical, will
fix](https://www.sonatype.com/lift-comment-rating?comment=281932877&lift_comment_rating=4)
] - [ [😊 Critical, fixing
now](https://www.sonatype.com/lift-comment-rating?comment=281932877&lift_comment_rating=5)
]
##########
solr/modules/hadoop-auth/src/java/org/apache/solr/security/hadoop/HadoopAuthFilter.java:
##########
@@ -215,7 +210,7 @@ public List<ACL> getAclForPath(String path) {
}
private List<AuthInfo> createAuthInfo(SolrZkClient zkClient) {
- List<AuthInfo> ret = new LinkedList<AuthInfo>();
+ List<AuthInfo> ret = new LinkedList<>();
Review Comment:
*[JdkObsolete](https://errorprone.info/bugpattern/JdkObsolete):* It is very
rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless
you're willing to invest a lot of time into benchmarking. Caveat: LinkedList
supports null elements, but ArrayDeque does not.
```suggestion
List<AuthInfo> ret = new ArrayList<>();
```
Reply with *"**@sonatype-lift help**"* for more info.
Reply with *"**@sonatype-lift ignore**"* to tell LiftBot to leave out the
above finding from this PR.
Reply with *"**@sonatype-lift ignoreall**"* to tell LiftBot to leave out all
the findings from this PR and from the status bar in Github.
When talking to LiftBot, you need to **refresh** the page to see its
response. [Click here](https://help.sonatype.com/lift/talking-to-lift) to get
to know more about LiftBot commands.
---
Was this a good recommendation?
[ [🙁 Not
relevant](https://www.sonatype.com/lift-comment-rating?comment=281932891&lift_comment_rating=1)
] - [ [😕 Won't
fix](https://www.sonatype.com/lift-comment-rating?comment=281932891&lift_comment_rating=2)
] - [ [😑 Not critical, will
fix](https://www.sonatype.com/lift-comment-rating?comment=281932891&lift_comment_rating=3)
] - [ [🙂 Critical, will
fix](https://www.sonatype.com/lift-comment-rating?comment=281932891&lift_comment_rating=4)
] - [ [😊 Critical, fixing
now](https://www.sonatype.com/lift-comment-rating?comment=281932891&lift_comment_rating=5)
]
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]