Cedomir Igaly git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@500620 13f79535-47bb-0310-9956-ffa450edef68master
@@ -29,6 +29,7 @@ Brant Langer Gurganus | |||||
Brian Deitte | Brian Deitte | ||||
Brian Felder | Brian Felder | ||||
Bruce Atherton | Bruce Atherton | ||||
Cedomir Igaly | |||||
Charles Hudak | Charles Hudak | ||||
Charlie Hubbard | Charlie Hubbard | ||||
Chris Povirk | Chris Povirk | ||||
@@ -6,6 +6,8 @@ Changes that could break older environments: | |||||
Fixed bugs: | Fixed bugs: | ||||
----------- | ----------- | ||||
* Bug in org.apache.tools.ant.types.resources.comparators.Date | |||||
Bugzilla report 41411 | |||||
* <junit> in Ant 1.7.0 could throw NPE if no <classpath> was defined. | * <junit> in Ant 1.7.0 could throw NPE if no <classpath> was defined. | ||||
Bugzilla report 41422. | Bugzilla report 41422. | ||||
@@ -32,7 +32,14 @@ public class Date extends ResourceComparator { | |||||
* argument is less than, equal to, or greater than the second. | * argument is less than, equal to, or greater than the second. | ||||
*/ | */ | ||||
protected int resourceCompare(Resource foo, Resource bar) { | protected int resourceCompare(Resource foo, Resource bar) { | ||||
return (int) (foo.getLastModified() - bar.getLastModified()); | |||||
long diff = foo.getLastModified() - bar.getLastModified(); | |||||
if (diff > 0) { | |||||
return +1; | |||||
} else if (diff < 0) { | |||||
return -1; | |||||
} else { | |||||
return 0; | |||||
} | |||||
} | } | ||||
} | } |