summaryrefslogtreecommitdiff
path: root/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java
diff options
context:
space:
mode:
authorJacobus Martinus Kruithof <jkf@apache.org>2005-01-06 12:05:10 +0000
committerJacobus Martinus Kruithof <jkf@apache.org>2005-01-06 12:05:10 +0000
commit257dadeaf0fb8588b80fa71b24ee3aca38ea19b7 (patch)
treeb22f64f7c84e0f85c726e74acb1d6f80e31d3bd4 /src/main/org/apache/tools/ant/taskdefs/optional/Cab.java
parent2d15e8d8b3af5f74bf06989fe1c5cce6e07e3471 (diff)
downloadant-257dadeaf0fb8588b80fa71b24ee3aca38ea19b7.tar.gz
Make use of FileUtils in a uniform way via the getFileUtils method and a static final reference in the using files.
Also removed unused/* imports along the way. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277295 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/main/org/apache/tools/ant/taskdefs/optional/Cab.java')
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/Cab.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java b/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java
index f088cc620..ab00d4f81 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2004 The Apache Software Foundation
+ * Copyright 2000-2005 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -53,7 +53,7 @@ public class Cab extends MatchingTask {
protected String archiveType = "cab";
- private FileUtils fileUtils = FileUtils.newFileUtils();
+ private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
/**
* The name/location of where to create the .cab file.
@@ -138,7 +138,7 @@ public class Cab extends MatchingTask {
boolean upToDate = true;
for (int i = 0; i < files.size() && upToDate; i++) {
String file = files.elementAt(i).toString();
- if (fileUtils.resolveFile(baseDir, file).lastModified()
+ if (FILE_UTILS.resolveFile(baseDir, file).lastModified()
> cabFile.lastModified()) {
upToDate = false;
}
@@ -152,7 +152,7 @@ public class Cab extends MatchingTask {
*/
protected File createListFile(Vector files)
throws IOException {
- File listFile = fileUtils.createTempFile("ant", "", null);
+ File listFile = FILE_UTILS.createTempFile("ant", "", null);
listFile.deleteOnExit();
PrintWriter writer = new PrintWriter(new FileOutputStream(listFile));
@@ -283,7 +283,7 @@ public class Cab extends MatchingTask {
exec.setDir(baseDir);
if (!doVerbose) {
- outFile = fileUtils.createTempFile("ant", "", null);
+ outFile = FILE_UTILS.createTempFile("ant", "", null);
outFile.deleteOnExit();
exec.setOutput(outFile);
}