continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r332033 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Date Wed, 09 Nov 2005 13:19:47 GMT
Author: evenisse
Date: Wed Nov  9 05:19:42 2005
New Revision: 332033

URL: http://svn.apache.org/viewcvs?rev=332033&view=rev
Log:
always update schedule in scheduler if user change schedule definition

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=332033&r1=332032&r2=332033&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Wed Nov  9 05:19:42 2005
@@ -1068,6 +1068,9 @@
             {
                 if ( schedule.isActive() )
                 {
+                    // I unactivate it before if it's already active
+                    schedulesActivator.unactivateSchedule( schedule, this );
+
                     schedulesActivator.activateSchedule( schedule, this );
                 }
                 else
@@ -1095,18 +1098,9 @@
 
         schedule.setDelay( new Integer( (String) configuration.get( "schedule.delay" ) ).intValue()
);
 
-        boolean isActive = schedule.isActive();
-
         schedule.setActive( new Boolean( (String) configuration.get( "schedule.active" )
).booleanValue() );
 
-        if ( schedule.isActive() == isActive )
-        {
-            updateSchedule( schedule, false );
-        }
-        else
-        {
-            updateSchedule( schedule, true );
-        }
+        updateSchedule( schedule, true );
     }
 
     public void removeSchedule( int scheduleId )



Mime
View raw message