diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-06-04 07:58:52 +0700 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-06-04 07:58:52 +0700 |
commit | 49cb924f5402c9d24379ae1af62def6fa5892649 (patch) | |
tree | 69844405209043e2e18aa9eef0f01f287bc1ae52 /bridge | |
parent | 82df3f0fc9842758f15f12299c9113e48f1ccb5c (diff) | |
download | aspectj-49cb924f5402c9d24379ae1af62def6fa5892649.tar.gz aspectj-49cb924f5402c9d24379ae1af62def6fa5892649.zip |
Upgrade license from CPLv1/EPLv1 to EPLv2
This was required by the Eclipse team as one precondition for the next
release.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'bridge')
28 files changed, 312 insertions, 312 deletions
diff --git a/bridge/src/main/java/org/aspectj/bridge/AbortException.java b/bridge/src/main/java/org/aspectj/bridge/AbortException.java index 6dac2005e..dadd16f9e 100644 --- a/bridge/src/main/java/org/aspectj/bridge/AbortException.java +++ b/bridge/src/main/java/org/aspectj/bridge/AbortException.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 v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ package org.aspectj.bridge; @@ -23,7 +23,7 @@ import java.util.ArrayList; * normally (e.g., a test failure causes the test to abort but the reporting and testing continues normally), use the static methods * to borrow and return a "porter" to avoid the expense of constructing a stack trace each time. A porter stack trace is invalid, * and it should only be used to convey a message. E.g., to print the stack of the AbortException and any contained message: - * + * * <pre> * catch (AbortException ae) { * IMessage m = ae.getMessage(); @@ -32,7 +32,7 @@ import java.util.ArrayList; * if (null != thrown) thrown.printStackTrace(System.err); * } * </pre> - * + * * @author PARC * @author Andy Clement */ @@ -124,7 +124,7 @@ public class AbortException extends RuntimeException { // XXX move porters out, /** * The stack trace of a porter is invalid; it is only used to carry a message (which may itself have a wrapped exception). - * + * * @return true if this exception is only to carry exception */ public boolean isPorter() { @@ -152,7 +152,7 @@ public class AbortException extends RuntimeException { // XXX move porters out, /** * Get message for this AbortException, either associated explicitly as message or implicitly as IMessage message or its thrown * message. - * + * * @see java.lang.Throwable#getMessage() */ public String getMessage() { @@ -184,7 +184,7 @@ public class AbortException extends RuntimeException { // XXX move porters out, /** * Print the stack trace of any enclosed thrown or this otherwise. - * + * * @see java.lang.Throwable#printStackTrace(PrintStream) */ public void printStackTrace(PrintStream s) { @@ -200,7 +200,7 @@ public class AbortException extends RuntimeException { // XXX move porters out, /** * Print the stack trace of any enclosed thrown or this otherwise. - * + * * @see java.lang.Throwable#printStackTrace(PrintWriter) */ public void printStackTrace(PrintWriter s) { diff --git a/bridge/src/main/java/org/aspectj/bridge/Constants.java b/bridge/src/main/java/org/aspectj/bridge/Constants.java index 31f239678..c4f5dc758 100644 --- a/bridge/src/main/java/org/aspectj/bridge/Constants.java +++ b/bridge/src/main/java/org/aspectj/bridge/Constants.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v 2.0 * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * * Contributors: * Matthew Webster - initial implementation *******************************************************************************/ @@ -15,7 +15,7 @@ public class Constants { /* Default resource names for user and generate aop.xml file */ public final static String AOP_USER_XML = "META-INF/aop.xml"; public final static String AOP_AJC_XML = "META-INF/aop-ajc.xml"; - + /* Resource name for OSGi */ public final static String AOP_OSGI_XML = "org/aspectj/aop.xml"; diff --git a/bridge/src/main/java/org/aspectj/bridge/CountingMessageHandler.java b/bridge/src/main/java/org/aspectj/bridge/CountingMessageHandler.java index f1ea8f2fb..e80ce5fc3 100644 --- a/bridge/src/main/java/org/aspectj/bridge/CountingMessageHandler.java +++ b/bridge/src/main/java/org/aspectj/bridge/CountingMessageHandler.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 v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ package org.aspectj.bridge; @@ -63,7 +63,7 @@ public class CountingMessageHandler implements IMessageHandler { /** * Delegate - * + * * @see org.aspectj.bridge.IMessageHandler#isIgnoring(org.aspectj.bridge.IMessage.Kind) * @param kind */ @@ -73,7 +73,7 @@ public class CountingMessageHandler implements IMessageHandler { /** * Delegate - * + * * @see org.aspectj.bridge.IMessageHandler#ignore(org.aspectj.bridge.IMessage.Kind) * @param kind */ @@ -88,7 +88,7 @@ public class CountingMessageHandler implements IMessageHandler { /** * Return count of messages seen through this interface. - * + * * @param kind the IMessage.Kind of the messages to count (if null, count all) * @param orGreater if true, then count this kind and any considered greater by the ordering of IMessage.Kind#COMPARATOR * @return number of messages of this kind (optionally or greater) diff --git a/bridge/src/main/java/org/aspectj/bridge/ICommand.java b/bridge/src/main/java/org/aspectj/bridge/ICommand.java index b77d58e59..a9c394633 100644 --- a/bridge/src/main/java/org/aspectj/bridge/ICommand.java +++ b/bridge/src/main/java/org/aspectj/bridge/ICommand.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 v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ @@ -27,13 +27,13 @@ public interface ICommand { * @return true if the command completed successfully */ boolean runCommand(String[] args, IMessageHandler handler); - + /** * Rerun the command. - * + * * @param handler the IMessageHandler for all output from the command - * + * * @return true if the command completed successfully */ - boolean repeatCommand(IMessageHandler handler); + boolean repeatCommand(IMessageHandler handler); } diff --git a/bridge/src/main/java/org/aspectj/bridge/ILifecycleAware.java b/bridge/src/main/java/org/aspectj/bridge/ILifecycleAware.java index c5ac9b149..55c6b9b13 100644 --- a/bridge/src/main/java/org/aspectj/bridge/ILifecycleAware.java +++ b/bridge/src/main/java/org/aspectj/bridge/ILifecycleAware.java @@ -1,21 +1,21 @@ /* ******************************************************************* * Copyright (c) 2006 Contributors. - * 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://eclipse.org/legal/epl-v10.html - * - * Contributors: + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.bridge; /** - * Interface that can be implemented by MessageHandlers that need to - * perform some additional processing when a build is starting and + * Interface that can be implemented by MessageHandlers that need to + * perform some additional processing when a build is starting and * when it has finished. - * + * * @author Adrian Colyer * @since 1.5.1 */ @@ -25,11 +25,11 @@ public interface ILifecycleAware { * called when a build starts */ void buildStarting(boolean isIncremental); - + /** * called when a batch build finishes * */ void buildFinished(boolean wasIncremental); - + } diff --git a/bridge/src/main/java/org/aspectj/bridge/IMessage.java b/bridge/src/main/java/org/aspectj/bridge/IMessage.java index 21ef8d7ab..b9c7c05ea 100644 --- a/bridge/src/main/java/org/aspectj/bridge/IMessage.java +++ b/bridge/src/main/java/org/aspectj/bridge/IMessage.java @@ -3,9 +3,9 @@ * 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 + * under the terms of the Eclipse Public License v 2.0 * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt * * Contributors: * Xerox/PARC initial implementation diff --git a/bridge/src/main/java/org/aspectj/bridge/IMessageContext.java b/bridge/src/main/java/org/aspectj/bridge/IMessageContext.java index e3e0d0962..cde4ce488 100644 --- a/bridge/src/main/java/org/aspectj/bridge/IMessageContext.java +++ b/bridge/src/main/java/org/aspectj/bridge/IMessageContext.java @@ -1,9 +1,9 @@ /******************************************************************************* * Copyright (c) 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 + * are made available under the terms of the Eclipse Public License v 2.0 * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt * * Contributors: * Matthew Webster - initial implementation diff --git a/bridge/src/main/java/org/aspectj/bridge/IMessageHandler.java b/bridge/src/main/java/org/aspectj/bridge/IMessageHandler.java index 9baf23465..3268dd3fb 100644 --- a/bridge/src/main/java/org/aspectj/bridge/IMessageHandler.java +++ b/bridge/src/main/java/org/aspectj/bridge/IMessageHandler.java @@ -3,9 +3,9 @@ * 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 + * under the terms of the Eclipse Public License v 2.0 * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt * * Contributors: * Xerox/PARC initial implementation diff --git a/bridge/src/main/java/org/aspectj/bridge/IMessageHolder.java b/bridge/src/main/java/org/aspectj/bridge/IMessageHolder.java index c438b8350..bb8b8074a 100644 --- a/bridge/src/main/java/org/aspectj/bridge/IMessageHolder.java +++ b/bridge/src/main/java/org/aspectj/bridge/IMessageHolder.java @@ -3,9 +3,9 @@ * 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 + * under the terms of the Eclipse Public License v 2.0 * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt * * Contributors: * Xerox/PARC initial implementation diff --git a/bridge/src/main/java/org/aspectj/bridge/IProgressListener.java b/bridge/src/main/java/org/aspectj/bridge/IProgressListener.java index 21eb6eeb4..1fa39c2b1 100644 --- a/bridge/src/main/java/org/aspectj/bridge/IProgressListener.java +++ b/bridge/src/main/java/org/aspectj/bridge/IProgressListener.java @@ -2,9 +2,9 @@ * Copyright (c) 2003 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 + * under the terms of the Eclipse Public License v 2.0 * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt * * Contributors: * Xerox/PARC initial implementation diff --git a/bridge/src/main/java/org/aspectj/bridge/ISourceLocation.java b/bridge/src/main/java/org/aspectj/bridge/ISourceLocation.java index 5045d0f47..45207fcb6 100644 --- a/bridge/src/main/java/org/aspectj/bridge/ISourceLocation.java +++ b/bridge/src/main/java/org/aspectj/bridge/ISourceLocation.java @@ -3,9 +3,9 @@ * 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 + * under the terms of the Eclipse Public License v 2.0 * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt * * Contributors: * Xerox/PARC initial implementation diff --git a/bridge/src/main/java/org/aspectj/bridge/Message.java b/bridge/src/main/java/org/aspectj/bridge/Message.java index 959491c1f..fa6a90d9f 100644 --- a/bridge/src/main/java/org/aspectj/bridge/Message.java +++ b/bridge/src/main/java/org/aspectj/bridge/Message.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 v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ package org.aspectj.bridge; @@ -33,7 +33,7 @@ public class Message implements IMessage { /** * Create a (compiler) error or warning message - * + * * @param message the String used as the underlying message * @param location the ISourceLocation, if any, associated with this message * @param isError if true, use IMessage.ERROR; else use IMessage.WARNING @@ -49,7 +49,7 @@ public class Message implements IMessage { /** * Create a message, handling null values for message and kind if thrown is not null. - * + * * @param message the String used as the underlying message * @param kind the IMessage.Kind of message - not null * @param thrown the Throwable, if any, associated with this message @@ -89,7 +89,7 @@ public class Message implements IMessage { /** * Create a message, handling null values for message and kind if thrown is not null. - * + * * @param message the String used as the underlying message * @param kind the IMessage.Kind of message - not null * @param thrown the Throwable, if any, associated with this message diff --git a/bridge/src/main/java/org/aspectj/bridge/MessageHandler.java b/bridge/src/main/java/org/aspectj/bridge/MessageHandler.java index 95bcf029d..c6e423e7f 100644 --- a/bridge/src/main/java/org/aspectj/bridge/MessageHandler.java +++ b/bridge/src/main/java/org/aspectj/bridge/MessageHandler.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 v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ package org.aspectj.bridge; @@ -22,7 +22,7 @@ import java.util.List; * listener/interceptor. The interceptor handles all messages (even null) first, and can halt further processing/accumlation by * returning true. Clients can obtain messages accumulated using the get... methods. XXX this does not permit messages to be * removed. - * + * * @author PARC * @author Andy Clement */ @@ -64,7 +64,7 @@ public class MessageHandler implements IMessageHolder { /** * Initialize this, removing any messages accumulated, kinds being ignored, or interceptor. - * + * * @param accumulateOnly boolean value returned from handleMessage after accumulating in list */ public void init(boolean accumulateOnly) { @@ -97,7 +97,7 @@ public class MessageHandler implements IMessageHolder { /** * This implementation accumulates message. If an interceptor is installed and returns true (message handled), then processing * halts and the message is not accumulated. - * + * * @see org.aspectj.bridge.IMessageHandler#handleMessage(IMessage) * @return true on interception or the constructor value otherwise */ @@ -199,7 +199,7 @@ public class MessageHandler implements IMessageHolder { /** * Get all messages or those of a specific kind. Pass null to get all kinds. - * + * * @param kind the IMessage.Kind expected, or null for all messages * @return IMessage[] of messages of the right kind */ @@ -243,7 +243,7 @@ public class MessageHandler implements IMessageHolder { /** * Set the interceptor which gets any message before we process it. - * + * * @param interceptor the IMessageHandler passed the message. Pass null to remove the old interceptor. */ public void setInterceptor(IMessageHandler interceptor) { diff --git a/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java b/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java index 1b822395d..8c17cd947 100644 --- a/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java +++ b/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java @@ -3,9 +3,9 @@ * 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 + * under the terms of the Eclipse Public License v 2.0 * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt * * Contributors: * Xerox/PARC initial implementation diff --git a/bridge/src/main/java/org/aspectj/bridge/MessageWriter.java b/bridge/src/main/java/org/aspectj/bridge/MessageWriter.java index 3fbeb91b0..5f3389d97 100644 --- a/bridge/src/main/java/org/aspectj/bridge/MessageWriter.java +++ b/bridge/src/main/java/org/aspectj/bridge/MessageWriter.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 v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ package org.aspectj.bridge; @@ -22,17 +22,17 @@ import java.io.PrintWriter; * are rendered by overriding render(IMessage). */ public class MessageWriter implements IMessageHandler { - + protected PrintWriter writer; protected boolean abortOnFailure; public MessageWriter(PrintWriter writer, boolean abortOnFailure) { this.writer = (null != writer ? writer : new PrintWriter(System.out)); this.abortOnFailure = abortOnFailure; } - + /** * Handle message by printing and - * (if abortOnFailure) throwing an AbortException if + * (if abortOnFailure) throwing an AbortException if * the messages is a failure or an abort (but not for errors). * @see org.aspectj.bridge.IMessageHandler#handleMessage(IMessage) */ @@ -50,11 +50,11 @@ public class MessageWriter implements IMessageHandler { } return true; } - + /** * @see org.aspectj.bridge.IMessageHandler#isIgnoring(org.aspectj.bridge.IMessage.Kind) */ - public boolean isIgnoring(IMessage.Kind kind) { + public boolean isIgnoring(IMessage.Kind kind) { // XXX share MessageHandler implementation in superclass return false; } @@ -65,7 +65,7 @@ public class MessageWriter implements IMessageHandler { * @param kind */ public void dontIgnore(IMessage.Kind kind) { - + } /** @@ -78,7 +78,7 @@ public class MessageWriter implements IMessageHandler { /** @return null to not print, or message rendering (including newlines) */ protected String render(IMessage message) { - return message.toString(); + return message.toString(); } } diff --git a/bridge/src/main/java/org/aspectj/bridge/ReflectionFactory.java b/bridge/src/main/java/org/aspectj/bridge/ReflectionFactory.java index 73f063dc4..9d0307d6e 100644 --- a/bridge/src/main/java/org/aspectj/bridge/ReflectionFactory.java +++ b/bridge/src/main/java/org/aspectj/bridge/ReflectionFactory.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 v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ package org.aspectj.bridge; @@ -17,7 +17,7 @@ import java.lang.reflect.Constructor; import java.util.Arrays; /** - * + * */ public class ReflectionFactory { // XXX lease, pool public static final String OLD_AJC = "bridge.tools.impl.OldAjc"; @@ -27,7 +27,7 @@ public class ReflectionFactory { // XXX lease, pool /** * Produce a compiler as an ICommand. - * + * * @param cname the fully-qualified class name of the command to create by reflection (assuming a public no-argument * constructor). * @return ICommand compiler or null diff --git a/bridge/src/main/java/org/aspectj/bridge/SourceLocation.java b/bridge/src/main/java/org/aspectj/bridge/SourceLocation.java index d3d8f128c..e6cbe0bc2 100644 --- a/bridge/src/main/java/org/aspectj/bridge/SourceLocation.java +++ b/bridge/src/main/java/org/aspectj/bridge/SourceLocation.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 v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ package org.aspectj.bridge; @@ -20,7 +20,7 @@ import org.aspectj.util.LangUtil; /** * Immutable source location. This guarantees that the source file is not null and that the numeric values are positive and line ≤ * endLine. - * + * * @see org.aspectj.lang.reflect.SourceLocation */ public class SourceLocation implements ISourceLocation { diff --git a/bridge/src/main/java/org/aspectj/bridge/Version.java b/bridge/src/main/java/org/aspectj/bridge/Version.java index 321741120..07139048f 100644 --- a/bridge/src/main/java/org/aspectj/bridge/Version.java +++ b/bridge/src/main/java/org/aspectj/bridge/Version.java @@ -1,12 +1,12 @@ /* ******************************************************************** - * Copyright (c) 1998-2001 Xerox Corporation, + * Copyright (c) 1998-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 + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v 2.0 * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html - * + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * * Contributors: * Xerox/PARC initial implementation * *******************************************************************/ @@ -22,7 +22,7 @@ import java.util.Properties; /** release-specific version information */ public class Version { - + // generated from build/lib/BridgeVersion.java /** default version value for development version */ @@ -31,29 +31,29 @@ public class Version { /** default time value for development version */ public static final long NOTIME = 0L; - + public static final String UNREPLACED_TEXT = "${project.version}"; public static final String UNREPLACED_TIME_TEXT = "${version.time_text}"; - + /** set by build script */ private static String text;// = "DEVELOPMENT"; // VersionUptodate.java scans for "static final String text = " - - /** + + /** * Time text set by build script using SIMPLE_DATE_FORMAT. * (if DEVELOPMENT version, invalid) */ private static String time_text;// = "Tuesday Jan 15, 2019 at 00:53:54 GMT"; - - /** + + /** * time in seconds-since-... format, used by programmatic clients. * (if DEVELOPMENT version, NOTIME) */ private static long time = -1; // -1 == uninitialized - + /** format used by build script to set time_text */ public static final String SIMPLE_DATE_FORMAT = "EEEE MMM d, yyyy 'at' HH:mm:ss z"; - + static { try { URL resource = Version.class.getResource("version.properties"); @@ -70,19 +70,19 @@ public class Version { } catch (IOException e) { text="DEVELOPMENT"; time_text = ""; - } + } } - + public static long getTime() { if (time==-1) { long foundTime = NOTIME; - // if not DEVELOPMENT version, read time text using format used to set time + // if not DEVELOPMENT version, read time text using format used to set time try { SimpleDateFormat format = new SimpleDateFormat(SIMPLE_DATE_FORMAT); ParsePosition pos = new ParsePosition(0); Date date = format.parse(time_text, pos); if (date!=null) foundTime = date.getTime(); - } catch (Throwable t) { + } catch (Throwable t) { } time = foundTime; } @@ -98,10 +98,10 @@ public class Version { public static void main(String[] args) { if ((null != args) && (0 < args.length)) { if (!Version.text.equals(args[0])) { - System.err.println("version expected: \"" - + args[0] - + "\" actual=\"" - + Version.text + System.err.println("version expected: \"" + + args[0] + + "\" actual=\"" + + Version.text + "\""); } } @@ -115,7 +115,7 @@ public class Version { return text; } } - + diff --git a/bridge/src/main/java/org/aspectj/bridge/WeaveMessage.java b/bridge/src/main/java/org/aspectj/bridge/WeaveMessage.java index 2c697a811..ba6baab5b 100644 --- a/bridge/src/main/java/org/aspectj/bridge/WeaveMessage.java +++ b/bridge/src/main/java/org/aspectj/bridge/WeaveMessage.java @@ -1,12 +1,12 @@ /* ******************************************************************* * Copyright (c) 2004 IBM Corporation - * 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: + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: * Andy Clement IBM initial implementation 30-May-2004 * ******************************************************************/ @@ -51,7 +51,7 @@ public class WeaveMessage extends Message { /** * Static helper method for constructing weaving messages. - * + * * @param kind what kind of message (e.g. declare parents) * @param inserts inserts for the message (inserts are marked %n in the message) * @return new weaving message @@ -68,7 +68,7 @@ public class WeaveMessage extends Message { /** * Static helper method for constructing weaving messages. - * + * * @param kind what kind of message (e.g. declare parents) * @param inserts inserts for the message (inserts are marked %n in the message) * @param affectedtypename the type which is being advised/declaredUpon diff --git a/bridge/src/main/java/org/aspectj/bridge/context/CompilationAndWeavingContext.java b/bridge/src/main/java/org/aspectj/bridge/context/CompilationAndWeavingContext.java index e1ea09a99..cd750e4ab 100644 --- a/bridge/src/main/java/org/aspectj/bridge/context/CompilationAndWeavingContext.java +++ b/bridge/src/main/java/org/aspectj/bridge/context/CompilationAndWeavingContext.java @@ -1,12 +1,12 @@ /* ******************************************************************* * Copyright (c) 2005-2012 Contributors. - * 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://eclipse.org/legal/epl-v10.html - * - * Contributors: + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: * Adrian Colyer Initial implementation * Andy Clement various fixes * Trask Stanalker #373195 @@ -19,10 +19,10 @@ import java.util.Map; import java.util.Stack; /** - * This class is responsible for tracking progress through the various phases of compilation and weaving. - * When an exception occurs (or a message is issued, if desired), you can ask this class for a - * "stack trace" that gives information about what the compiler was doing at the time. - * The trace will say something like: + * This class is responsible for tracking progress through the various phases of compilation and weaving. + * When an exception occurs (or a message is issued, if desired), you can ask this class for a + * "stack trace" that gives information about what the compiler was doing at the time. + * The trace will say something like: * "when matching pointcut xyz when matching shadow sss when weaving type ABC when weaving shadow mungers" */ public class CompilationAndWeavingContext { diff --git a/bridge/src/main/java/org/aspectj/bridge/context/ContextFormatter.java b/bridge/src/main/java/org/aspectj/bridge/context/ContextFormatter.java index 9f1b591d7..5d34a0dec 100644 --- a/bridge/src/main/java/org/aspectj/bridge/context/ContextFormatter.java +++ b/bridge/src/main/java/org/aspectj/bridge/context/ContextFormatter.java @@ -1,19 +1,19 @@ /* ******************************************************************* * Copyright (c) 2005 Contributors. - * 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://eclipse.org/legal/epl-v10.html - * - * Contributors: + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.bridge.context; /** * @author colyer - * Implementors of this interface know how to turn the "Object" data and phase id + * Implementors of this interface know how to turn the "Object" data and phase id * associated with a context stack entry into a meaningful string. */ public interface ContextFormatter { diff --git a/bridge/src/main/java/org/aspectj/bridge/context/ContextToken.java b/bridge/src/main/java/org/aspectj/bridge/context/ContextToken.java index 2415fa72e..b9e4d0ebc 100644 --- a/bridge/src/main/java/org/aspectj/bridge/context/ContextToken.java +++ b/bridge/src/main/java/org/aspectj/bridge/context/ContextToken.java @@ -1,19 +1,19 @@ /* ******************************************************************* * Copyright (c) 2005 Contributors. - * 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://eclipse.org/legal/epl-v10.html - * - * Contributors: + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.bridge.context; /** * When an entry is added to the CompilationAndWeavingContext stack, - * a ContextToken is returned. + * a ContextToken is returned. * When leaving a compilation or weaving phase, this token must be supplied. * The token details are opaque to clients */ diff --git a/bridge/src/main/java/org/aspectj/bridge/context/PinpointingMessageHandler.java b/bridge/src/main/java/org/aspectj/bridge/context/PinpointingMessageHandler.java index b8c975cd0..fe2239d7a 100644 --- a/bridge/src/main/java/org/aspectj/bridge/context/PinpointingMessageHandler.java +++ b/bridge/src/main/java/org/aspectj/bridge/context/PinpointingMessageHandler.java @@ -1,12 +1,12 @@ /* ******************************************************************* * Copyright (c) 2005 Contributors. - * 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://eclipse.org/legal/epl-v10.html - * - * Contributors: + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.bridge.context; @@ -24,13 +24,13 @@ import org.aspectj.bridge.IMessage.Kind; /** * @author colyer * Facade for an IMessageHandler - * Extends message with details of exactly what the compiler / weaver was doing at the + * Extends message with details of exactly what the compiler / weaver was doing at the * time. Use the -Xdev:Pinpoint option to turn this facility on. */ public class PinpointingMessageHandler implements IMessageHandler { private IMessageHandler delegate; - + public PinpointingMessageHandler(IMessageHandler delegate) { this.delegate = delegate; } @@ -75,17 +75,17 @@ public class PinpointingMessageHandler implements IMessageHandler { public void ignore(Kind kind) { delegate.ignore(kind); } - + private static class PinpointedMessage implements IMessage { private IMessage delegate; private String message; - + public PinpointedMessage(IMessage delegate, String pinpoint) { this.delegate = delegate; this.message = delegate.getMessage() + "\n" + pinpoint; } - + public String getMessage() { return this.message; } public Kind getKind() { return delegate.getKind();} public boolean isError() { return delegate.isError(); } diff --git a/bridge/src/test/java/org/aspectj/bridge/BridgeModuleTests.java b/bridge/src/test/java/org/aspectj/bridge/BridgeModuleTests.java index 39671f319..2c088ea69 100644 --- a/bridge/src/test/java/org/aspectj/bridge/BridgeModuleTests.java +++ b/bridge/src/test/java/org/aspectj/bridge/BridgeModuleTests.java @@ -1,15 +1,15 @@ package org.aspectj.bridge; /* ******************************************************************* - * 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 v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ @@ -23,15 +23,15 @@ import junit.framework.TestSuite; public class BridgeModuleTests extends TestCase { - public static Test suite() { + public static Test suite() { TestSuite suite = new TestSuite(BridgeModuleTests.class.getName()); - suite.addTestSuite(CountingMessageHandlerTest.class); - suite.addTestSuite(MessageTest.class); - suite.addTestSuite(VersionTest.class); + suite.addTestSuite(CountingMessageHandlerTest.class); + suite.addTestSuite(MessageTest.class); + suite.addTestSuite(VersionTest.class); suite.addTestSuite(CompilationAndWeavingContextTest.class); return suite; } public BridgeModuleTests(String name) { super(name); } -} +} diff --git a/bridge/src/test/java/org/aspectj/bridge/CountingMessageHandlerTest.java b/bridge/src/test/java/org/aspectj/bridge/CountingMessageHandlerTest.java index dc357a8b1..981b92841 100644 --- a/bridge/src/test/java/org/aspectj/bridge/CountingMessageHandlerTest.java +++ b/bridge/src/test/java/org/aspectj/bridge/CountingMessageHandlerTest.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 v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ package org.aspectj.bridge; @@ -18,11 +18,11 @@ import junit.framework.TestCase; import junit.textui.TestRunner; /** - * + * */ public class CountingMessageHandlerTest extends TestCase { - private static final String ME + private static final String ME = "org.aspectj.bridge.CountingMessageHandlerTest"; // XXX /** @param args ignored */ @@ -60,7 +60,7 @@ public class CountingMessageHandlerTest extends TestCase { assertEquals(0 , me.numMessages(IMessage.ERROR, true)); assertEquals(1 , me.numMessages(IMessage.WARNING, true)); assertEquals(1 , me.numMessages(IMessage.INFO, true)); - + MessageUtil.info(me, "info 1"); assertTrue(!me.hasErrors()); assertEquals(0 , me.numMessages(IMessage.ERROR, false)); @@ -78,5 +78,5 @@ public class CountingMessageHandlerTest extends TestCase { assertEquals(1 , me.numMessages(IMessage.ERROR, true)); assertEquals(2 , me.numMessages(IMessage.WARNING, true)); assertEquals(3 , me.numMessages(IMessage.INFO, true)); - } + } } diff --git a/bridge/src/test/java/org/aspectj/bridge/MessageTest.java b/bridge/src/test/java/org/aspectj/bridge/MessageTest.java index 7ef2eafb4..c4e6b6a3c 100644 --- a/bridge/src/test/java/org/aspectj/bridge/MessageTest.java +++ b/bridge/src/test/java/org/aspectj/bridge/MessageTest.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 v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ package org.aspectj.bridge; @@ -25,11 +25,11 @@ import junit.framework.TestCase; import junit.textui.TestRunner; /** - * + * */ public class MessageTest extends TestCase { - private static final String ME + private static final String ME = "org.aspectj.bridge.MessageTest"; // XXX /** @param args ignored */ @@ -44,7 +44,7 @@ public class MessageTest extends TestCase { public MessageTest(String name) { super(name); } - + <T> void checkListOrder(List<T> list, Comparator<T> c) { // XXX util assertNotNull(list); assertNotNull(c); @@ -57,19 +57,19 @@ public class MessageTest extends TestCase { int i = c.compare(last, current); if (i > 0) { assertTrue( last + " > " + current + " (" + i + ")", false); - } - } + } + } last = current; } } - + public void testKindOrder() { // first briefly validate the checker checkListOrder(Arrays.asList(new String[] { "a", "b", "C" }), String.CASE_INSENSITIVE_ORDER); checkListOrder(IMessage.KINDS, IMessage.Kind.COMPARATOR); } - + public void testKind_isSameOrLessThan() { IMessage.Kind last; IMessage.Kind next = null; @@ -86,31 +86,31 @@ public class MessageTest extends TestCase { assertTrue(label, next.isSameOrLessThan(next)); } } - + public void testMessageHandler() { boolean handleMessageResult = true; checkEmptyMessageHolder(new MessageHandler(handleMessageResult), handleMessageResult); handleMessageResult = false; checkEmptyMessageHolder(new MessageHandler(handleMessageResult), handleMessageResult); } - + public void checkEmptyMessageHolder( - IMessageHolder h, + IMessageHolder h, final boolean handleMessageResult) { - // { INFO, DEBUG, WARNING, ERROR, FAIL, ABORT })); + // { INFO, DEBUG, WARNING, ERROR, FAIL, ABORT })); assertNotNull(h); assertTrue(!h.hasAnyMessage(null, true)); assertTrue(!h.hasAnyMessage(null, false)); assertTrue(!h.hasAnyMessage(IMessage.INFO, true)); assertTrue(!h.hasAnyMessage(IMessage.INFO, false)); - + assertTrue(handleMessageResult == h.handleMessage(make("error 1", IMessage.ERROR))); assertTrue(handleMessageResult == h.handleMessage(make("error 2", IMessage.ERROR))); assertTrue(handleMessageResult == h.handleMessage(make("fail 1", IMessage.FAIL))); assertTrue(handleMessageResult == h.handleMessage(make("fail 2", IMessage.FAIL))); assertTrue(handleMessageResult == h.handleMessage(make("debug 1", IMessage.DEBUG))); assertTrue(handleMessageResult == h.handleMessage(make("debug 2", IMessage.DEBUG))); - + assertTrue(h.hasAnyMessage(null, true)); assertTrue(h.hasAnyMessage(null, false)); assertTrue(h.hasAnyMessage(IMessage.ERROR, true)); @@ -119,14 +119,14 @@ public class MessageTest extends TestCase { assertTrue(h.hasAnyMessage(IMessage.FAIL, false)); assertTrue(h.hasAnyMessage(IMessage.DEBUG, true)); assertTrue(h.hasAnyMessage(IMessage.DEBUG, false)); - + assertTrue(!h.hasAnyMessage(IMessage.INFO, IMessageHolder.EQUAL)); assertTrue(!h.hasAnyMessage(IMessage.WARNING, IMessageHolder.EQUAL)); assertTrue(!h.hasAnyMessage(IMessage.ABORT, IMessageHolder.EQUAL)); assertTrue(h.hasAnyMessage(IMessage.INFO, IMessageHolder.ORGREATER)); assertTrue(h.hasAnyMessage(IMessage.WARNING, IMessageHolder.ORGREATER)); assertTrue(!h.hasAnyMessage(IMessage.ABORT, IMessageHolder.ORGREATER)); - + assertTrue(0 == h.numMessages(IMessage.INFO, IMessageHolder.EQUAL)); assertTrue(0 == h.numMessages(IMessage.WARNING, IMessageHolder.EQUAL)); assertTrue(0 == h.numMessages(IMessage.ABORT, IMessageHolder.EQUAL)); @@ -139,9 +139,9 @@ public class MessageTest extends TestCase { assertTrue(4 == h.numMessages(IMessage.ERROR, IMessageHolder.ORGREATER)); assertTrue(2 == h.numMessages(IMessage.FAIL, IMessageHolder.ORGREATER)); assertTrue(0 == h.numMessages(IMessage.ABORT, IMessageHolder.ORGREATER)); - - } - + + } + public void testMessage() { String input = "input"; Throwable thrown = null; @@ -183,16 +183,16 @@ public class MessageTest extends TestCase { roundTrip(input, kind, thrown, sl, descriptor, exClass); input = null; kind = IMessage.INFO; - roundTrip(input, kind, thrown, sl, descriptor, exClass); + roundTrip(input, kind, thrown, sl, descriptor, exClass); } - + protected IMessage make(String message, IMessage.Kind kind) { return new Message(message, kind, null, null); } /** make a Message per descriptor and input */ protected IMessage make(String input, IMessage.Kind kind, - Throwable thrown, ISourceLocation sourceLocation, + Throwable thrown, ISourceLocation sourceLocation, String descriptor) { // XXX ignored for now return new Message(input, kind, thrown, sourceLocation); } @@ -201,7 +201,7 @@ public class MessageTest extends TestCase { * Simple round-trip on the message */ protected void roundTrip(String input, IMessage.Kind kind, - Throwable thrown, ISourceLocation sourceLocation, + Throwable thrown, ISourceLocation sourceLocation, String descriptor, Class<?> exClass) { try { IMessage m = make(input, kind, thrown, sourceLocation, descriptor); @@ -224,14 +224,14 @@ public class MessageTest extends TestCase { assertEquals(input, m.getMessage()); assertTrue(""+kind, kind == m.getKind()); assertTrue(""+thrown, equals(thrown, m.getThrown())); - assertTrue(""+sourceLocation, + assertTrue(""+sourceLocation, equals(sourceLocation, m.getSourceLocation())); String err = new KindTest().testKindSet(message, kind); if (null != err) { assertTrue(err, false); } } - + protected static boolean equals(Object one, Object two) { if (null == one) { return (null == two); @@ -246,8 +246,8 @@ public class MessageTest extends TestCase { /** test correlation between message and enclosed kind */ class KindTest { /** order tracked in checkKindMethods() */ - static final IMessage.Kind[] KINDS = new IMessage.Kind[] - { IMessage.ABORT, IMessage.DEBUG, IMessage.ERROR, + static final IMessage.Kind[] KINDS = new IMessage.Kind[] + { IMessage.ABORT, IMessage.DEBUG, IMessage.ERROR, IMessage.INFO, IMessage.WARNING, IMessage.FAIL }; static final List<IMessage.Kind> KINDLIST = Arrays.asList(KINDS); @@ -258,7 +258,7 @@ class KindTest { final BitSet expected = new BitSet(KINDS.length); IMessage.Kind kind = IMessage.INFO; - + /** @return error if failed */ public String testKindSet(IMessage m, IMessage.Kind newKind) { IMessage.Kind oldKind = this.kind; @@ -271,7 +271,7 @@ class KindTest { } return (null != result? result : setKind(oldKind)); } - + /** @return error if failed */ private String setKind(IMessage.Kind kind) { this.kind = kind; @@ -283,7 +283,7 @@ class KindTest { expected.set(index); return null; } - + /** @return error if failed */ String checkExpectedKind(IMessage m) { StringBuffer result = new StringBuffer(); @@ -292,29 +292,29 @@ class KindTest { String s = "expected " + expected.get(i) + " for is{Method} for " + KINDS[i]; result.append(s + "\n"); - } - } - return (0 < result.length() ? result.toString() : null); + } + } + return (0 < result.length() ? result.toString() : null); } - + String checkKindSet(IMessage m, IMessage.Kind kind) { if (kind != m.getKind()) { return "expected kind " + kind + " got " + m.getKind(); } return null; } - + /** @return true if index matches isFoo() reporting */ boolean checkKindMethods(IMessage m, int index) { switch (index) { - case (0) : return m.isAbort(); - case (1) : return m.isDebug(); - case (2) : return m.isError(); - case (3) : return m.isInfo(); - case (4) : return m.isWarning(); - case (5) : return m.isFailed(); + case (0) : return m.isAbort(); + case (1) : return m.isDebug(); + case (2) : return m.isError(); + case (3) : return m.isInfo(); + case (4) : return m.isWarning(); + case (5) : return m.isFailed(); default : throw new IllegalArgumentException("index=" + index); - + } } } diff --git a/bridge/src/test/java/org/aspectj/bridge/VersionTest.java b/bridge/src/test/java/org/aspectj/bridge/VersionTest.java index 70eb9d380..ecf3b230b 100644 --- a/bridge/src/test/java/org/aspectj/bridge/VersionTest.java +++ b/bridge/src/test/java/org/aspectj/bridge/VersionTest.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 v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ package org.aspectj.bridge; @@ -24,7 +24,7 @@ import junit.framework.TestCase; import junit.textui.TestRunner; /** - * + * */ public class VersionTest extends TestCase { @@ -37,7 +37,7 @@ public class VersionTest extends TestCase { /** * Constructor for MessageTest. - * + * * @param name */ public VersionTest(String name) { diff --git a/bridge/src/test/java/org/aspectj/bridge/context/CompilationAndWeavingContextTest.java b/bridge/src/test/java/org/aspectj/bridge/context/CompilationAndWeavingContextTest.java index 825a52b61..fbb10e094 100644 --- a/bridge/src/test/java/org/aspectj/bridge/context/CompilationAndWeavingContextTest.java +++ b/bridge/src/test/java/org/aspectj/bridge/context/CompilationAndWeavingContextTest.java @@ -1,12 +1,12 @@ /* ******************************************************************* * Copyright (c) 2005 Contributors. - * 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://eclipse.org/legal/epl-v10.html - * - * Contributors: + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: * Adrian Colyer Initial implementation * ******************************************************************/ package org.aspectj.bridge.context; @@ -23,45 +23,45 @@ public class CompilationAndWeavingContextTest extends TestCase { CompilationAndWeavingContext.enteringPhase(1,"XYZ"); assertEquals("when fiddling XYZ\n",CompilationAndWeavingContext.getCurrentContext()); } - + public void testDoubleEntry() { CompilationAndWeavingContext.enteringPhase(1,"XYZ"); CompilationAndWeavingContext.enteringPhase(2, "ABC"); - assertEquals("when mucking about with ABC\nwhen fiddling XYZ\n",CompilationAndWeavingContext.getCurrentContext()); + assertEquals("when mucking about with ABC\nwhen fiddling XYZ\n",CompilationAndWeavingContext.getCurrentContext()); } - + public void testEntryEntryExit() { CompilationAndWeavingContext.enteringPhase(1,"XYZ"); ContextToken ct = CompilationAndWeavingContext.enteringPhase(2, "ABC"); CompilationAndWeavingContext.leavingPhase(ct); - assertEquals("when fiddling XYZ\n",CompilationAndWeavingContext.getCurrentContext()); + assertEquals("when fiddling XYZ\n",CompilationAndWeavingContext.getCurrentContext()); } - + public void testEntryExitTop() { ContextToken ct = CompilationAndWeavingContext.enteringPhase(1,"XYZ"); CompilationAndWeavingContext.enteringPhase(2, "ABC"); CompilationAndWeavingContext.leavingPhase(ct); - assertEquals("",CompilationAndWeavingContext.getCurrentContext()); + assertEquals("",CompilationAndWeavingContext.getCurrentContext()); } - + protected void setUp() throws Exception { CompilationAndWeavingContext.reset(); CompilationAndWeavingContext.registerFormatter(1, new MyContextFormatter("fiddling ")); CompilationAndWeavingContext.registerFormatter(2, new MyContextFormatter("mucking about with ")); } - + private static class MyContextFormatter implements ContextFormatter { private String prefix; - + public MyContextFormatter(String prefix) { this.prefix = prefix; } - + public String formatEntry(int phaseId, Object data) { return prefix + data.toString(); } - + } } |