aboutsummaryrefslogtreecommitdiffstats
path: root/tests/profiling
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 /tests/profiling
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 'tests/profiling')
-rw-r--r--tests/profiling/build.xml4
-rw-r--r--tests/profiling/ltw-app/src/org/aspectj/profiling/LTWApp.java32
-rw-r--r--tests/profiling/shadows.xml22
-rw-r--r--tests/profiling/spacewar.xml24
-rw-r--r--tests/profiling/spring-1.2.6.xml28
5 files changed, 55 insertions, 55 deletions
diff --git a/tests/profiling/build.xml b/tests/profiling/build.xml
index 45b411fe9..aa7db9d0e 100644
--- a/tests/profiling/build.xml
+++ b/tests/profiling/build.xml
@@ -5,9 +5,9 @@
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: Adrian Colyer
-->
diff --git a/tests/profiling/ltw-app/src/org/aspectj/profiling/LTWApp.java b/tests/profiling/ltw-app/src/org/aspectj/profiling/LTWApp.java
index a247fb10b..af538838c 100644
--- a/tests/profiling/ltw-app/src/org/aspectj/profiling/LTWApp.java
+++ b/tests/profiling/ltw-app/src/org/aspectj/profiling/LTWApp.java
@@ -1,12 +1,12 @@
/* *******************************************************************
* 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.profiling;
@@ -24,17 +24,17 @@ import java.util.zip.ZipInputStream;
* jar file, and performs Class.forName on every class within it.
*/
public class LTWApp {
-
+
private File inJar;
private int numLoaded = 0;
-
+
public static void main(String[] args) throws IOException {
if (args.length != 1) {
throw new IllegalArgumentException("Expecting a single jar file argument");
}
new LTWApp(args[0]).run();
}
-
+
public LTWApp(String jarFileName) {
inJar = new File(jarFileName);
if (!inJar.exists() || !inJar.canRead()) {
@@ -42,33 +42,33 @@ public class LTWApp {
"' does not exist or cannot be read");
}
}
-
+
public void run() throws IOException {
ZipInputStream inStream = new ZipInputStream(new FileInputStream(inJar));
long startTime = System.currentTimeMillis();
while (true) {
ZipEntry entry = inStream.getNextEntry();
if (entry == null) break;
-
+
if (entry.isDirectory() || !entry.getName().endsWith(".class")) {
continue;
}
-
+
loadClass(entry.getName());
}
long endTime = System.currentTimeMillis();
System.out.println("Loaded " + numLoaded + " classes in " + (endTime - startTime) + " milliseconds");
}
-
+
private void loadClass(String classFileName) {
String className = classFileName.substring(0,(classFileName.length() - ".class".length()));
className = className.replace('/','.');
try {
Class c = Class.forName(className);
- }
+ }
catch(ClassNotFoundException ex) {
throw new IllegalStateException("Unable to load class defined in input jar file, check that jar is also on the classpath!");
}
numLoaded++;
}
-} \ No newline at end of file
+}
diff --git a/tests/profiling/shadows.xml b/tests/profiling/shadows.xml
index e7358d8aa..61430b7b0 100644
--- a/tests/profiling/shadows.xml
+++ b/tests/profiling/shadows.xml
@@ -2,12 +2,12 @@
<!--
Copyright 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
+
+ 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
-->
@@ -16,21 +16,21 @@
<!-- imported by master build.xml when using the shadows
source tree as the basis for profiling the compiler -->
-
+
<target name="shadows-usage">
<echo message="this file contains only path definitions"/>
<echo message="these are used to customize the target application used by"/>
<echo message="the profiling tests. Set the target.application.definitions.file"/>
<echo message="property to point to your own replacement of this file to"/>
- <echo message="profile compilation of an alternate project"/>
+ <echo message="profile compilation of an alternate project"/>
</target>
-
+
<!-- any target.application.definitions.file must define the following paths:
* source.roots (used for from source and ajdt compilation tests)
* build.class.path (the class path needed to build the application)
it must also define the copy.source.files target needed by the ajdt build
-->
-
+
<!-- the source roots used for compilation. -->
<path id="source.roots">
<pathelement location="f:/workspaces/aspectj1/shadows.org.eclipse.jdt.core/antadapter"/>
@@ -44,7 +44,7 @@
<pathelement location="f:/workspaces/aspectj1/shadows.org.eclipse.jdt.core/model"/>
<pathelement location="f:/workspaces/aspectj1/shadows.org.eclipse.jdt.core/search"/>
</path>
-
+
<!-- the classpath needed for compilation -->
<path id="build.class.path">
<fileset dir="f:/workspaces/aspectj1/shadows.org.eclipse.jdt.core/lib">
diff --git a/tests/profiling/spacewar.xml b/tests/profiling/spacewar.xml
index c48c06273..6bfd15b68 100644
--- a/tests/profiling/spacewar.xml
+++ b/tests/profiling/spacewar.xml
@@ -2,12 +2,12 @@
<!--
Copyright 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
+
+ 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
-->
@@ -16,26 +16,26 @@
<!-- imported by master build.xml when using the spacewar
source tree as the basis for profiling the compiler -->
-
+
<target name="spacewar-usage">
<echo message="this file contains only path definitions"/>
<echo message="these are used to customize the target application used by"/>
<echo message="the profiling tests. Set the target.application.definitions.file"/>
<echo message="property to point to your own replacement of this file to"/>
- <echo message="profile compilation of an alternate project"/>
+ <echo message="profile compilation of an alternate project"/>
</target>
-
+
<!-- any target.application.definitions.file must define the following paths:
* source.roots (used for from source and ajdt compilation tests)
* build.class.path (the class path needed to build the application)
it must also define the copy.source.files target needed by the ajdt build
-->
-
+
<!-- the source roots used for compilation. -->
<path id="source.roots">
<pathelement location="../../ajdoc/testdata/spacewar"/>
</path>
-
+
<!-- the classpath needed for compilation -->
<path id="build.class.path">
</path>
@@ -48,5 +48,5 @@
includes="**/*.java,**/*.aj"/-->
</copy>
</target>
-
+
</project>
diff --git a/tests/profiling/spring-1.2.6.xml b/tests/profiling/spring-1.2.6.xml
index 5b210ab17..f53196cf6 100644
--- a/tests/profiling/spring-1.2.6.xml
+++ b/tests/profiling/spring-1.2.6.xml
@@ -2,42 +2,42 @@
<!--
Copyright 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
+
+ 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
-->
<project name="spring-1.2.6" default="spring-1.2.6-usage">
- <!-- imported by master build.xml when using the springframework 1.2.6
+ <!-- imported by master build.xml when using the springframework 1.2.6
source tree as the basis for profiling the compiler -->
-
+
<target name="spring-1.2.6-usage">
<echo message="this file contains only path definitions"/>
<echo message="these are used to customize the target application used by"/>
<echo message="the profiling tests. Set the target.application.definitions.file"/>
<echo message="property to point to your own replacement of this file to"/>
- <echo message="profile compilation of an alternate project"/>
+ <echo message="profile compilation of an alternate project"/>
</target>
-
+
<!-- any target.application.definitions.file must define the following paths:
* source.roots (used for from source and ajdt compilation tests)
* build.class.path (the class path needed to build the application)
it must also define the copy.source.files target needed by the ajdt build
-->
-
+
<!-- the source roots used for compilation. -->
<path id="source.roots">
<pathelement location="${spring.install.dir}/src"/>
<pathelement location="${spring.install.dir}/tiger/src"/>
<pathelement location="${test.aspects.src.dir}"/>
</path>
-
+
<!-- the classpath needed for compilation -->
<path id="build.class.path">
<fileset dir="${spring.install.dir}">
@@ -58,5 +58,5 @@
includes="**/*.java,**/*.aj"/>
</copy>
</target>-->
-
-</project> \ No newline at end of file
+
+</project>