aboutsummaryrefslogtreecommitdiffstats
path: root/testing/src
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2021-05-14 08:16:29 -0700
committerAndy Clement <aclement@pivotal.io>2021-05-14 08:16:29 -0700
commitab208cde4276e58334f92f7607b31e77dde8a52d (patch)
tree2db1af39c3339ada13c058c9b85be061686f21ac /testing/src
parent1fc5195245883d306e2da3877b4fe4362ff0def9 (diff)
downloadaspectj-ab208cde4276e58334f92f7607b31e77dde8a52d.tar.gz
aspectj-ab208cde4276e58334f92f7607b31e77dde8a52d.zip
Remove jdiff
Diffstat (limited to 'testing/src')
-rw-r--r--testing/src/test/java/org/aspectj/testing/harness/bridge/DirChanges.java146
1 files changed, 0 insertions, 146 deletions
diff --git a/testing/src/test/java/org/aspectj/testing/harness/bridge/DirChanges.java b/testing/src/test/java/org/aspectj/testing/harness/bridge/DirChanges.java
index c19618a3d..603373381 100644
--- a/testing/src/test/java/org/aspectj/testing/harness/bridge/DirChanges.java
+++ b/testing/src/test/java/org/aspectj/testing/harness/bridge/DirChanges.java
@@ -294,152 +294,6 @@ public class DirChanges {
*/
boolean checkFile(IMessageHandler handler, String path, File actualFile);
}
-// File-comparison code with a bit more generality -- too unweildy
-// /**
-// * Default FileChecker compares files literally, transforming any
-// * with registered normalizers.
-// */
-// public static class FileChecker implements IFileChecker {
-// final File baseExpectedDir;
-// NormalizedCompareFiles fileComparer;
-//
-// public FileChecker(File baseExpectedDir) {
-// this.baseExpectedDir = baseExpectedDir;
-// fileComparer = new NormalizedCompareFiles();
-// }
-// public boolean checkFile(IMessageHandler handler, String path, File actualFile) {
-// if (null == baseExpectedDir) {
-// MessageUtil.error(handler, "null baseExpectedDir set on construction");
-// } else if (!baseExpectedDir.canRead() || !baseExpectedDir.isDirectory()) {
-// MessageUtil.error(handler, "bad baseExpectedDir: " + baseExpectedDir);
-// } else {
-// File expectedFile = new File(baseExpectedDir, path);
-// if (!expectedFile.canRead()) {
-// MessageUtil.fail(handler, "cannot read expected file: " + expectedFile);
-// } else {
-// return doCheckFile(handler, expectedFile, actualFile, path);
-// }
-// }
-// return false;
-// }
-//
-// protected boolean doCheckFile(
-// IMessageHandler handler,
-// File expectedFile,
-// File actualFile,
-// String path) {
-// fileComparer.setHandler(handler);
-// FileLine[] expected = fileComparer.diff();
-// return false;
-// }
-// }
-
-// /**
-// * CompareFiles implementation that pre-processes input
-// * to normalize it. Currently it reads all files except
-// * .class files, which it disassembles first.
-// */
-// public static class NormalizedCompareFiles extends CompareFiles {
-// private final static String[] NO_PATHS = new String[0];
-// private static String normalPath(File file) { // XXX util
-// if (null == file) {
-// return "";
-// }
-// return file.getAbsolutePath().replace('\\', '/');
-// }
-//
-// private String[] baseDirs;
-// private IMessageHandler handler;
-//
-// public NormalizedCompareFiles() {
-// }
-//
-// void init(IMessageHandler handler, File[] baseDirs) {
-// this.handler = handler;
-// if (null == baseDirs) {
-// this.baseDirs = NO_PATHS;
-// } else {
-// this.baseDirs = new String[baseDirs.length];
-// for (int i = 0; i < baseDirs.length; i++) {
-// this.baseDirs[i] = normalPath(baseDirs[i]) + "/";
-// }
-// }
-// }
-//
-// private String getClassName(File file) {
-// String result = null;
-// String path = normalPath(file);
-// if (!path.endsWith(".class")) {
-// MessageUtil.error(handler,
-// "NormalizedCompareFiles expected "
-// + file
-// + " to end with .class");
-// } else {
-// path = path.substring(0, path.length()-6);
-// for (int i = 0; i < baseDirs.length; i++) {
-// if (path.startsWith(baseDirs[i])) {
-// return path.substring(baseDirs[i].length()).replace('/', '.');
-// }
-// }
-// MessageUtil.error(handler,
-// "NormalizedCompareFiles expected "
-// + file
-// + " to start with one of "
-// + LangUtil.arrayAsList(baseDirs));
-// }
-//
-// return result;
-// }
-//
-// /**
-// * Read file as normalized lines, sending handler any messages
-// * ERROR for input failures and FAIL for processing failures.
-// * @return NOLINES on error or normalized lines from file otherwise
-// */
-// public FileLine[] getFileLines(File file) {
-// FileLineator capture = new FileLineator();
-// InputStream in = null;
-// try {
-// if (!file.getPath().endsWith(".class")) {
-// in = new FileInputStream(file);
-// FileUtil.copyStream(
-// new BufferedReader(new InputStreamReader(in)),
-// new PrintWriter(capture));
-// } else {
-// String name = getClassName(file);
-// if (null == name) {
-// return new FileLine[0];
-// }
-// String path = normalPath(file);
-// path = path.substring(0, path.length()-name.length());
-// // XXX sole dependency on bcweaver/bcel
-// LazyClassGen.disassemble(path, name, capture);
-// }
-// } catch (IOException e) {
-// MessageUtil.fail(handler,
-// "NormalizedCompareFiles IOException reading " + file, e);
-// return null;
-// } finally {
-// if (null != in) {
-// try { in.close(); }
-// catch (IOException e) {} // ignore
-// }
-// capture.flush();
-// capture.close();
-// }
-// String missed = capture.getMissed();
-// if (!LangUtil.isEmpty(missed)) {
-// MessageUtil.fail(handler,
-// "NormalizedCompareFiles missed input: "
-// + missed);
-// return null;
-// } else {
-// return capture.getFileLines();
-// }
-// }
-//
-//
-// }
/**
* Specification for a set of File added, removed, or updated