Browse Source

remove unnecessary java.util.Date instantiation

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@278503 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 20 years ago
parent
commit
f59eb74bbf
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      src/main/org/apache/tools/ant/util/ResourceUtils.java

+ 2
- 3
src/main/org/apache/tools/ant/util/ResourceUtils.java View File

@@ -79,14 +79,13 @@ public class ResourceUtils {
FileNameMapper mapper, FileNameMapper mapper,
ResourceFactory targets, ResourceFactory targets,
long granularity) { long granularity) {
long now = (new java.util.Date()).getTime() + granularity;
long now = System.currentTimeMillis() + granularity;


Vector vresult = new Vector(); Vector vresult = new Vector();
for (int counter = 0; counter < source.length; counter++) { for (int counter = 0; counter < source.length; counter++) {
if (source[counter].getLastModified() > now) { if (source[counter].getLastModified() > now) {
logTo.log("Warning: " + source[counter].getName() logTo.log("Warning: " + source[counter].getName()
+ " modified in the future.",
Project.MSG_WARN);
+ " modified in the future.", Project.MSG_WARN);
} }
String[] targetnames = String[] targetnames =
mapper.mapFileName(source[counter].getName() mapper.mapFileName(source[counter].getName()


Loading…
Cancel
Save