Thanks JC, applied to jakarta-turbine-2 and jakarta-turbine-torque CVS.

"J.C." <[EMAIL PROTECTED]> writes:

> 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.
>
>
> Index: IDBroker.java
> ===================================================================
> RCS file: 
>/home/cvspublic/jakarta-turbine-2/src/java/org/apache/turbine/util/db/IDBroker.java,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 IDBroker.java
> --- IDBroker.java     2001/08/16 05:09:47     1.1.1.1
> +++ IDBroker.java     2001/10/17 01:46:22
> @@ -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