You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Andrew Kyle Purtell (Jira)" <ji...@apache.org> on 2022/06/11 20:55:00 UTC

[jira] [Resolved] (HBASE-12060) Replace enhanced for statement with basic for statement where possible

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

Andrew Kyle Purtell resolved HBASE-12060.
-----------------------------------------
    Resolution: Won't Fix

> Replace enhanced for statement with basic for statement where possible
> ----------------------------------------------------------------------
>
>                 Key: HBASE-12060
>                 URL: https://issues.apache.org/jira/browse/HBASE-12060
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Andrew Kyle Purtell
>            Priority: Major
>              Labels: beginner
>
> Wherever we use the enhanced for construction:
> {noformat}
>     for ( FormalParameter : Expression ) Statement
> {noformat}
> where the Expression evaluates to an array or collection type that supports random access, we can avoid creating iterator objects, unless we are also using the iterator to remove items while iterating by using the basic for statement instead:
> {noformat}
> for ( ForInit ; Expression ; ForUpdate ) Statement
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)