diff options
author | Lars Grefer <eclipse@larsgrefer.de> | 2020-08-17 01:19:52 +0200 |
---|---|---|
committer | Lars Grefer <eclipse@larsgrefer.de> | 2020-08-17 01:19:52 +0200 |
commit | 85ad27ee704fa8c17345bbe46c959a3e6ccbd179 (patch) | |
tree | 64db483a4fd9027cb3ba862e371427538631b5dc /testing | |
parent | c5be7f17349f1e7ea5d3da4be09b5f3e964de19b (diff) | |
download | aspectj-85ad27ee704fa8c17345bbe46c959a3e6ccbd179.tar.gz aspectj-85ad27ee704fa8c17345bbe46c959a3e6ccbd179.zip |
Remove unnecessary interface modifiers
Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
Diffstat (limited to 'testing')
9 files changed, 242 insertions, 242 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 5a3ad13ab..c19618a3d 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 @@ -1,14 +1,14 @@ /* ******************************************************************* - * Copyright (c) 1999-2001 Xerox Corporation, + * Copyright (c) 1999-2001 Xerox Corporation, * 2002 Palo Alto Research Center, Incorporated (PARC). - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Xerox/PARC initial implementation + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ package org.aspectj.testing.harness.bridge; @@ -40,7 +40,7 @@ import org.aspectj.util.LangUtil; * <ul> * <li>Set up with any expected changes and/or an expected directory</li> * <li>Set up with any file checker</li> - * <li>start(..) before changes. + * <li>start(..) before changes. * This issues messages for any removed files not found, * which represent an error in the expected changes.</li> * <li>Do whatever operations will change the directory</li> @@ -52,7 +52,7 @@ import org.aspectj.util.LangUtil; * When comparing directories, this ignores any paths containing "CVS". */ public class DirChanges { - + public static final String DELAY_NAME = "dir-changes.delay"; private static final long DELAY; static { @@ -71,22 +71,22 @@ public class DirChanges { private static final boolean EXISTS = true; final Spec spec; - + /** start time, in milliseconds - valid only from start(..)..end(..) */ long startTime; - + /** base directory of actual files - valid only from start(..)..end(..) */ File baseDir; - + /** if set, this is run against any resulting existing files * specified in added/updated lists. * This does not affect expected-directory comparison. */ IFileChecker fileChecker; - + /** handler valid from start..end of start(..) and end(..) methods */ IMessageHandler handler; - + /** * Constructor for DirChanges. */ @@ -109,23 +109,23 @@ public class DirChanges { this.baseDir = baseDir; startTime = 0l; final boolean doCompare = false; - boolean result - = exists("at start, did not expect added file to exist", !EXISTS, spec.added, doCompare); - result &= exists("at start, expected unchanged file to exist", EXISTS, spec.unchanged, doCompare); - result &= exists("at start, expected updated file to exist", EXISTS, spec.updated, doCompare); - result &= exists("at start, expected removed file to exist", EXISTS, spec.removed, doCompare); + boolean result + = exists("at start, did not expect added file to exist", !EXISTS, spec.added, doCompare); + result &= exists("at start, expected unchanged file to exist", EXISTS, spec.unchanged, doCompare); + result &= exists("at start, expected updated file to exist", EXISTS, spec.updated, doCompare); + result &= exists("at start, expected removed file to exist", EXISTS, spec.removed, doCompare); startTime = System.currentTimeMillis(); // ensure tests don't complete in < 1 second, otherwise can confuse fast machines. try { - Thread.sleep(1000); + Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } this.handler = oldHandler; - return result; + return result; } - + /** * Inspect the base dir, issue any messages for * files not added, files not updated, and files not removed, @@ -158,22 +158,22 @@ public class DirChanges { final boolean doCompare = (null != fileChecker); final boolean fastFail = spec.fastFail; boolean result - = exists("at end, expected file was not added", EXISTS, spec.added, doCompare); + = exists("at end, expected file was not added", EXISTS, spec.added, doCompare); if (result || !fastFail) { - result &= exists("at end, expected file was not unchanged", EXISTS, spec.unchanged, doCompare, false); + result &= exists("at end, expected file was not unchanged", EXISTS, spec.unchanged, doCompare, false); } if (result || !fastFail) { - result &= exists("at end, expected file was not updated", EXISTS, spec.updated, doCompare); + result &= exists("at end, expected file was not updated", EXISTS, spec.updated, doCompare); } if (result || !fastFail) { - result &= exists("at end, file exists, was not removed", !EXISTS, spec.removed, doCompare); + result &= exists("at end, file exists, was not removed", !EXISTS, spec.removed, doCompare); } // if (result || !fastFail) { // // XXX validate that unchanged mod-time did not change // } // variant 1: compare expected directory if (result || !fastFail) { - result &= compareDir(srcBaseDir); + result &= compareDir(srcBaseDir); } return result; } finally { @@ -197,7 +197,7 @@ public class DirChanges { } File expDir = new File(srcBaseDir, spec.expDir); File actDir = baseDir; - //System.err.println("XXX comparing actDir=" + actDir + " expDir=" + expDir); + //System.err.println("XXX comparing actDir=" + actDir + " expDir=" + expDir); return TestUtil.sameDirectoryContents(handler, expDir, actDir, spec.fastFail); } @@ -206,7 +206,7 @@ public class DirChanges { protected void setFileComparer(IFileChecker comp) { this.fileChecker = comp; } - + /** @@ -224,7 +224,7 @@ public class DirChanges { List pathList, boolean doCompare) { // boolean expectStartEarlier = true; - return exists(label, exists, pathList,doCompare, true); + return exists(label, exists, pathList,doCompare, true); } protected boolean exists( String label, @@ -235,7 +235,7 @@ public class DirChanges { boolean result = true; if (!LangUtil.isEmpty(pathList)) { // final File expDir = ((!doCompare || (null == spec.expDir)) -// ? null +// ? null // : new File(baseDir, spec.expDir)); for (Object o : pathList) { final String entry = (String) o; @@ -269,21 +269,21 @@ public class DirChanges { /** * Generate fail message "{un}expected {label} file {path} in {baseDir}". * @param handler the IMessageHandler sink - * @param label String message infix + * @param label String message infix * @param path the path to the file */ protected void failMessage( IMessageHandler handler, boolean exists, String label, - String path, + String path, File file) { - MessageUtil.fail(handler, label + " \"" + path + "\" in " + baseDir); + MessageUtil.fail(handler, label + " \"" + path + "\" in " + baseDir); } /** Check actual File found at a path, usually to diff expected/actual contents */ - public static interface IFileChecker { - /** + public interface IFileChecker { + /** * Check file found at path. * Implementations should return false when adding fail (or worse) * message to the handler, and true otherwise. @@ -293,10 +293,10 @@ public class DirChanges { * @return false if check failed and messages added to handler */ boolean checkFile(IMessageHandler handler, String path, File actualFile); - } -// File-comparison code with a bit more generality -- too unweildy + } +// File-comparison code with a bit more generality -- too unweildy // /** -// * Default FileChecker compares files literally, transforming any +// * Default FileChecker compares files literally, transforming any // * with registered normalizers. // */ // public static class FileChecker implements IFileChecker { @@ -304,7 +304,7 @@ public class DirChanges { // NormalizedCompareFiles fileComparer; // // public FileChecker(File baseExpectedDir) { -// this.baseExpectedDir = baseExpectedDir; +// this.baseExpectedDir = baseExpectedDir; // fileComparer = new NormalizedCompareFiles(); // } // public boolean checkFile(IMessageHandler handler, String path, File actualFile) { @@ -324,8 +324,8 @@ public class DirChanges { // } // // protected boolean doCheckFile( -// IMessageHandler handler, -// File expectedFile, +// IMessageHandler handler, +// File expectedFile, // File actualFile, // String path) { // fileComparer.setHandler(handler); @@ -333,9 +333,9 @@ public class DirChanges { // return false; // } // } - + // /** -// * CompareFiles implementation that pre-processes input +// * CompareFiles implementation that pre-processes input // * to normalize it. Currently it reads all files except // * .class files, which it disassembles first. // */ @@ -347,13 +347,13 @@ public class DirChanges { // } // return file.getAbsolutePath().replace('\\', '/'); // } -// +// // private String[] baseDirs; // private IMessageHandler handler; -// +// // public NormalizedCompareFiles() { // } -// +// // void init(IMessageHandler handler, File[] baseDirs) { // this.handler = handler; // if (null == baseDirs) { @@ -364,16 +364,16 @@ public class DirChanges { // 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 " +// MessageUtil.error(handler, +// "NormalizedCompareFiles expected " // + file -// + " to end with .class"); +// + " to end with .class"); // } else { // path = path.substring(0, path.length()-6); // for (int i = 0; i < baseDirs.length; i++) { @@ -381,29 +381,29 @@ public class DirChanges { // return path.substring(baseDirs[i].length()).replace('/', '.'); // } // } -// MessageUtil.error(handler, -// "NormalizedCompareFiles expected " +// MessageUtil.error(handler, +// "NormalizedCompareFiles expected " // + file -// + " to start with one of " +// + " 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 +// * @return NOLINES on error or normalized lines from file otherwise // */ // public FileLine[] getFileLines(File file) { // FileLineator capture = new FileLineator(); // InputStream in = null; -// try { +// try { // if (!file.getPath().endsWith(".class")) { // in = new FileInputStream(file); // FileUtil.copyStream( -// new BufferedReader(new InputStreamReader(in)), +// new BufferedReader(new InputStreamReader(in)), // new PrintWriter(capture)); // } else { // String name = getClassName(file); @@ -416,7 +416,7 @@ public class DirChanges { // LazyClassGen.disassemble(path, name, capture); // } // } catch (IOException e) { -// MessageUtil.fail(handler, +// MessageUtil.fail(handler, // "NormalizedCompareFiles IOException reading " + file, e); // return null; // } finally { @@ -429,44 +429,44 @@ public class DirChanges { // } // String missed = capture.getMissed(); // if (!LangUtil.isEmpty(missed)) { -// MessageUtil.fail(handler, -// "NormalizedCompareFiles missed input: " +// MessageUtil.fail(handler, +// "NormalizedCompareFiles missed input: " // + missed); // return null; // } else { // return capture.getFileLines(); -// } -// } -// -// -// } - +// } +// } +// +// +// } + /** * Specification for a set of File added, removed, or updated - * in a given directory, or for a directory base for a tree of expected files. + * in a given directory, or for a directory base for a tree of expected files. * If defaultSuffix is specified, entries may be added without it. * Currently the directory tree - * only is used to verify files that are expected - * and found after the process completes. + * only is used to verify files that are expected + * and found after the process completes. */ public static class Spec implements IXmlWritable { /** XML element name */ public static final String XMLNAME = "dir-changes"; - + /** a symbolic name for the base directory */ String dirToken; // XXX default to class? - - /** if set, then append to specified paths when seeking files */ + + /** if set, then append to specified paths when seeking files */ String defaultSuffix; - - /** relative path of dir with expected files for comparison */ + + /** relative path of dir with expected files for comparison */ String expDir; - + long delayInMilliseconds = DELAY; - + /** if true, fail on first mis-match */ boolean fastFail; - + /** relative paths (String) of expected files added */ final List<String> added; @@ -476,26 +476,26 @@ public class DirChanges { /** relative paths (String) of expected files updated/changed */ final List<String> updated; - /** relative paths (String) of expected files NOT - * added, removed, or changed + /** relative paths (String) of expected files NOT + * added, removed, or changed * XXX unchanged unimplemented */ final List<String> unchanged; - + public Spec() { added = new ArrayList<>(); removed = new ArrayList<>(); updated = new ArrayList<>(); unchanged = new ArrayList<>(); } - + /** * @param dirToken the symbol name of the base directory (classes, run) */ public void setDirToken(String dirToken) { this.dirToken = dirToken; } - + /** * Set the directory containing the expected files. * @param expectedDirRelativePath path relative to the test base @@ -504,7 +504,7 @@ public class DirChanges { public void setExpDir(String expectedDirRelativePath) { expDir = expectedDirRelativePath; } - + public void setDelay(String delay) { if (null != delay) { // let NumberFormatException propogate up @@ -514,43 +514,43 @@ public class DirChanges { } } } - + /** * @param clipSuffix the String suffix, if any, to clip automatically */ public void setDefaultSuffix(String defaultSuffix) { this.defaultSuffix = defaultSuffix; } - + public void setAdded(String items) { XMLWriter.addFlattenedItems(added, items); } - + public void setRemoved(String items) { XMLWriter.addFlattenedItems(removed, items); } - + public void setUpdated(String items) { XMLWriter.addFlattenedItems(updated, items); } - + public void setUnchanged(String items) { XMLWriter.addFlattenedItems(unchanged, items); } public void setFastfail(boolean fastFail) { this.fastFail = fastFail; } - + /** @return true if some list was specified */ private boolean hasFileList() { - return (!LangUtil.isEmpty(added) + return (!LangUtil.isEmpty(added) || !LangUtil.isEmpty(removed) || !LangUtil.isEmpty(updated) || !LangUtil.isEmpty(unchanged) ); } - - /** + + /** * Emit specification in XML form if not empty. * This writes nothing if there is no expected dir * and there are no added, removed, or changed. @@ -588,7 +588,7 @@ public class DirChanges { } out.endElement(XMLNAME); } - + /** * Write list as elements to XMLWriter. * @param out XMLWriter output sink @@ -604,7 +604,7 @@ public class DirChanges { continue; } spec.writeXml(out); - } + } } } // class Spec diff --git a/testing/src/test/java/org/aspectj/testing/harness/bridge/IAjcRun.java b/testing/src/test/java/org/aspectj/testing/harness/bridge/IAjcRun.java index e685df5dd..a7a44a75c 100644 --- a/testing/src/test/java/org/aspectj/testing/harness/bridge/IAjcRun.java +++ b/testing/src/test/java/org/aspectj/testing/harness/bridge/IAjcRun.java @@ -1,13 +1,13 @@ /* ******************************************************************* * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Xerox/PARC initial implementation + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ package org.aspectj.testing.harness.bridge; @@ -21,9 +21,9 @@ import org.aspectj.testing.xml.XMLWriter; public interface IAjcRun extends IRun { boolean setupAjcRun(Sandbox sandbox, Validator validator); // XXX add for result eval? ArrayList getExpectedMessages(); - + /** this IAjcRun does nothing, returning true always */ - public static final IAjcRun NULLRUN = new IAjcRun() { + IAjcRun NULLRUN = new IAjcRun() { public boolean setupAjcRun(Sandbox sandbox, Validator validator) { return true; } @@ -40,5 +40,5 @@ public interface IAjcRun extends IRun { } public String toString() { return "IAjcRun.NULLRUN"; } }; - + } diff --git a/testing/src/test/java/org/aspectj/testing/run/IRun.java b/testing/src/test/java/org/aspectj/testing/run/IRun.java index 57639016b..e09fcbb9d 100644 --- a/testing/src/test/java/org/aspectj/testing/run/IRun.java +++ b/testing/src/test/java/org/aspectj/testing/run/IRun.java @@ -1,14 +1,14 @@ /* ******************************************************************* - * Copyright (c) 1999-2001 Xerox Corporation, + * Copyright (c) 1999-2001 Xerox Corporation, * 2002 Palo Alto Research Center, Incorporated (PARC). - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Xerox/PARC initial implementation + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ @@ -19,12 +19,12 @@ package org.aspectj.testing.run; * @author isberg */ public interface IRun { - public static final IRun[] RA_IRun = new IRun[0]; + IRun[] RA_IRun = new IRun[0]; /** Positive wrapper for the status parameter */ - public static final IRun OK + IRun OK = new IRun() { - /** This returns false when the status is null + /** This returns false when the status is null * or runResult is false */ public boolean run(IRunStatus status) { return ((null != status) && status.runResult()); @@ -33,7 +33,7 @@ public interface IRun { }; /** Negative wrapper for the status parameter */ - public static final IRun NOTOK + IRun NOTOK = new IRun() { public boolean run(IRunStatus status) { return ((null == status) || !status.runResult()); @@ -50,11 +50,11 @@ public interface IRun { * callees ensure starting, and responsible * callers ensure completed after the call. * Anyone setting completion should ensure it - * is set recursively for all children, + * is set recursively for all children, * and anyone starting child runs should * ensure children are registered and initialized * appropriately. - * @param status the IRunStatus representing the + * @param status the IRunStatus representing the * outcome of the process (collecting parameter). * @see Runners */ diff --git a/testing/src/test/java/org/aspectj/testing/run/IRunStatus.java b/testing/src/test/java/org/aspectj/testing/run/IRunStatus.java index 9c8665728..652c1a802 100644 --- a/testing/src/test/java/org/aspectj/testing/run/IRunStatus.java +++ b/testing/src/test/java/org/aspectj/testing/run/IRunStatus.java @@ -1,14 +1,14 @@ /* ******************************************************************* - * Copyright (c) 1999-2001 Xerox Corporation, + * Copyright (c) 1999-2001 Xerox Corporation, * 2002 Palo Alto Research Center, Incorporated (PARC). - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Xerox/PARC initial implementation + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ @@ -21,30 +21,30 @@ import org.aspectj.bridge.MessageUtil; /** * Encapsulate status and results for a run. * A run starts and then completes normally - * (finished(Object result)), + * (finished(Object result)), * abruptly (thrown(Throwable thrown)), * or by user request (abort(Object request)). * @author isberg */ public interface IRunStatus extends IMessageHolder { /** clients use this when signalling completion without a specific result */ - public static final Object VOID = Boolean.TRUE; + Object VOID = Boolean.TRUE; /** result object for successful (unset) boolean run result */ - public static final Boolean PASS = Boolean.TRUE; - + Boolean PASS = Boolean.TRUE; + /** result object for failed (unset) boolean run result */ - public static final Boolean FAIL = Boolean.FALSE; - + Boolean FAIL = Boolean.FALSE; + /** clients use this when signalling abort without any specific request */ - public static final Object ABORT = Boolean.FALSE; - + Object ABORT = Boolean.FALSE; + /** clients use this when signalling abort because no object to run */ - public static final Object ABORT_NORUN = MessageUtil.ABORT_NOTHING_TO_RUN; - + Object ABORT_NORUN = MessageUtil.ABORT_NOTHING_TO_RUN; + /** returned from getChildren when there are no children */ - public static final IRunStatus[] EMPTY_NEST = new IRunStatus[0]; - + IRunStatus[] EMPTY_NEST = new IRunStatus[0]; + //------------------- process controls /** * Set identifier associated with this run, if any @@ -57,19 +57,19 @@ public interface IRunStatus extends IMessageHolder { /** * Call before any start() or after isCompleted() would return true * to reset this to its pre-start state - * @throws IllegalStateException if start() has been called + * @throws IllegalStateException if start() has been called * and isCompleted() is not true. */ void reset(); - - /** + + /** * Call only once to signal this run has started. * @throws IllegalStateException if start() has been called */ void start(); - - /** - * Call this or thrown only once after start() + + /** + * Call this or thrown only once after start() * to signal this run has ended. * If this represents a void process, use VOID. * @param result the Object returned by this run. @@ -77,8 +77,8 @@ public interface IRunStatus extends IMessageHolder { * or if either completed(Object) or thrown(Throwable) have been called. */ void finish(Object result); - - /** + + /** * Call to signal this run is ending by request. * If there is no message, use ABORT. * @param request the Object request to abort, @@ -87,20 +87,20 @@ public interface IRunStatus extends IMessageHolder { * or if either completed(Object) or thrown(Throwable) have been called. */ void abort(Object request); - - /** - * Call this or completed only once after start() + + /** + * Call this or completed only once after start() * to signal this run has ended. * @throws IllegalStateException if start() was not called first * or if either completed(Object) or thrown(Throwable) have been called. */ void thrown(Throwable thrown); - - + + /** * Call this for the status to throw an unchecked exception * of the type that its controller understands. - * It is an error for a IRunStatus to continue normally + * It is an error for a IRunStatus to continue normally * after this is invoked. */ void completeAbruptly(); @@ -119,39 +119,39 @@ public interface IRunStatus extends IMessageHolder { * Pass null to get all kinds. * @param kind the IMessage.Kind expected, or null for all messages * @param orGreater if true, also get any greater than the target kind - * as determined by IMessage.Kind.COMPARATOR + * as determined by IMessage.Kind.COMPARATOR * @param includeChildren if true, then also search in any child IRunStatus * @return IMessage[] of messages of the right kind, or IMessage.NONE */ IMessage[] getMessages(IMessage.Kind kind, boolean orGreater, boolean includeChildren); - - /** + + /** * Call this any time to signal any messages. * (In particular, the IRun caller may use this to register messages * about the mishandling of the run by the ResultStatusI by the callee.) * This is a shortcut for getMessageHandler().handleMessage(..); */ //boolean handleMessage(IMessage message); - + //------------------- process display /** @return true if this run has started */ boolean started(); - + /** @return true if one of the result, abort request, or thrown is available */ boolean isCompleted(); /** @return true if this got an abort request */ boolean aborted(); - - /** - * @return true if completed and not aborted and no thrown + + /** + * @return true if completed and not aborted and no thrown * or messages with kind ABORT or FAIL or ERROR */ boolean runResult(); /** get the invoker for any subruns */ Runner getRunner(); - + /** @return the Object result, if any, of this run */ Object getResult(); @@ -159,16 +159,16 @@ public interface IRunStatus extends IMessageHolder { Object getAbortRequest(); /** @return the Throwable thrown, if any, by this run */ - Throwable getThrown(); - + Throwable getThrown(); + /** @return any Message[] signalled, or SILENCE if none */ IMessage[] getMessages(); - + /** @return the identifier set for this run, if any */ Object getIdentifier(); - + //------------------- subprocess - /** + /** * Add a record for a child run * and install self as parent. * @throws IllegalArgumentException if child is null @@ -183,7 +183,7 @@ public interface IRunStatus extends IMessageHolder { */ void registerParent(IRunStatus parent); - /** + /** * @return the current children of this run, or EMPTY_NEST if none */ IRunStatus[] getChildren(); diff --git a/testing/src/test/java/org/aspectj/testing/util/IntValidator.java b/testing/src/test/java/org/aspectj/testing/util/IntValidator.java index e3697d1aa..6b0766e4e 100644 --- a/testing/src/test/java/org/aspectj/testing/util/IntValidator.java +++ b/testing/src/test/java/org/aspectj/testing/util/IntValidator.java @@ -1,13 +1,13 @@ /* ******************************************************************* * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Xerox/PARC initial implementation + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ package org.aspectj.testing.util; @@ -17,5 +17,5 @@ package org.aspectj.testing.util; */ public interface IntValidator { /** @return true if this is a valid value */ - public boolean acceptInt(int value); + boolean acceptInt(int value); } diff --git a/testing/src/test/java/org/aspectj/testing/util/ObjectChecker.java b/testing/src/test/java/org/aspectj/testing/util/ObjectChecker.java index e1f771b9d..284014e4f 100644 --- a/testing/src/test/java/org/aspectj/testing/util/ObjectChecker.java +++ b/testing/src/test/java/org/aspectj/testing/util/ObjectChecker.java @@ -1,38 +1,38 @@ /* ******************************************************************* - * Copyright (c) 1999-2001 Xerox Corporation, + * Copyright (c) 1999-2001 Xerox Corporation, * 2002 Palo Alto Research Center, Incorporated (PARC). - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Xerox/PARC initial implementation + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ package org.aspectj.testing.util; /** - * Check input for validity. + * Check input for validity. */ public interface ObjectChecker { /** this returns true for any input, even if null */ - public static final ObjectChecker ANY = new ObjectChecker() { + ObjectChecker ANY = new ObjectChecker() { public final boolean isValid(Object input) { return true; } public final String toString() { return "ObjectChecker.ANY"; } }; - + /** this returns true for any non-null object */ - public static final ObjectChecker NOT_NULL = new ObjectChecker() { + ObjectChecker NOT_NULL = new ObjectChecker() { public boolean isValid(Object input) { return (null != input); } public String toString() { return "ObjectChecker.NOT_NULL"; } }; - + /** @return true if input is 0 Integer or any other non-Integer reference. */ - public static final ObjectChecker ANY_ZERO = new ObjectChecker() { - public boolean isValid(Object input) { + ObjectChecker ANY_ZERO = new ObjectChecker() { + public boolean isValid(Object input) { if (input instanceof Integer) { return (0 == (Integer) input); } else { @@ -41,11 +41,11 @@ public interface ObjectChecker { } public String toString() { return "ObjectChecker.ANY_ZERO"; } }; - + /** - * Check input for validity. + * Check input for validity. * @param input the Object to check - * @return true if input is ok + * @return true if input is ok */ - public boolean isValid(Object input); + boolean isValid(Object input); } diff --git a/testing/src/test/java/org/aspectj/testing/util/RunUtils.java b/testing/src/test/java/org/aspectj/testing/util/RunUtils.java index df889f222..21e1b6ebf 100644 --- a/testing/src/test/java/org/aspectj/testing/util/RunUtils.java +++ b/testing/src/test/java/org/aspectj/testing/util/RunUtils.java @@ -195,7 +195,7 @@ public class RunUtils { } /** renderer for IRunStatus */ - public static interface IRunStatusPrinter { + public interface IRunStatusPrinter { void printRunStatus(PrintStream out, IRunStatus status); } diff --git a/testing/src/test/java/org/aspectj/testing/util/SFileReader.java b/testing/src/test/java/org/aspectj/testing/util/SFileReader.java index afa66d46f..1dc5352df 100644 --- a/testing/src/test/java/org/aspectj/testing/util/SFileReader.java +++ b/testing/src/test/java/org/aspectj/testing/util/SFileReader.java @@ -1,14 +1,14 @@ /* ******************************************************************* - * Copyright (c) 1999-2001 Xerox Corporation, + * Copyright (c) 1999-2001 Xerox Corporation, * 2002 Palo Alto Research Center, Incorporated (PARC). - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Xerox/PARC initial implementation + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ package org.aspectj.testing.util; @@ -29,11 +29,11 @@ import org.aspectj.util.LangUtil; * and EOL comments # or //. * This duplicates ConfigFileUtil in some sense. */ -public class SFileReader { +public class SFileReader { // XXX move into LineReader, but that forces util to depend on AbortException? // Formerly in SuiteReader - - /** + + /** * Read args as config files and echo to stderr. * @param args String[] of fully-qualified paths to config files */ @@ -52,19 +52,19 @@ public class SFileReader { } } } - + /* * readSuite(..) reads .txt file, and for each test case specification - * creates a spec using readTestSpecifications + * creates a spec using readTestSpecifications * and (if the specifications match the constraints) * creates a test case using creatTestCase. */ /** pass this to protected methods requiring String[] if you have none */ protected static final String[] NONE = new String[0]; - + final Maker maker; - + /** @param maker the Maker factory to use - if null, use Maker.ECHO */ public SFileReader(Maker maker) { this.maker = (null == maker ? Maker.ECHO : maker); @@ -104,7 +104,7 @@ public class SFileReader { throw new IOException("no reader for " + file); } final String baseDir = file.getParent(); - + String line; boolean skipEmpties = true; while (null != (line = reader.nextLine(skipEmpties))) { @@ -126,7 +126,7 @@ public class SFileReader { try { Object made = maker.make(reader); if ((null == selector) || (selector.isValid(made))) { - if (!result.add(made)) { + if (!result.add(made)) { break; // XXX signal error? } } @@ -146,7 +146,7 @@ public class SFileReader { } reader.readToBlankLine(); } - } + } } } finally { try { @@ -156,25 +156,25 @@ public class SFileReader { } catch (IOException e) { } // ignore } - + return result; } - + /** factory produces objects by reading LineReader */ public interface Maker { - /** + /** * Make the result using the input from the LineReader, * starting with lastLine(). */ Object make(UtilLineReader reader) throws AbortException, IOException; - + /** @return type of the Object made */ Class getType(); - + /** This echoes each line, prefixed by the reader. * @return file:line: {line} */ - static final Maker ECHO = new Maker() { + Maker ECHO = new Maker() { public Object make(UtilLineReader reader) { return reader + ": " + reader.lastLine(); } diff --git a/testing/src/test/java/org/aspectj/testing/util/StringVisitor.java b/testing/src/test/java/org/aspectj/testing/util/StringVisitor.java index 123376df4..02f7459c3 100644 --- a/testing/src/test/java/org/aspectj/testing/util/StringVisitor.java +++ b/testing/src/test/java/org/aspectj/testing/util/StringVisitor.java @@ -1,21 +1,21 @@ /* ******************************************************************* - * Copyright (c) 1999-2001 Xerox Corporation, + * Copyright (c) 1999-2001 Xerox Corporation, * 2002 Palo Alto Research Center, Incorporated (PARC). - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Xerox/PARC initial implementation + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ // todo: non-distribution license? package org.aspectj.testing.util; -/** +/** * Visitor interface for String */ public interface StringVisitor { @@ -23,6 +23,6 @@ public interface StringVisitor { * @param input the String to evaluate - may be null * @return true if input is accepted and/or process should continue */ - public boolean accept(String input); + boolean accept(String input); } |