summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoracolyer <acolyer>2004-01-23 12:18:10 +0000
committeracolyer <acolyer>2004-01-23 12:18:10 +0000
commit42787f91e7e3f2fc09246dbcda7031abde9e428d (patch)
tree09eac65f3de8e46da5ff479451589dd41beb7b3a
parent14908174fcb2a52819e8c022424938ff9f2c9876 (diff)
downloadaspectj-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).
-rw-r--r--testing-drivers/src/org/aspectj/testing/drivers/Harness.java14
-rw-r--r--testing-drivers/testsrc/org/aspectj/testing/drivers/AjctestsAdapter.java4
-rw-r--r--testing-drivers/testsrc/org/aspectj/testing/drivers/HarnessJUnitUtil.java2
-rw-r--r--testing-util/src/org/aspectj/testing/util/TestUtil.java2
-rw-r--r--util/src/org/aspectj/util/FileUtil.java28
-rw-r--r--util/src/org/aspectj/util/LangUtil.java6
-rw-r--r--util/src/org/aspectj/util/Reflection.java2
-rw-r--r--util/testsrc/org/aspectj/util/FileUtilTest.java2
8 files changed, 30 insertions, 30 deletions
diff --git a/testing-drivers/src/org/aspectj/testing/drivers/Harness.java b/testing-drivers/src/org/aspectj/testing/drivers/Harness.java
index 94921da32..20421fe80 100644
--- a/testing-drivers/src/org/aspectj/testing/drivers/Harness.java
+++ b/testing-drivers/src/org/aspectj/testing/drivers/Harness.java
@@ -144,7 +144,7 @@ public class Harness {
*/
private static String[] readArgs(File argFile) {
ArrayList args = new ArrayList();
- int lineNum = 0;
+// int lineNum = 0;
try {
BufferedReader stream =
@@ -447,7 +447,7 @@ public class Harness {
* Subclasses override this to implement new options.
*/
protected boolean acceptOption(String option) {
- boolean result = false;
+// boolean result = false;
if (LangUtil.isEmpty(option)) {
return true; // skip bad input
} else if ("-verboseHarness".equals(option)) {
@@ -712,11 +712,11 @@ class FeatureHarness extends Harness {
= RunUtils.VERBOSE_PRINTER;
final RunUtils.IRunStatusPrinter terse
= RunUtils.TERSE_PRINTER;
- final boolean LOGPASS = true;
- final boolean LOGFAIL = true;
- final boolean SKIPPASS = false;
- final boolean SKIPFAIL = false;
- final boolean LOGSTREAMS = true;
+// final boolean LOGPASS = true;
+// final boolean LOGFAIL = true;
+// final boolean SKIPPASS = false;
+// final boolean SKIPFAIL = false;
+// final boolean LOGSTREAMS = true;
final boolean SKIPSTREAMS = false;
Feature feature = null;
diff --git a/testing-drivers/testsrc/org/aspectj/testing/drivers/AjctestsAdapter.java b/testing-drivers/testsrc/org/aspectj/testing/drivers/AjctestsAdapter.java
index da0c42fb8..fb221a246 100644
--- a/testing-drivers/testsrc/org/aspectj/testing/drivers/AjctestsAdapter.java
+++ b/testing-drivers/testsrc/org/aspectj/testing/drivers/AjctestsAdapter.java
@@ -20,8 +20,8 @@ import junit.framework.*;
import org.aspectj.bridge.*;
import org.aspectj.testing.harness.bridge.*;
import org.aspectj.testing.run.*;
-import org.aspectj.testing.util.RunUtils;
-import org.aspectj.testing.xml.AjcSpecXmlReader;
+//import org.aspectj.testing.util.RunUtils;
+//import org.aspectj.testing.xml.AjcSpecXmlReader;
/*
* Adapt Harness tests to JUnit driver.
diff --git a/testing-drivers/testsrc/org/aspectj/testing/drivers/HarnessJUnitUtil.java b/testing-drivers/testsrc/org/aspectj/testing/drivers/HarnessJUnitUtil.java
index 77c38c35d..287ea53d9 100644
--- a/testing-drivers/testsrc/org/aspectj/testing/drivers/HarnessJUnitUtil.java
+++ b/testing-drivers/testsrc/org/aspectj/testing/drivers/HarnessJUnitUtil.java
@@ -18,7 +18,7 @@ import java.util.*;
import junit.framework.*;
import org.aspectj.bridge.*;
-import org.aspectj.bridge.MessageHandler;
+//import org.aspectj.bridge.MessageHandler;
import org.aspectj.testing.harness.bridge.*;
import org.aspectj.testing.run.IRunStatus;
import org.aspectj.testing.util.RunUtils;
diff --git a/testing-util/src/org/aspectj/testing/util/TestUtil.java b/testing-util/src/org/aspectj/testing/util/TestUtil.java
index 553684eb3..055442754 100644
--- a/testing-util/src/org/aspectj/testing/util/TestUtil.java
+++ b/testing-util/src/org/aspectj/testing/util/TestUtil.java
@@ -430,7 +430,7 @@ public final class TestUtil {
}
// capture file as FileLine[]
InputStream in = null;
- String path = FileUtil.normalizedPath(file, basedir);
+ /*String path = */FileUtil.normalizedPath(file, basedir);
LineStream capture = new LineStream();
try {
lineate(capture, handler, basedir, file);
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;