*/
private static String[] readArgs(File argFile) {
ArrayList args = new ArrayList();
- int lineNum = 0;
+// int lineNum = 0;
try {
BufferedReader stream =
* 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)) {
= 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;
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.
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;
}
// 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);
file.delete();
}
} else {
- boolean ret = file.delete();
+ /*boolean ret = */file.delete();
result++;
}
}
}
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()) {
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();
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;
} 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
}
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};
package org.aspectj.util;
-import java.io.ByteArrayInputStream;
+//import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FilenameFilter;