[jira] [Commented] (OFBIZ-11829) Replace for-loop with forEach loop

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-11829) Replace for-loop with forEach loop

Nicolas Malin (Jira)

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

Jacques Le Roux commented on OFBIZ-11829:
-----------------------------------------

Cursory review OK, compilation OK,  -101 (26735 to 26634) check style issues: +1 for commit

> Replace for-loop with forEach loop
> ----------------------------------
>
>                 Key: OFBIZ-11829
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11829
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: ALL COMPONENTS
>    Affects Versions: Trunk
>            Reporter: Pawan Verma
>            Assignee: Pawan Verma
>            Priority: Minor
>         Attachments: OFBIZ-11829-plugins.patch, OFBIZ-11829.patch
>
>
> Replace for-loop with a forEach loop
>  
> {code:java}
> List<String> topics = new LinkedList<>();
> for (int i = 0; i < topicList.size(); i++) {
>     GenericValue assoc = topicList.get(i);
> {code}
> Replace with
>  
> {code:java}
> for (GenericValue assoc : topicList) {
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)