← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3157: minor refactoring..

 

------------------------------------------------------------
revno: 3157
committer: Jo Størset <storset@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-03-24 15:41:35 +0100
message:
  minor refactoring..
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveValueAction.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveValueAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveValueAction.java	2010-11-25 22:22:10 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveValueAction.java	2011-03-24 14:41:35 +0000
@@ -28,7 +28,6 @@
 
 import java.util.Collection;
 import java.util.Date;
-import java.util.Iterator;
 import java.util.Set;
 
 import org.apache.commons.logging.Log;
@@ -219,15 +218,14 @@
         else
         {
             Set<DataElementCategoryOptionCombo> options = dataElement.getCategoryCombo().getOptionCombos();
-            if ( options != null && options.size() > 0 )
+            if ( options != null)
             {
-                Iterator<DataElementCategoryOptionCombo> i = options.iterator();
-                while ( i.hasNext() )
+                for ( DataElementCategoryOptionCombo tmpOption : options )
                 {
-                    DataElementCategoryOptionCombo tmpOption = i.next();
                     if ( tmpOption.getId() == optionComboId )
                     {
                         optionCombo = tmpOption;
+                        break;
                     }
                 }
             }