aboutsummaryrefslogtreecommitdiffstats
path: root/loadtime
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2021-06-04 07:58:52 +0700
committerAlexander Kriegisch <Alexander@Kriegisch.name>2021-06-04 07:58:52 +0700
commit49cb924f5402c9d24379ae1af62def6fa5892649 (patch)
tree69844405209043e2e18aa9eef0f01f287bc1ae52 /loadtime
parent82df3f0fc9842758f15f12299c9113e48f1ccb5c (diff)
downloadaspectj-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 'loadtime')
-rw-r--r--loadtime/src/main/java/org/aspectj/weaver/loadtime/Agent.java8
-rw-r--r--loadtime/src/main/java/org/aspectj/weaver/loadtime/Aj.java22
-rw-r--r--loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java6
-rw-r--r--loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassPreProcessor.java8
-rw-r--r--loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassPreProcessorAgentAdapter.java8
-rw-r--r--loadtime/src/main/java/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java70
-rw-r--r--loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultMessageHandler.java14
-rw-r--r--loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultWeavingContext.java10
-rw-r--r--loadtime/src/main/java/org/aspectj/weaver/loadtime/Options.java4
-rw-r--r--loadtime/src/main/java/org/aspectj/weaver/loadtime/WeavingURLClassLoader.java4
-rw-r--r--loadtime/src/test/java/org/aspectj/loadtime/LoadtimeModuleTests.java4
-rw-r--r--loadtime/src/test/java/org/aspectj/weaver/loadtime/AjTest.java8
-rw-r--r--loadtime/src/test/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptorTest.java10
-rw-r--r--loadtime/src/test/java/org/aspectj/weaver/loadtime/LoadtimeTest.java12
-rw-r--r--loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingContextTest.java44
-rw-r--r--loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingURLClassLoaderTest.java4
-rw-r--r--loadtime/src/test/java/org/aspectj/weaver/loadtime/test/DocumentParserTest.java4
-rw-r--r--loadtime/src/test/java/testdata/Apples.java4
-rw-r--r--loadtime/src/test/java/testdata/MessageService$$EnhancerByCGLIB$$6dd4e683.java4
-rw-r--r--loadtime/src/test/java/testdata/MySqlStatement.java6
-rw-r--r--loadtime/src/test/java/testdata/Oranges.java4
-rw-r--r--loadtime/src/test/java/testdata/sub/Apples.java4
-rw-r--r--loadtime/src/test/java/testdata/sub/Oranges.java4
23 files changed, 133 insertions, 133 deletions
diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/Agent.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/Agent.java
index 9669a2c9d..72c1862a7 100644
--- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/Agent.java
+++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/Agent.java
@@ -2,9 +2,9 @@
* 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
+ * under the terms of the Eclipse Public License v 2.0
* which accompanies this distribution and is available at
- * http://eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
*
* Contributors:
* Alexandre Vasseur initial implementation
@@ -21,7 +21,7 @@ import java.lang.instrument.Instrumentation;
* @author Alexandre Vasseur
* @author Alexander Kriegisch
*/
-public class Agent {
+public class Agent {
/**
* The instrumentation instance
@@ -37,7 +37,7 @@ public class Agent {
* JSR-163 preMain Agent entry method
*
* @param options
- * @param instrumentation
+ * @param instrumentation
*/
public static void premain(String options, Instrumentation instrumentation) {
/* Handle duplicate agents */
diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/Aj.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/Aj.java
index 110e0c062..f54a42d02 100644
--- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/Aj.java
+++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/Aj.java
@@ -2,9 +2,9 @@
* 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
+ * under the terms of the Eclipse Public License v 2.0
* which accompanies this distribution and is available at
- * http://eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
*
* Contributors:
* Alexandre Vasseur initial implementation
@@ -33,7 +33,7 @@ import org.aspectj.weaver.tools.cache.SimpleCacheFactory;
/**
* Adapter between the generic class pre processor interface and the AspectJ weaver Load time weaving consistency relies on
* Bcel.setRepository
- *
+ *
* @author Alexandre Vasseur (alex AT gnilux DOT com)
*/
public class Aj implements ClassPreProcessor {
@@ -50,7 +50,7 @@ public class Aj implements ClassPreProcessor {
private static Trace trace = TraceFactory.getTraceFactory().getTrace(Aj.class);
- public Aj() {
+ public Aj() {
this(null);
}
@@ -75,12 +75,12 @@ public class Aj implements ClassPreProcessor {
@Override
public byte[] preProcess(String className, byte[] bytes, ClassLoader loader, ProtectionDomain protectionDomain) {
- if (loader == null || className == null ||
+ if (loader == null || className == null ||
loader.getClass().getName().equals(deleLoader) || loader.getClass().getName().equals(deleLoader2)) {
// skip boot loader, null classes (hibernate), or those from a reflection loader
return bytes;
}
-
+
if (loadersToSkip != null) {
// Check whether to reject it
if (loadersToSkip.contains(loader.getClass().getName())) {
@@ -187,7 +187,7 @@ public class Aj implements ClassPreProcessor {
* The reference queue is only processed when a request is made for a weaver adaptor. This means there can be one or two stale
* weavers left around. If the user knows they have finished all their weaving, they might wish to call removeStaleAdaptors
* which will process anything left on the reference queue containing adaptorKeys for garbage collected classloaders.
- *
+ *
* @param displayProgress produce System.err info on the tidying up process
* @return number of stale weavers removed
*/
@@ -252,7 +252,7 @@ public class Aj implements ClassPreProcessor {
}
}
}
-
+
public static List<String> loadersToSkip = null;
static {
@@ -281,7 +281,7 @@ public class Aj implements ClassPreProcessor {
*/
static class WeaverContainer {
- final static Map<AdaptorKey,ExplicitlyInitializedClassLoaderWeavingAdaptor> weavingAdaptors =
+ final static Map<AdaptorKey,ExplicitlyInitializedClassLoaderWeavingAdaptor> weavingAdaptors =
Collections.synchronizedMap(new HashMap<>());
static WeavingAdaptor getWeaver(ClassLoader loader, IWeavingContext weavingContext) {
@@ -311,7 +311,7 @@ public class Aj implements ClassPreProcessor {
}
// perform the initialization
return adaptor.getWeavingAdaptor(loader, weavingContext);
-
+
}
private static final ClassLoader myClassLoader = WeavingAdaptor.class.getClassLoader();
@@ -352,7 +352,7 @@ public class Aj implements ClassPreProcessor {
/**
* Check to see if any classes have been generated for a particular classes loader. Calls
* ClassLoaderWeavingAdaptor.generatedClassesExist()
- *
+ *
* @param loader the class cloder
* @return true if classes have been generated.
*/
diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
index ca297eb6e..0f1d7baca 100644
--- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
+++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
@@ -2,9 +2,9 @@
* Copyright (c) 2005, 2017 Contributors.
* 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://eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
*******************************************************************************/
package org.aspectj.weaver.loadtime;
@@ -1181,4 +1181,4 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor {
// }
// }
-} \ No newline at end of file
+}
diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassPreProcessor.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassPreProcessor.java
index 97348b281..ab305cb32 100644
--- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassPreProcessor.java
+++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassPreProcessor.java
@@ -2,9 +2,9 @@
* Copyright (c) 2005,2018 Contributors.
* 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://eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
*******************************************************************************/
package org.aspectj.weaver.loadtime;
@@ -13,7 +13,7 @@ import java.security.ProtectionDomain;
/**
* Generic class pre processor interface that allows to separate the AspectJ 5 load time weaving from Java 5 JVMTI interfaces for
* further use on Java 1.3 / 1.4
- *
+ *
* @author Alexandre Vasseur
* @author Andy Clement
*/
@@ -27,4 +27,4 @@ public interface ClassPreProcessor {
byte[] preProcess(String className, byte[] bytes, ClassLoader classLoader, ProtectionDomain protectionDomain);
void prepareForRedefinition(ClassLoader loader, String className);
-} \ No newline at end of file
+}
diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassPreProcessorAgentAdapter.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassPreProcessorAgentAdapter.java
index a3201816a..2a778585e 100644
--- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassPreProcessorAgentAdapter.java
+++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassPreProcessorAgentAdapter.java
@@ -2,9 +2,9 @@
* Copyright (c) 2005,2018 Contributors.
* 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://eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
*******************************************************************************/
package org.aspectj.weaver.loadtime;
@@ -14,7 +14,7 @@ import java.security.ProtectionDomain;
/**
* Java 1.5 adapter for class pre processor
- *
+ *
* @author Alexandre Vasseur
* @author Andy Clement
*/
@@ -33,7 +33,7 @@ public class ClassPreProcessorAgentAdapter implements ClassFileTransformer {
/**
* Invokes the weaver to modify some set of input bytes.
- *
+ *
* @param loader the defining class loader
* @param className the name of class being loaded
* @param classBeingRedefined is set when hotswap is being attempted
diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java
index aa228804c..5816a0bc4 100644
--- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java
+++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java
@@ -1,11 +1,11 @@
/*******************************************************************************
* 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
- *
+ * 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:
* Alexandre Vasseur initial implementation
*******************************************************************************/
@@ -68,7 +68,7 @@ import org.aspectj.weaver.patterns.TypePattern;
* The concrete aspect is generated annotation style aspect (so traditional Java constructs annotated with our AspectJ annotations).
* As it is built during aop.xml definitions registration we perform the type munging for perclause, ie. aspectOf() artifact
* directly, instead of waiting for it to go thru the weaver (that we are in the middle of configuring).
- *
+ *
* @author Alexandre Vasseur
* @author Andy Clement
*/
@@ -109,7 +109,7 @@ public class ConcreteAspectCodeGen {
/**
* Create a new generator for a concrete aspect
- *
+ *
* @param concreteAspect the aspect definition
* @param world the related world (for type resolution, etc)
*/
@@ -120,7 +120,7 @@ public class ConcreteAspectCodeGen {
/**
* Checks that concrete aspect is valid.
- *
+ *
* @return true if ok, false otherwise
*/
public boolean validate() {
@@ -142,7 +142,7 @@ public class ConcreteAspectCodeGen {
isValid = true;
return true;
}
-
+
if (concreteAspect.declareAnnotations.size()!=0) {
isValid = true;
return true;
@@ -317,7 +317,7 @@ public class ConcreteAspectCodeGen {
/**
* Rebuild the XML snip that defines this concrete aspect, for log error purpose
- *
+ *
* @return string repr.
*/
private String stringify() {
@@ -359,7 +359,7 @@ public class ConcreteAspectCodeGen {
if (bytes != null) {
return bytes;
}
- PerClause.Kind perclauseKind = PerClause.SINGLETON;
+ PerClause.Kind perclauseKind = PerClause.SINGLETON;
PerClause parentPerClause = (parent != null ? parent.getPerClause() : null);
if (parentPerClause != null) {
perclauseKind = parentPerClause.getKind();
@@ -479,7 +479,7 @@ public class ConcreteAspectCodeGen {
adviceCounter++;
}
}
-
+
if (concreteAspect.declareAnnotations.size()>0) {
int decCounter = 1;
for (Definition.DeclareAnnotation da: concreteAspect.declareAnnotations) {
@@ -507,30 +507,30 @@ public class ConcreteAspectCodeGen {
}
/**
- * The DeclareAnnotation object encapsulates an method/field/type descriptor and an annotation. This uses a DeclareAnnotation object
- * captured from the XML (something like '<declare-annotation field="* field1(..)" annotation="@Annot(a='a',fred=false,'abc')"/>')
+ * The DeclareAnnotation object encapsulates an method/field/type descriptor and an annotation. This uses a DeclareAnnotation object
+ * captured from the XML (something like '<declare-annotation field="* field1(..)" annotation="@Annot(a='a',fred=false,'abc')"/>')
* and builds the same construct that would have existed if the code style variant was used. This involves creating a member upon
* which to hang the real annotation and then creating a classfile level attribute indicating a declare annotation is present
* (that includes the signature pattern and a pointer to the real member holding the annotation).
- *
+ *
*/
private void generateDeclareAnnotation(Definition.DeclareAnnotation da, int decCounter, LazyClassGen cg) {
-
+
// Here is an example member from a code style declare annotation:
//void ajc$declare_at_method_1();
// RuntimeInvisibleAnnotations: length = 0x6
- // 00 01 00 1B 00 00
+ // 00 01 00 1B 00 00
// RuntimeVisibleAnnotations: length = 0x15
// 00 01 00 1D 00 03 00 1E 73 00 1F 00 20 73 00 21
- // 00 22 73 00 23
+ // 00 22 73 00 23
// org.aspectj.weaver.MethodDeclarationLineNumber: length = 0x8
- // 00 00 00 02 00 00 00 16
+ // 00 00 00 02 00 00 00 16
// org.aspectj.weaver.AjSynthetic: length = 0x
- //
+ //
// Code:
// Stack=0, Locals=1, Args_size=1
// 0: return
-
+
// and at the class level a Declare attribute:
// org.aspectj.weaver.Declare: length = 0x51
// 05 00 00 00 03 01 00 05 40 41 6E 6E 6F 01 00 17
@@ -538,15 +538,15 @@ public class ConcreteAspectCodeGen {
// 65 74 68 6F 64 5F 31 01 01 00 00 00 00 05 05 00
// 08 73 61 79 48 65 6C 6C 6F 00 01 04 00 00 00 00
// 07 00 00 00 27 00 00 00 34 00 00 00 16 00 00 00
- // 3C
-
+ // 3C
+
AnnotationAJ constructedAnnotation = buildDeclareAnnotation_actualAnnotation(cg, da);
if (constructedAnnotation==null) {
return; // error occurred (and was reported), do not continue
}
- String nameComponent = da.declareAnnotationKind.name().toLowerCase();
- String declareName = new StringBuilder("ajc$declare_at_").append(nameComponent).append("_").append(decCounter).toString();
+ String nameComponent = da.declareAnnotationKind.name().toLowerCase();
+ String declareName = new StringBuilder("ajc$declare_at_").append(nameComponent).append("_").append(decCounter).toString();
LazyMethodGen declareMethod = new LazyMethodGen(Modifier.PUBLIC, Type.VOID, declareName, Type.NO_ARGS, EMPTY_STRINGS, cg);
InstructionList declareMethodBody = declareMethod.getBody();
declareMethodBody.append(InstructionFactory.RETURN);
@@ -556,14 +556,14 @@ public class ConcreteAspectCodeGen {
ITokenSource tokenSource = BasicTokenSource.makeTokenSource(da.pattern,null);
PatternParser pp = new PatternParser(tokenSource);
- if (da.declareAnnotationKind==DeclareAnnotationKind.Method || da.declareAnnotationKind==DeclareAnnotationKind.Field) {
+ if (da.declareAnnotationKind==DeclareAnnotationKind.Method || da.declareAnnotationKind==DeclareAnnotationKind.Field) {
ISignaturePattern isp = (da.declareAnnotationKind==DeclareAnnotationKind.Method?pp.parseCompoundMethodOrConstructorSignaturePattern(true):pp.parseCompoundFieldSignaturePattern());
deca = new DeclareAnnotation(da.declareAnnotationKind==DeclareAnnotationKind.Method?DeclareAnnotation.AT_METHOD:DeclareAnnotation.AT_FIELD, isp);
- } else if (da.declareAnnotationKind==DeclareAnnotationKind.Type) {
+ } else if (da.declareAnnotationKind==DeclareAnnotationKind.Type) {
TypePattern tp = pp.parseTypePattern();
deca = new DeclareAnnotation(DeclareAnnotation.AT_TYPE,tp);
}
-
+
deca.setAnnotationMethod(declareName);
deca.setAnnotationString(da.annotation);
AjAttribute attribute = new AjAttribute.DeclareAttribute(deca);
@@ -583,7 +583,7 @@ public class ConcreteAspectCodeGen {
return bcelAnnotation;
}
}
-
+
// TODO support array values
// TODO support annotation values
/**
@@ -760,7 +760,7 @@ public class ConcreteAspectCodeGen {
return aaj;
}
}
-
+
private AnnotationGen buildBaseAnnotationType(ConstantPool cp,World world, String typename) {
String annoname = typename;
if (annoname.startsWith("@")) {
@@ -778,11 +778,11 @@ public class ConcreteAspectCodeGen {
List<NameValuePair> elems = new ArrayList<>();
return new AnnotationGen(new ObjectType(annoname), elems, true, cp);
}
-
+
/**
- * Construct the annotation that indicates this is a declare
+ * Construct the annotation that indicates this is a declare
*/
-
+
/**
* The PointcutAndAdvice object encapsulates an advice kind, a pointcut and names a Java method in a particular class. Generate
* an annotation style advice that has that pointcut whose implementation delegates to the Java method.
@@ -976,7 +976,7 @@ public class ConcreteAspectCodeGen {
/**
* Error reporting
- *
+ *
* @param message
*/
private void reportError(String message) {
diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultMessageHandler.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultMessageHandler.java
index 6b38fab9a..dfdcb6438 100644
--- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultMessageHandler.java
+++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultMessageHandler.java
@@ -1,11 +1,11 @@
/*******************************************************************************
* 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
- *
+ * 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:
* Alexandre Vasseur initial implementation
*******************************************************************************/
@@ -34,7 +34,7 @@ public class DefaultMessageHandler implements IMessageHandler {
* to use stderr instead of stdout to allow improvements to LTW tests.
* Currently many pass whether or not LTW occurs because they are
* already woven. Some changed to check for appropriate weaving messages
- * as well as absence of warnings or errors.
+ * as well as absence of warnings or errors.
*/
return SYSTEM_ERR.handleMessage(message);
// if (message.getKind().isSameOrLessThan(IMessage.INFO)) {
diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultWeavingContext.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultWeavingContext.java
index 5117a95b2..d2d8b02bd 100644
--- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultWeavingContext.java
+++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultWeavingContext.java
@@ -2,9 +2,9 @@
* 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
+ * under the terms of the Eclipse Public License v 2.0
* which accompanies this distribution and is available at
- * http://eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
*
* Contributors:
* David Knibb initial implementation
@@ -24,7 +24,7 @@ import org.aspectj.weaver.tools.WeavingAdaptor;
/**
* Use in non-OSGi environment
- *
+ *
* @author David Knibb
*/
public class DefaultWeavingContext implements IWeavingContext {
@@ -36,7 +36,7 @@ public class DefaultWeavingContext implements IWeavingContext {
/**
* Construct a new WeavingContext to use the specified ClassLoader This is the constructor which should be used.
- *
+ *
* @param loader
*/
public DefaultWeavingContext(ClassLoader loader) {
@@ -118,7 +118,7 @@ public class DefaultWeavingContext implements IWeavingContext {
/**
* Simply call weaving adaptor back to parse aop.xml
- *
+ *
* @param adaptor
* @param loader
*/
diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/Options.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/Options.java
index 1577ffc21..0c8abb12b 100644
--- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/Options.java
+++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/Options.java
@@ -2,9 +2,9 @@
* 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
+ * under the terms of the Eclipse Public License v 2.0
* which accompanies this distribution and is available at
- * http://eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
*
* Contributors:
* Alexandre Vasseur initial implementation
diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/WeavingURLClassLoader.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/WeavingURLClassLoader.java
index f0773c0ed..6334120f1 100644
--- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/WeavingURLClassLoader.java
+++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/WeavingURLClassLoader.java
@@ -2,9 +2,9 @@
* 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
+ * 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, Adrian Colyer,
diff --git a/loadtime/src/test/java/org/aspectj/loadtime/LoadtimeModuleTests.java b/loadtime/src/test/java/org/aspectj/loadtime/LoadtimeModuleTests.java
index 352156f82..ffdcf8212 100644
--- a/loadtime/src/test/java/org/aspectj/loadtime/LoadtimeModuleTests.java
+++ b/loadtime/src/test/java/org/aspectj/loadtime/LoadtimeModuleTests.java
@@ -2,9 +2,9 @@
* Copyright (c) 2005-2019 Contributors.
* 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://eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
*******************************************************************************/
package org.aspectj.loadtime;
diff --git a/loadtime/src/test/java/org/aspectj/weaver/loadtime/AjTest.java b/loadtime/src/test/java/org/aspectj/weaver/loadtime/AjTest.java
index d8f8fa85a..03e17d25a 100644
--- a/loadtime/src/test/java/org/aspectj/weaver/loadtime/AjTest.java
+++ b/loadtime/src/test/java/org/aspectj/weaver/loadtime/AjTest.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
*******************************************************************************/
diff --git a/loadtime/src/test/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptorTest.java b/loadtime/src/test/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptorTest.java
index 77603e12c..4bd7e1d1f 100644
--- a/loadtime/src/test/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptorTest.java
+++ b/loadtime/src/test/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptorTest.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
*******************************************************************************/
@@ -703,4 +703,4 @@ public class ClassLoaderWeavingAdaptorTest extends TestCase {
}
}
-// --- testclasses and aspects --- \ No newline at end of file
+// --- testclasses and aspects ---
diff --git a/loadtime/src/test/java/org/aspectj/weaver/loadtime/LoadtimeTest.java b/loadtime/src/test/java/org/aspectj/weaver/loadtime/LoadtimeTest.java
index 94fae75e2..0d2dca4f7 100644
--- a/loadtime/src/test/java/org/aspectj/weaver/loadtime/LoadtimeTest.java
+++ b/loadtime/src/test/java/org/aspectj/weaver/loadtime/LoadtimeTest.java
@@ -1,10 +1,10 @@
/* *******************************************************************
* Copyright (c) 2005-2019 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
+ * 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
* ******************************************************************/
package org.aspectj.weaver.loadtime;
@@ -18,7 +18,7 @@ import junit.framework.TestCase;
*/
public class LoadtimeTest extends TestCase {
- public void testPremain() throws Exception {
+ public void testPremain() throws Exception {
Class<?>[] paramTypes = {String.class, Instrumentation.class };
assertNotNull(Agent.class.getMethod("premain", paramTypes));
}
diff --git a/loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingContextTest.java b/loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingContextTest.java
index 98ecf1bae..591cec56a 100644
--- a/loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingContextTest.java
+++ b/loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingContextTest.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
*******************************************************************************/
@@ -24,7 +24,7 @@ import junit.framework.TestCase;
public class WeavingContextTest extends TestCase {
private boolean called;
-
+
public void testWeavingContext() {
URLClassLoader loader = new URLClassLoader(new URL[] {},null);
IWeavingContext context = new TestWeavingContext(loader);
@@ -40,11 +40,11 @@ public class WeavingContextTest extends TestCase {
called = true;
return super.getResources(name);
}
-
+
};
ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor();
adaptor.initialize(loader,context);
-
+
assertTrue("IWeavingContext not called",called);
}
@@ -55,7 +55,7 @@ public class WeavingContextTest extends TestCase {
public String getBundleIdFromURL(URL url) {
throw new UnsupportedOperationException();
}
-
+
};
ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor();
try {
@@ -74,11 +74,11 @@ public class WeavingContextTest extends TestCase {
called = true;
return super.getClassLoaderName();
}
-
+
};
ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor();
adaptor.initialize(loader,context);
-
+
assertTrue("IWeavingContext not called",called);
}
@@ -92,11 +92,11 @@ public class WeavingContextTest extends TestCase {
called = true;
return super.getFile(url);
}
-
+
};
ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor();
adaptor.initialize(loader,context);
-
+
assertTrue("IWeavingContext not called",called);
}
@@ -110,11 +110,11 @@ public class WeavingContextTest extends TestCase {
called = true;
return super.getId();
}
-
+
};
ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor();
adaptor.initialize(loader,context);
-
+
assertTrue("IWeavingContext not called",called);
}
@@ -128,22 +128,22 @@ public class WeavingContextTest extends TestCase {
called = true;
return super.getDefinitions(loader,adaptor);
}
-
+
};
ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor();
adaptor.initialize(loader,context);
-
+
assertTrue("getDefinitions not called",called);
}
-
+
private static class TestWeavingContext implements IWeavingContext {
private ClassLoader loader;
-
+
public TestWeavingContext (ClassLoader classLoader) {
this.loader = classLoader;
}
-
+
public String getBundleIdFromURL(URL url) {
return null;
}
@@ -151,7 +151,7 @@ public class WeavingContextTest extends TestCase {
public String getClassLoaderName() {
return "ClassLoaderName";
}
-
+
public ClassLoader getClassLoader() { return this.loader;}
public String getFile(URL url) {
@@ -177,7 +177,7 @@ public class WeavingContextTest extends TestCase {
if (parent != null) {
URL parentURL = parent.getResource(asResource);
if (localURL.equals(parentURL)) isLocallyDefined = false;
- }
+ }
return isLocallyDefined;
}
@@ -191,5 +191,5 @@ public class WeavingContextTest extends TestCase {
this.called = false;
}
-
+
}
diff --git a/loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingURLClassLoaderTest.java b/loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingURLClassLoaderTest.java
index e540ae09b..612b3c29a 100644
--- a/loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingURLClassLoaderTest.java
+++ b/loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingURLClassLoaderTest.java
@@ -2,9 +2,9 @@
* 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
+ * 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/loadtime/src/test/java/org/aspectj/weaver/loadtime/test/DocumentParserTest.java b/loadtime/src/test/java/org/aspectj/weaver/loadtime/test/DocumentParserTest.java
index b0b55d725..25444b5d9 100644
--- a/loadtime/src/test/java/org/aspectj/weaver/loadtime/test/DocumentParserTest.java
+++ b/loadtime/src/test/java/org/aspectj/weaver/loadtime/test/DocumentParserTest.java
@@ -2,9 +2,9 @@
* 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
+ * under the terms of the Eclipse Public License v 2.0
* which accompanies this distribution and is available at
- * http://eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
*
* Contributors:
* Alexandre Vasseur initial implementation
diff --git a/loadtime/src/test/java/testdata/Apples.java b/loadtime/src/test/java/testdata/Apples.java
index 2d216c1ea..e38d837a8 100644
--- a/loadtime/src/test/java/testdata/Apples.java
+++ b/loadtime/src/test/java/testdata/Apples.java
@@ -2,9 +2,9 @@
* Copyright (c) 2009 Contributors.
* 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://eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
*
* Contributors:
* Andy Clement
diff --git a/loadtime/src/test/java/testdata/MessageService$$EnhancerByCGLIB$$6dd4e683.java b/loadtime/src/test/java/testdata/MessageService$$EnhancerByCGLIB$$6dd4e683.java
index 4efd665eb..ee529eeb5 100644
--- a/loadtime/src/test/java/testdata/MessageService$$EnhancerByCGLIB$$6dd4e683.java
+++ b/loadtime/src/test/java/testdata/MessageService$$EnhancerByCGLIB$$6dd4e683.java
@@ -2,9 +2,9 @@
* Copyright (c) 2009 Contributors.
* 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://eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
*
* Contributors:
* Andy Clement
diff --git a/loadtime/src/test/java/testdata/MySqlStatement.java b/loadtime/src/test/java/testdata/MySqlStatement.java
index 3f7048610..523cc4d5d 100644
--- a/loadtime/src/test/java/testdata/MySqlStatement.java
+++ b/loadtime/src/test/java/testdata/MySqlStatement.java
@@ -2,9 +2,9 @@
* Copyright (c) 2009 Contributors.
* 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://eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
*
* Contributors:
* Andy Clement
@@ -167,7 +167,7 @@ public abstract class MySqlStatement implements Statement {
public void setPoolable(boolean poolable) throws SQLException {
// TODO Auto-generated method stub
-
+
}
public boolean isWrapperFor(Class<?> iface) throws SQLException {
diff --git a/loadtime/src/test/java/testdata/Oranges.java b/loadtime/src/test/java/testdata/Oranges.java
index d634bb8db..0aadfdd71 100644
--- a/loadtime/src/test/java/testdata/Oranges.java
+++ b/loadtime/src/test/java/testdata/Oranges.java
@@ -2,9 +2,9 @@
* Copyright (c) 2009 Contributors.
* 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://eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
*
* Contributors:
* Andy Clement
diff --git a/loadtime/src/test/java/testdata/sub/Apples.java b/loadtime/src/test/java/testdata/sub/Apples.java
index 6f666892f..e80a1fe4b 100644
--- a/loadtime/src/test/java/testdata/sub/Apples.java
+++ b/loadtime/src/test/java/testdata/sub/Apples.java
@@ -2,9 +2,9 @@
* Copyright (c) 2009 Contributors.
* 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://eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
*
* Contributors:
* Andy Clement
diff --git a/loadtime/src/test/java/testdata/sub/Oranges.java b/loadtime/src/test/java/testdata/sub/Oranges.java
index f1828c001..e53a54f52 100644
--- a/loadtime/src/test/java/testdata/sub/Oranges.java
+++ b/loadtime/src/test/java/testdata/sub/Oranges.java
@@ -2,9 +2,9 @@
* Copyright (c) 2009 Contributors.
* 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://eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
*
* Contributors:
* Andy Clement