From f2c851eb5c26f066fdd1ba471059155153662be2 Mon Sep 17 00:00:00 2001 From: Matthew Justin Date: Sat, 28 Aug 2021 22:16:49 -0500 Subject: [PATCH 1/3] Fix Java SE 5-7 URLs; Fix Paranamer Javadoc file reference --- .../com/thoughtworks/paranamer/JavadocParanamerTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/paranamer/src/test/com/thoughtworks/paranamer/JavadocParanamerTest.java b/paranamer/src/test/com/thoughtworks/paranamer/JavadocParanamerTest.java index d6d75fc..de59e20 100644 --- a/paranamer/src/test/com/thoughtworks/paranamer/JavadocParanamerTest.java +++ b/paranamer/src/test/com/thoughtworks/paranamer/JavadocParanamerTest.java @@ -53,9 +53,9 @@ public class JavadocParanamerTest extends AbstractParanamerTestCase { private static final String JAVADOCS_3 = "http://docs.oracle.com/javase/1.3/docs/api/"; private static final String JAVADOCS_4 = "http://docs.oracle.com/javase/1.4.2/docs/api/"; - private static final String JAVADOCS_5 = "http://docs.oracle.com/javase/1.5.0/docs/api/"; - private static final String JAVADOCS_6 = "http://docs.oracle.com/javase/6/docs/api/"; - private static final String JAVADOCS_7 = "http://docs.oracle.com/javase/7/docs/api/"; + private static final String JAVADOCS_5 = "https://docs.oracle.com/javase/1.5.0/docs/api/"; + private static final String JAVADOCS_6 = "https://docs.oracle.com/javase/6/docs/api/"; + private static final String JAVADOCS_7 = "https://docs.oracle.com/javase/7/docs/api/"; private static final String JAVADOCS_F2J = "http://icl.cs.utk.edu/projectsfiles/f2j/javadoc/"; private static final String JAVADOCS_F2J_FILE = "paranamer/target/test-data/arpack_combined_all-0.1-javadoc.jar"; @@ -70,7 +70,7 @@ public class JavadocParanamerTest extends AbstractParanamerTestCase { private static final String JAVADOCS_6_PARTIAL_ZIP = "paranamer/src/resources/javadocs/jdk6.zip"; private static final String JAVADOCS_7_PARTIAL_ZIP = "paranamer/src/resources/javadocs/jdk7.zip"; - private static final String JAVADOCS_PARANAMER_FILE = "paranamer/target/test-data/paranamer-2.5.5-javadoc.jar"; + private static final String JAVADOCS_PARANAMER_FILE = "paranamer/target/test-data/paranamer-2.8-javadoc.jar"; @Before public void setUp() throws Exception { From 442f27cd4b3cdccfc1311737c72f5fdeb657e7e0 Mon Sep 17 00:00:00 2001 From: Matthew Justin Date: Sat, 28 Aug 2021 23:21:44 -0500 Subject: [PATCH 2/3] Ignore tests with non-trivial fixes --- .../paranamer/JavadocParanamerTest.java | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/paranamer/src/test/com/thoughtworks/paranamer/JavadocParanamerTest.java b/paranamer/src/test/com/thoughtworks/paranamer/JavadocParanamerTest.java index de59e20..3e0ed79 100644 --- a/paranamer/src/test/com/thoughtworks/paranamer/JavadocParanamerTest.java +++ b/paranamer/src/test/com/thoughtworks/paranamer/JavadocParanamerTest.java @@ -51,8 +51,8 @@ */ public class JavadocParanamerTest extends AbstractParanamerTestCase { - private static final String JAVADOCS_3 = "http://docs.oracle.com/javase/1.3/docs/api/"; - private static final String JAVADOCS_4 = "http://docs.oracle.com/javase/1.4.2/docs/api/"; + private static final String JAVADOCS_3 = "https://docs.oracle.com/javase/1.3/docs/api/"; + private static final String JAVADOCS_4 = "https://docs.oracle.com/javase/1.4.2/docs/api/"; private static final String JAVADOCS_5 = "https://docs.oracle.com/javase/1.5.0/docs/api/"; private static final String JAVADOCS_6 = "https://docs.oracle.com/javase/6/docs/api/"; private static final String JAVADOCS_7 = "https://docs.oracle.com/javase/7/docs/api/"; @@ -89,6 +89,20 @@ public void testLookupParameterNamesForMethodWhenNoArg() throws Exception { public void testLookupParameterNamesForPrivateMethod() throws Exception { } + @Test + @Ignore("no longer working working with currently generated Javadocs") + @Override + public void testLookupParameterNamesForConstructorWithStringArg() throws Exception { + super.testLookupParameterNamesForConstructorWithStringArg(); + } + + @Test + @Ignore("no longer working working with currently generated Javadocs") + @Override + public void testLookupParameterNamesForInterfaceMethod() throws Exception { + super.testLookupParameterNamesForInterfaceMethod(); + } + @Test(expected = FileNotFoundException.class) public void failsIfBadInput() throws Exception { new JavadocParanamer(new URL(JAVADOCS_7 + "/DOES_NOT_EXIST")); @@ -105,6 +119,7 @@ public void failsIfNotAJavadocDirectory() throws Exception { } @Test + @Ignore("these files are no longer in the repo for license reasons") public void dirParanamer() throws Exception { testJavaIoFile(JAVADOCS_4_PARTIAL_DIR); testJavaIoFile(JAVADOCS_5_PARTIAL_DIR); @@ -113,6 +128,7 @@ public void dirParanamer() throws Exception { } @Test + @Ignore("these files are no longer in the repo for license reasons") public void fileParanamer() throws Exception { testJavaIoFile(JAVADOCS_4_PARTIAL_ZIP); testJavaIoFile(JAVADOCS_5_PARTIAL_ZIP); @@ -121,11 +137,13 @@ public void fileParanamer() throws Exception { } @Test + @Ignore("Java 3 Javadocs are no longer hosted by Oracle except as downloadable archive") public void javadocs3() throws Exception { testJavaUtilUrl(JAVADOCS_3); } @Test + @Ignore("Java 4 Javadocs are no longer hosted by Oracle except as downloadable archive") public void javadocs4() throws Exception { testJavaUtilUrl(JAVADOCS_4); } From 2444fa410c119fe2f488b4ff58a7675d78cfd620 Mon Sep 17 00:00:00 2001 From: Matthew Justin Date: Sun, 29 Aug 2021 02:14:03 -0500 Subject: [PATCH 3/3] Don't depend on artifact version number in test --- paranamer/pom.xml | 1 + .../test/com/thoughtworks/paranamer/JavadocParanamerTest.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/paranamer/pom.xml b/paranamer/pom.xml index 60d6115..ff31d93 100755 --- a/paranamer/pom.xml +++ b/paranamer/pom.xml @@ -102,6 +102,7 @@ arpack_combined_all,${project.artifactId} true ${project.build.directory}/test-data + true diff --git a/paranamer/src/test/com/thoughtworks/paranamer/JavadocParanamerTest.java b/paranamer/src/test/com/thoughtworks/paranamer/JavadocParanamerTest.java index 3e0ed79..ed630ba 100644 --- a/paranamer/src/test/com/thoughtworks/paranamer/JavadocParanamerTest.java +++ b/paranamer/src/test/com/thoughtworks/paranamer/JavadocParanamerTest.java @@ -58,7 +58,7 @@ public class JavadocParanamerTest extends AbstractParanamerTestCase { private static final String JAVADOCS_7 = "https://docs.oracle.com/javase/7/docs/api/"; private static final String JAVADOCS_F2J = "http://icl.cs.utk.edu/projectsfiles/f2j/javadoc/"; - private static final String JAVADOCS_F2J_FILE = "paranamer/target/test-data/arpack_combined_all-0.1-javadoc.jar"; + private static final String JAVADOCS_F2J_FILE = "paranamer/target/test-data/arpack_combined_all-javadoc.jar"; private static final String JAVADOCS_4_PARTIAL_DIR = "paranamer/src/resources/javadocs/jdk1.4/docs"; private static final String JAVADOCS_5_PARTIAL_DIR = "paranamer/src/resources/javadocs/jdk5/docs"; @@ -70,7 +70,7 @@ public class JavadocParanamerTest extends AbstractParanamerTestCase { private static final String JAVADOCS_6_PARTIAL_ZIP = "paranamer/src/resources/javadocs/jdk6.zip"; private static final String JAVADOCS_7_PARTIAL_ZIP = "paranamer/src/resources/javadocs/jdk7.zip"; - private static final String JAVADOCS_PARANAMER_FILE = "paranamer/target/test-data/paranamer-2.8-javadoc.jar"; + private static final String JAVADOCS_PARANAMER_FILE = "paranamer/target/test-data/paranamer-javadoc.jar"; @Before public void setUp() throws Exception {