protected int resourceCompare(Resource foo, Resource bar) { return (int) (foo.getLastModified() - bar.getLastModified()); } When difference foo.getLastModified() - bar.getLastModified() is greater than Integer.MAX_VALUE or less than Integer.MIN_VALUE, result returned by resourceCompare is undefined. Possible fix is: protected int resourceCompare(Resource foo, Resource bar) { long diff = foo.getLastModified() - bar.getLastModified(); if (diff > 0) { return +1; } else if (diff < 0) { return -1; } else { return 0; } }
Thanks fixed in head.
*** Bug 42774 has been marked as a duplicate of this bug. ***
*** Bug 44565 has been marked as a duplicate of this bug. ***