It appears that the "modified in the future" check
performed by SourceFileScanner doesn't work properly
on Windoze. On digging around, I found out that
Windoze stores modification times with a maximum
resolution of 2 secs - and rounds *up* to the nearest
match.
This means that SourceFileScanner is constantly
reporting just-built files as being modified in the
future - harmless, but annoying. (Not to mention it
will make you ignore the warning just when you need to
see it...)
Attached is a patch to fix this that simply revises
the definition of "now" to match Windoze modification
times.
roger
__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/
*** SourceFileScanner.java Tue Nov 28 09:15:02 2000
--- SourceFileScannerNew.java Mon Nov 27 16:45:44 2000
***************
*** 98,103 ****
--- 98,113 ----
long now = (new java.util.Date()).getTime();
StringBuffer targetList = new StringBuffer();
+ /*
+ If we're on Windows, we have to munge the time up to 2 secs to
+ be able to check file modification times.
+ (Windows has a max resolution of two secs for modification times)
+ */
+ String osname = System.getProperty("os.name").toLowerCase();
+ if ( osname.indexOf("windows") >= 0 ) {
+ now += 2000;
+ }
+
Vector v = new Vector();
for (int i=0; i< files.length; i++) {