dlr         01/10/17 09:37:26

  Modified:    src/java/org/apache/turbine/util/db IDBroker.java
  Log:
  Patch by J.C. <[EMAIL PROTECTED]>:
  
  If the system clock is set back at any point while your app is running, and an 
object is created before the "original" time, the "timeLapse" value would be negative, 
which would make the "clever quantity" negative.
  
  Not good.
  
  Revision  Changes    Path
  1.2       +2 -2      
jakarta-turbine-2/src/java/org/apache/turbine/util/db/IDBroker.java
  
  Index: IDBroker.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/util/db/IDBroker.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- IDBroker.java     2001/08/16 05:09:47     1.1
  +++ IDBroker.java     2001/10/17 16:37:26     1.2
  @@ -108,7 +108,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Frank Y. Kim</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>John D. McNally</a>
  - * @version $Id: IDBroker.java,v 1.1 2001/08/16 05:09:47 jvanzyl Exp $
  + * @version $Id: IDBroker.java,v 1.2 2001/10/17 16:37:26 dlr Exp $
    */
   public class IDBroker
       implements Runnable, IdGenerator
  @@ -493,7 +493,7 @@
               long thenLong = lastTime.getTime();
               long nowLong = now.getTime();
               int timeLapse = (int)(nowLong-thenLong);
  -            if ( timeLapse < sleepPeriod )
  +            if ( timeLapse < sleepPeriod && timeLapse > 0 )
               {
                   Log.info("Unscheduled retrieval of more ids for table: " +
                            tableName);
  
  
  

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

Reply via email to