Author: hammant
Date: Wed Aug 25 20:44:08 2004
New Revision: 37053

Modified:
   
avalon/trunk/planet/cornerstone/scheduler/impl/src/main/org/apache/avalon/cornerstone/blocks/scheduler/TimeScheduledEntry.java
Log:
Jon Elson-Green's patch for far dates

Modified: 
avalon/trunk/planet/cornerstone/scheduler/impl/src/main/org/apache/avalon/cornerstone/blocks/scheduler/TimeScheduledEntry.java
==============================================================================
--- 
avalon/trunk/planet/cornerstone/scheduler/impl/src/main/org/apache/avalon/cornerstone/blocks/scheduler/TimeScheduledEntry.java
      (original)
+++ 
avalon/trunk/planet/cornerstone/scheduler/impl/src/main/org/apache/avalon/cornerstone/blocks/scheduler/TimeScheduledEntry.java
      Wed Aug 25 20:44:08 2004
@@ -1,16 +1,16 @@
-/* 
+/*
  * Copyright 1999-2004 The Apache Software Foundation
  * Licensed  under the  Apache License,  Version 2.0  (the "License");
  * you may not use  this file  except in  compliance with the License.
- * You may obtain a copy of the License at 
- * 
+ * You may obtain a copy of the License at
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed  under the  License is distributed on an "AS IS" BASIS,
  * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
  * implied.
- * 
+ *
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
@@ -117,7 +117,20 @@
     public int compareTo( final Object object )
     {
         final TimeScheduledEntry other = (TimeScheduledEntry)object;
-        return (int)-( other.m_time - m_time );
+               final long diff= other.m_time - m_time;
+               if( diff < 0 )
+               {
+                       return 1;
+               }
+               else
+               if( diff == 0 )
+               {
+                       return 0;
+               }
+               else
+               {
+                       return -1;
+               }
     }
 
     public String toString()

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to