[ 
https://issues.apache.org/jira/browse/SOLR-15485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christine Poerschke reopened SOLR-15485:
----------------------------------------

Re-opening to remove the regex check and also to replace the styling 
anti-pattern which I note exists also already elsewhere prior to the changes in 
this issue.
{code:java}
$ git grep -l "submit.*() -> [a-zA-Z]*\.[a-zA-z]*())"
solr/core/src/java/org/apache/solr/core/CoreContainer.java
solr/core/src/test/org/apache/solr/cloud/OverseerTest.java

$ git grep -h "submit.*() -> [a-zA-Z]*\.[a-zA-z]*())"
            customThreadPool.submit(() -> updateShardHandler.close());
      customThreadPool.submit( () -> zkController.close());
      customThreadPool.submit( () -> httpShardHandlerFactory.close());
      customThreadPool.submit( () -> updateShardHandler.close());
      customThreadPool.submit( () -> reader.close());
      customThreadPool.submit( () -> overseer.close());
{code}

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

Reply via email to