[
https://issues.apache.org/jira/browse/SOLR-15485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17378419#comment-17378419
]
Uwe Schindler commented on SOLR-15485:
--------------------------------------
I would not add a regex for this. This looks like a copypasted strangeness. As
it is gone now it would not reappear, Trust me.
Why was this done like this at all? Looks like crazy.
Btw: the first part of the patch should use a method reference. That's a
"styling" antipattern. If the lambda just calls a method without any adaptions,
it should be a method reference.
{{customThreadPool.submit(() -> updateShardHandler.close());}}
Should be:
{{customThreadPool.submit(updateShardHandler::close);}}
> discourage Collections.singleton.forEach use
> --------------------------------------------
>
> Key: SOLR-15485
> URL: https://issues.apache.org/jira/browse/SOLR-15485
> Project: Solr
> Issue Type: Task
> Reporter: Christine Poerschke
> Assignee: Christine Poerschke
> Priority: Minor
> Fix For: main (9.0), 8.10
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> For example
> {code}
> Collections.singleton(foo).parallelStream().forEach(c -> { c.bar(); });
> {code}
> or
> {code}
> Collections.singleton(foo).stream().forEach(c -> { c.bar(); });
> {code}
> should typically be equivalent to
> {code}
> foo.bar();
> {code}
> which is more concise.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]