diff options
author | acolyer <acolyer> | 2004-01-23 12:18:10 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2004-01-23 12:18:10 +0000 |
commit | 42787f91e7e3f2fc09246dbcda7031abde9e428d (patch) | |
tree | 09eac65f3de8e46da5ff479451589dd41beb7b3a /util | |
parent | 14908174fcb2a52819e8c022424938ff9f2c9876 (diff) | |
download | aspectj-42787f91e7e3f2fc09246dbcda7031abde9e428d.tar.gz aspectj-42787f91e7e3f2fc09246dbcda7031abde9e428d.zip |
spring cleaning in advance of 1.2 enhancements:
removed unused imports, local variables, and private methods
(still there, just commented out).
Diffstat (limited to 'util')
-rw-r--r-- | util/src/org/aspectj/util/FileUtil.java | 28 | ||||
-rw-r--r-- | util/src/org/aspectj/util/LangUtil.java | 6 | ||||
-rw-r--r-- | util/src/org/aspectj/util/Reflection.java | 2 | ||||
-rw-r--r-- | util/testsrc/org/aspectj/util/FileUtilTest.java | 2 |
4 files changed, 19 insertions, 19 deletions
diff --git a/util/src/org/aspectj/util/FileUtil.java b/util/src/org/aspectj/util/FileUtil.java index b8b16c07c..c7663ae63 100644 --- a/util/src/org/aspectj/util/FileUtil.java +++ b/util/src/org/aspectj/util/FileUtil.java @@ -411,7 +411,7 @@ public class FileUtil { file.delete(); } } else { - boolean ret = file.delete(); + /*boolean ret = */file.delete(); result++; } } @@ -704,7 +704,7 @@ public class FileUtil { } copyValidFiles(fromFile, toFile); // file-file } else { // target file is a non-existent path -- could be file or dir - File toFileParent = ensureParentWritable(toFile); + /*File toFileParent = */ensureParentWritable(toFile); if (fromFile.isFile()) { copyValidFiles(fromFile, toFile); } else if (fromFile.isDirectory()) { @@ -1212,18 +1212,18 @@ public class FileUtil { return LangUtil.sleepUntil(++delayUntil); } - /** map name to result, removing any fromSuffix and adding any toSuffix */ - private static String map(String name, String fromSuffix, String toSuffix) { - if (null != name) { - if (null != fromSuffix) { - name = name.substring(0, name.length()-fromSuffix.length()); - } - if (null != toSuffix) { - name = name + toSuffix; - } - } - return name; - } +// /** map name to result, removing any fromSuffix and adding any toSuffix */ +// private static String map(String name, String fromSuffix, String toSuffix) { +// if (null != name) { +// if (null != fromSuffix) { +// name = name.substring(0, name.length()-fromSuffix.length()); +// } +// if (null != toSuffix) { +// name = name + toSuffix; +// } +// } +// return name; +// } private static void listFiles(final File baseDir, ArrayList result, FileFilter filter) { File[] files = baseDir.listFiles(); diff --git a/util/src/org/aspectj/util/LangUtil.java b/util/src/org/aspectj/util/LangUtil.java index 28fb36021..0893ca747 100644 --- a/util/src/org/aspectj/util/LangUtil.java +++ b/util/src/org/aspectj/util/LangUtil.java @@ -14,7 +14,7 @@ package org.aspectj.util; -import java.awt.event.InvocationEvent; +//import java.awt.event.InvocationEvent; import java.io.*; import java.io.File; import java.io.IOException; @@ -1052,11 +1052,11 @@ public class LangUtil { } else if (time < 0) { throw new IllegalArgumentException("negative: " + time); } - final Thread thread = Thread.currentThread(); +// final Thread thread = Thread.currentThread(); long curTime = System.currentTimeMillis(); for (int i = 0; (i < 100) && (curTime < time); i++) { try { - thread.sleep(time-curTime); + Thread.sleep(time-curTime); } catch (InterruptedException e) { // ignore } diff --git a/util/src/org/aspectj/util/Reflection.java b/util/src/org/aspectj/util/Reflection.java index 6804afaa6..10bcc1583 100644 --- a/util/src/org/aspectj/util/Reflection.java +++ b/util/src/org/aspectj/util/Reflection.java @@ -18,7 +18,7 @@ import java.lang.reflect.*; import java.lang.reflect.Method; import java.net.URL; import java.util.ArrayList; -import java.util.StringTokenizer; +//import java.util.StringTokenizer; public class Reflection { public static final Class[] MAIN_PARM_TYPES = new Class[] {String[].class}; diff --git a/util/testsrc/org/aspectj/util/FileUtilTest.java b/util/testsrc/org/aspectj/util/FileUtilTest.java index cb8fc79be..b39c092de 100644 --- a/util/testsrc/org/aspectj/util/FileUtilTest.java +++ b/util/testsrc/org/aspectj/util/FileUtilTest.java @@ -13,7 +13,7 @@ package org.aspectj.util; -import java.io.ByteArrayInputStream; +//import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FilenameFilter; |