Browse Source

Shadowing

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277234 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 20 years ago
parent
commit
c4e4dd9bb1
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/Touch.java

+ 3
- 3
src/main/org/apache/tools/ant/taskdefs/Touch.java View File

@@ -316,13 +316,13 @@ public class Touch extends Task {
} }


private void touch(File fromDir, String filename, long defaultTimestamp) { private void touch(File fromDir, String filename, long defaultTimestamp) {
File file = fileUtils.resolveFile(fromDir, filename);
File f = fileUtils.resolveFile(fromDir, filename);
if (fileNameMapper == null) { if (fileNameMapper == null) {
touch(file, defaultTimestamp);
touch(f, defaultTimestamp);
} else { } else {
String[] mapped = fileNameMapper.mapFileName(filename); String[] mapped = fileNameMapper.mapFileName(filename);
if (mapped != null && mapped.length > 0) { if (mapped != null && mapped.length > 0) {
long modTime = (file.exists()) ? file.lastModified() : defaultTimestamp;
long modTime = (f.exists()) ? f.lastModified() : defaultTimestamp;
for (int i = 0; i < mapped.length ; i++) { for (int i = 0; i < mapped.length ; i++) {
touch(getProject().resolveFile(mapped[i]), modTime); touch(getProject().resolveFile(mapped[i]), modTime);
} }


Loading…
Cancel
Save