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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to