[rules-dev] windows bug for kagent

Mark Proctor mproctor at codehaus.org
Tue Jul 27 23:22:04 EDT 2010


  I was just looking into why the kagent stuff fails on my windows, 
found a bug in Windows:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4243868

So the cause was a single attempt to setLastModified on a file, without 
checking if it was sucessful. So instead I recommend the following when 
dealing with files:
         int count = 0;
         while ( !f.setLastModified(t) && count < 10 ) {
             count++;
             System.gc();
             Thread.sleep( 100 );
         }

If the setLastModified still returns false then throw an exception.

Mark



More information about the rules-dev mailing list