[ 
https://issues.apache.org/jira/browse/SOLR-15485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17364980#comment-17364980
 ] 

Christine Poerschke edited comment on SOLR-15485 at 6/17/21, 3:29 PM:
----------------------------------------------------------------------

Via {{validate-source-patterns.gradle}} and its {{invalidJavaOnlyPatterns}} 
this could be discouraged (e.g. if it's all on the same line) but not entirely 
disallowed (e.g. if it's broken across lines or as separate statements).

pull request with proposed changes: https://github.com/apache/solr/pull/179


was (Author: cpoerschke):
Via {{validate-source-patterns.gradle}} and its {{invalidJavaOnlyPatterns}} 
this could be discouraged (e.g. if it's all on the same line) but not entirely 
disallowed (e.g. if it's broken across lines or as separate statements).

Pull request with proposed changes: to follow


> 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
>
> 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]

Reply via email to