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 /testing-util | |
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 'testing-util')
5 files changed, 46 insertions, 46 deletions
diff --git a/testing-util/src/main/java/org/aspectj/testing/util/TestUtil.java b/testing-util/src/main/java/org/aspectj/testing/util/TestUtil.java index 51c940277..a6f8303ce 100644 --- a/testing-util/src/main/java/org/aspectj/testing/util/TestUtil.java +++ b/testing-util/src/main/java/org/aspectj/testing/util/TestUtil.java @@ -2,9 +2,9 @@ * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). * All rights reserved. * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 + * 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 @@ -540,7 +540,7 @@ public final class TestUtil { File expectedFile = new File(expectedBaseDir, path); return doSameFile(handler, expectedBaseDir, actualBaseDir, expectedFile, actualFile); } - + public static String disassembleClass(File basedir, File file) { String basedirPath = FileUtil.normalizedPath(basedir); String name = FileUtil.fileToClassName(basedir, file); @@ -555,7 +555,7 @@ public final class TestUtil { throw new IllegalStateException(t); } } - + public static List<String> toLines(String inputString) { List<String> lines = new ArrayList<>(); try (BufferedReader br = new BufferedReader(new StringReader(inputString))) { @@ -568,11 +568,11 @@ public final class TestUtil { } return lines; } - + public static String toString(List<String> lines) { return String.join("\n", lines); } - + private static int longestLine(List<String> lines) { int longest = -1; for (String line: lines) { diff --git a/testing-util/src/test/java/org/aspectj/testingutil/TestCompareClassFile.java b/testing-util/src/test/java/org/aspectj/testingutil/TestCompareClassFile.java index fb3e4dbe0..ecc2d2c9c 100644 --- a/testing-util/src/test/java/org/aspectj/testingutil/TestCompareClassFile.java +++ b/testing-util/src/test/java/org/aspectj/testingutil/TestCompareClassFile.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/testing-util/src/test/java/org/aspectj/testingutil/TestUtilTest.java b/testing-util/src/test/java/org/aspectj/testingutil/TestUtilTest.java index 6b791da43..f9f5bd5b6 100644 --- a/testing-util/src/test/java/org/aspectj/testingutil/TestUtilTest.java +++ b/testing-util/src/test/java/org/aspectj/testingutil/TestUtilTest.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.testingutil; @@ -24,20 +24,20 @@ import org.aspectj.util.FileUtil; import org.aspectj.testing.util.TestUtil; /** - * + * */ public class TestUtilTest extends TestCase { public TestUtilTest(String name) { super(name); } - + public void testFileCompareNonClass() throws IOException { MessageHandler holder = new MessageHandler(); File thisFile = new File(UtilTests.TESTING_UTIL_PATH + "/src/test/java/org/aspectj/testingutil/TestUtilTest.java"); //File thisFile = new File("src/testing-util.lst"); assertTrue(TestUtil.sameFiles(holder, thisFile, thisFile)); - + File tempFile = File.createTempFile("TestUtilTest", ".tmp"); FileUtil.copyFile(thisFile, tempFile); long len = tempFile.length(); @@ -47,7 +47,7 @@ public class TestUtilTest extends TestCase { assertTrue(TestUtil.sameFiles(holder, tempFile, thisFile)); try { String path = thisFile.getName(); - File basedir = tempFile.getParentFile(); + File basedir = tempFile.getParentFile(); File renamed = new File(basedir, path); if (!tempFile.renameTo(renamed)) { MessageUtil.warn(holder, "unable to rename " + tempFile + " to " + renamed); @@ -123,7 +123,7 @@ public class TestUtilTest extends TestCase { fail = true; } } - + } public void testFileCompareClass() throws IOException { @@ -135,7 +135,7 @@ public class TestUtilTest extends TestCase { File classBase = new File(UtilTests.TESTING_UTIL_PATH + "/testdata/testCompareClassFiles"); String path = "org/aspectj/testingutil/TestCompareClassFile.class"; File classFile = new File(classBase, path); - + try { assertTrue(TestUtil.sameFiles(holder, classFile, classFile)); assertTrue(TestUtil.sameFiles(holder, classBase, classBase, path)); @@ -145,5 +145,5 @@ public class TestUtilTest extends TestCase { } } } - + } diff --git a/testing-util/src/test/java/org/aspectj/testingutil/TestingUtilModuleTests.java b/testing-util/src/test/java/org/aspectj/testingutil/TestingUtilModuleTests.java index ee55b0ff1..95309c171 100644 --- a/testing-util/src/test/java/org/aspectj/testingutil/TestingUtilModuleTests.java +++ b/testing-util/src/test/java/org/aspectj/testingutil/TestingUtilModuleTests.java @@ -1,15 +1,15 @@ package org.aspectj.testingutil; /* ******************************************************************* - * 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 * ******************************************************************/ @@ -21,11 +21,11 @@ import junit.framework.TestSuite; public class TestingUtilModuleTests extends TestCase { - public static Test suite() { + public static Test suite() { TestSuite suite = new TestSuite(TestingUtilModuleTests.class.getName()); suite.addTestSuite(TestUtilTest.class); return suite; } public TestingUtilModuleTests(String name) { super(name); } -} +} diff --git a/testing-util/src/test/java/org/aspectj/testingutil/UtilTests.java b/testing-util/src/test/java/org/aspectj/testingutil/UtilTests.java index b2bbc27fb..9331b6ee9 100644 --- a/testing-util/src/test/java/org/aspectj/testingutil/UtilTests.java +++ b/testing-util/src/test/java/org/aspectj/testingutil/UtilTests.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.testingutil; @@ -17,7 +17,7 @@ import junit.framework.*; public class UtilTests extends TestCase { public static final String TESTING_UTIL_PATH = "../testing-util"; - public static Test suite() { + public static Test suite() { TestSuite suite = new TestSuite(UtilTests.class.getName()); // for now, do not include SuiteTest because it would take 15 minutes //$JUnit-BEGIN$ @@ -28,5 +28,5 @@ public class UtilTests extends TestCase { public UtilTests(String name) { super(name); } -} +} |