You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by dl...@apache.org on 2001/10/17 18:36:13 UTC

cvs commit: jakarta-turbine-torque/src/java/org/apache/torque/oid IDBroker.java

dlr         01/10/17 09:36:13

  Modified:    src/java/org/apache/torque/oid IDBroker.java
  Log:
  Patch by J.C. <j_...@mac.com>:
  
  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.5       +2 -2      jakarta-turbine-torque/src/java/org/apache/torque/oid/IDBroker.java
  
  Index: IDBroker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/oid/IDBroker.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -u -r1.4 -r1.5
  --- IDBroker.java	2001/09/05 09:39:28	1.4
  +++ IDBroker.java	2001/10/17 16:36:12	1.5
  @@ -114,7 +114,7 @@
    *
    * @author <a href="mailto:frank.kim@clearink.com">Frank Y. Kim</a>
    * @author <a href="mailto:jmcnally@collab.net">John D. McNally</a>
  - * @version $Id: IDBroker.java,v 1.4 2001/09/05 09:39:28 jon Exp $
  + * @version $Id: IDBroker.java,v 1.5 2001/10/17 16:36:12 dlr Exp $
    */
   public class IDBroker
       implements Runnable, IdGenerator
  @@ -529,7 +529,7 @@
               long thenLong = lastTime.getTime();
               long nowLong = now.getTime();
               int timeLapse = (int)(nowLong-thenLong);
  -            if ( timeLapse < sleepPeriod )
  +            if ( timeLapse < sleepPeriod && timeLapse > 0 )
               {
                   Torque.getCategory().info("Unscheduled retrieval of more ids for table: " +
                            tableName);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org