commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject svn commit: r201760 - /jakarta/commons/proper/io/branches/finder-reminder/java/org/apache/commons/io/find/FindingFilter.java
Date Sun, 26 Jun 2005 09:57:22 GMT
Author: scolebourne
Date: Sat Jun 25 08:55:43 2005
New Revision: 201760

URL: http://svn.apache.org/viewcvs?rev=201760&view=rev
Log:
Avoid int overflow
bug 34601, from Martin Kompf

Modified:
    jakarta/commons/proper/io/branches/finder-reminder/java/org/apache/commons/io/find/FindingFilter.java

Modified: jakarta/commons/proper/io/branches/finder-reminder/java/org/apache/commons/io/find/FindingFilter.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/io/branches/finder-reminder/java/org/apache/commons/io/find/FindingFilter.java?rev=201760&r1=201759&r2=201760&view=diff
==============================================================================
--- jakarta/commons/proper/io/branches/finder-reminder/java/org/apache/commons/io/find/FindingFilter.java
(original)
+++ jakarta/commons/proper/io/branches/finder-reminder/java/org/apache/commons/io/find/FindingFilter.java
Sat Jun 25 08:55:43 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Copyright 2001-2005 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.
@@ -35,6 +35,7 @@
  * this class.
  * 
  * @author Henri Yandell
+ * @author Martin Kompf
  * @version $Id$
  * @since 1.1
  */
@@ -174,7 +175,8 @@
         }
         public boolean accept(File file) {
             boolean daystart = this.parent.isDaystartConfigured();
-            return FindingFilter.invert( this.invert,  file.lastModified() > System.currentTimeMillis()
- this.argument * 60000 );
+            return FindingFilter.invert( this.invert,
+                    file.lastModified() > System.currentTimeMillis() - this.argument *
60000L );
         }
     }
 
@@ -212,7 +214,8 @@
         }
         public boolean accept(File file) {
             boolean daystart = this.parent.isDaystartConfigured();
-            return FindingFilter.invert( this.invert,  file.lastModified() > System.currentTimeMillis()
- this.argument * 60000*60*24 );
+            return FindingFilter.invert( this.invert,
+                    file.lastModified() > System.currentTimeMillis() - this.argument *
60000L * 60L * 24L );
         }
     }
 



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


Mime
View raw message