continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r443538 - /maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
Date Fri, 15 Sep 2006 00:59:03 GMT
Author: carlos
Date: Thu Sep 14 17:59:01 2006
New Revision: 443538

URL: http://svn.apache.org/viewvc?view=rev&rev=443538
Log:
Removed extra loop

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java?view=diff&rev=443538&r1=443537&r2=443538
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
Thu Sep 14 17:59:01 2006
@@ -78,21 +78,13 @@
                 active = schedule.isActive();
 
                 String[] cronEx = schedule.getCronExpression().split( " " );
-                int i = 0;
-                while ( i < cronEx.length )
-                {
-                    switch( i )
-                    {
-                        case 0 : second = cronEx[i]; break;
-                        case 1 : minute = cronEx[i]; break;
-                        case 2 : hour = cronEx[i]; break;
-                        case 3 : dayOfMonth = cronEx[i]; break;
-                        case 4 : month = cronEx[i]; break;
-                        case 5 : dayOfWeek = cronEx[i]; break;
-                        case 6 : year = cronEx[i]; break;
-                    }
-                    i++;
-                }
+                second = cronEx[0];
+                minute = cronEx[1];
+                hour = cronEx[2];
+                dayOfMonth = cronEx[3];
+                month = cronEx[4];
+                dayOfWeek = cronEx[5];
+                year = cronEx[6];
 
                 description = schedule.getDescription();
                 name = schedule.getName();



Mime
View raw message