# HG changeset patch # User jjg # Date 1398214660 25200 # Node ID e7549dcbc4af72d1b5c225b2239f1028155a5eac # Parent b0845717434e3925d887bb786e1d77805d8a7165 8040903: Clean up use of BUG_ID in javadoc tests Reviewed-by: ksrini diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/5093723/T5093723.java --- a/langtools/test/com/sun/javadoc/5093723/T5093723.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/5093723/T5093723.java Tue Apr 22 17:57:40 2014 -0700 @@ -33,10 +33,8 @@ public class T5093723 extends JavadocTester { - private static final String BUG_ID = "5093723"; - private static final String[] ARGS = new String[] { - "-d", BUG_ID + ".out", "-Xdoclint:none", + "-d", OUTPUT_DIR + ".out", "-Xdoclint:none", SRC_DIR + "/DocumentedClass.java", SRC_DIR + "/UndocumentedClass.java" }; @@ -46,12 +44,4 @@ if (tester.runJavadoc(ARGS) != 0) throw new AssertionError("non-zero return code from javadoc"); } - - public String getBugId() { - return BUG_ID; - } - - public String getBugName() { - return getClass().getName(); - } } diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/AccessSummary/AccessSummary.java --- a/langtools/test/com/sun/javadoc/AccessSummary/AccessSummary.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/AccessSummary/AccessSummary.java Tue Apr 22 17:57:40 2014 -0700 @@ -34,30 +34,27 @@ public class AccessSummary extends JavadocTester { - private static final String BUG_ID = "4637604-4775148"; - private static final String OUTPUT_DIR1 = "docs1-" + BUG_ID + "/"; - /** * Assign value for [ fileToSearch, stringToFind ] */ private static final String[][] TESTARRAY1 = { // Test that the summary attribute appears - { OUTPUT_DIR1 + "overview-summary.html", + { "overview-summary.html", "summary=\"Packages table, listing packages, and an explanation\"" }, // Test that the summary attribute appears - { OUTPUT_DIR1 + "p1/C1.html", + { "p1/C1.html", "summary=\"Constructor Summary table, listing constructors, and an explanation\"" }, // Test that the summary attribute appears - { OUTPUT_DIR1 + "constant-values.html", + { "constant-values.html", "summary=\"Constant Field Values table, listing constant fields, and values\"" } }; // First test with -header only private static final String[] JAVADOC_ARGS = new String[] { - "-d", OUTPUT_DIR1, + "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "p1", "p2"}; @@ -70,18 +67,4 @@ tester.run(JAVADOC_ARGS, TESTARRAY1, new String[][] {}); tester.printSummary(); // Necessary for string search } - - /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } } diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/MetaTag/MetaTag.java --- a/langtools/test/com/sun/javadoc/MetaTag/MetaTag.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/MetaTag/MetaTag.java Tue Apr 22 17:57:40 2014 -0700 @@ -39,8 +39,6 @@ public class MetaTag extends JavadocTester { //Test information. - private static final String BUG_ID = "4034096-4764726-6235799"; - private static final String OUTPUT_DIR = "docs-" + BUG_ID; private static final SimpleDateFormat m_dateFormat = new SimpleDateFormat("yyyy-MM-dd"); //Javadoc arguments. @@ -63,62 +61,62 @@ //Input for string search tests. private static final String[][] TEST = { - { OUTPUT_DIR + "/p1/C1.html", + { "p1/C1.html", "" }, - { OUTPUT_DIR + "/p1/C1.html", + { "p1/C1.html", "" }, - { OUTPUT_DIR + "/p1/C1.html", + { "p1/C1.html", "" }, - { OUTPUT_DIR + "/p1/C1.html", + { "p1/C1.html", "" }, - { OUTPUT_DIR + "/p1/C1.html", + { "p1/C1.html", "" }, - { OUTPUT_DIR + "/p1/package-summary.html", + { "p1/package-summary.html", "" }, - { OUTPUT_DIR + "/overview-summary.html", + { "overview-summary.html", "" }, //NOTE: Hopefully, this regression test is not run at midnight. If the output //was generated yesterday and this test is run today, the test will fail. - {OUTPUT_DIR + "/overview-summary.html", + { "overview-summary.html", ""}, }; private static final String[][] NEGATED_TEST2 = { //No keywords when -keywords is not used. - { OUTPUT_DIR + "-2/p1/C1.html", + { "p1/C1.html", "" }, - { OUTPUT_DIR + "-2/p1/C1.html", + { "p1/C1.html", "" }, - { OUTPUT_DIR + "-2/p1/C1.html", + { "p1/C1.html", "" }, - { OUTPUT_DIR + "-2/p1/C1.html", + { "p1/C1.html", "" }, - { OUTPUT_DIR + "-2/p1/C1.html", + { "p1/C1.html", "" }, - { OUTPUT_DIR + "-2/p1/package-summary.html", + { "p1/package-summary.html", "" }, - { OUTPUT_DIR + "-2/overview-summary.html", + { "overview-summary.html", "" }, //The date metatag should not show up when -notimestamp is used. //NOTE: Hopefully, this regression test is not run at midnight. If the output //was generated yesterday and this test is run today, the test will fail. - {OUTPUT_DIR + "-2/overview-summary.html", + { "overview-summary.html", ""}, }; @@ -133,18 +131,4 @@ tester.run(ARGS_NO_TIMESTAMP_NO_KEYWORDS, NO_TEST, NEGATED_TEST2); tester.printSummary(); } - - /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } } diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/PackagesHeader/PackagesHeader.java --- a/langtools/test/com/sun/javadoc/PackagesHeader/PackagesHeader.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/PackagesHeader/PackagesHeader.java Tue Apr 22 17:57:40 2014 -0700 @@ -37,12 +37,9 @@ public class PackagesHeader extends JavadocTester { //Test information. - private static final String BUG_ID = "4766385"; - private static final String OUTPUT_DIR = "docs-" + BUG_ID; - - private static final String OUTPUT_DIR1 = "docs1-" + BUG_ID + "/"; - private static final String OUTPUT_DIR2 = "docs2-" + BUG_ID + "/"; - private static final String OUTPUT_DIR3 = "docs3-" + BUG_ID + "/"; + private static final String OUTPUT_DIR1 = OUTPUT_DIR + "-1/"; + private static final String OUTPUT_DIR2 = OUTPUT_DIR + "-2/"; + private static final String OUTPUT_DIR3 = OUTPUT_DIR + "-3/"; /** * Assign value for [ fileToSearch, stringToFind ] @@ -50,7 +47,7 @@ private static final String[][] TESTARRAY1 = { // Test that the -header shows up in the packages frame - { OUTPUT_DIR1 + "overview-frame.html", + { "overview-frame.html", "Main Frame Header" } }; @@ -59,7 +56,7 @@ // Test that the -packagesheader string shows // up in the packages frame - { OUTPUT_DIR2 + "overview-frame.html", + { "overview-frame.html", "Packages Frame Header" } }; @@ -67,10 +64,10 @@ // Test that the both headers show up and are different - { OUTPUT_DIR3 + "overview-frame.html", + { "overview-frame.html", "Packages Frame Header" }, - { OUTPUT_DIR3 + "overview-summary.html", + { "overview-summary.html", "Main Frame Header" } }; @@ -110,18 +107,4 @@ tester.printSummary(); } - - /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } } diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/T6735320/T6735320.java --- a/langtools/test/com/sun/javadoc/T6735320/T6735320.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/T6735320/T6735320.java Tue Apr 22 17:57:40 2014 -0700 @@ -31,20 +31,11 @@ */ public class T6735320 extends JavadocTester { - private static final String BUG_ID = "6735320"; private static final String[] ARGS = new String[]{ - "-d", BUG_ID + ".out", + "-d", OUTPUT_DIR + ".out", SRC_DIR + "/SerialFieldTest.java" }; - public String getBugId() { - return BUG_ID; - } - - public String getBugName() { - return getClass().getName(); - } - public static void main(String... args) { T6735320 tester = new T6735320(); if (tester.runJavadoc(ARGS) == 0) { diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/_template/Template.java --- a/langtools/test/com/sun/javadoc/_template/Template.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/_template/Template.java Tue Apr 22 17:57:40 2014 -0700 @@ -33,10 +33,6 @@ public class Template extends JavadocTester { - //Test information. - private static final String BUG_ID = ""; - private static final String OUTPUT_DIR = "docs-" + BUG_ID; - //Javadoc arguments. private static final String[] ARGS = new String[] { "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR @@ -55,18 +51,4 @@ tester.run(ARGS, TEST, NEGATED_TEST); tester.printSummary(); } - - /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } } diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/_template/TemplateComplete.java --- a/langtools/test/com/sun/javadoc/_template/TemplateComplete.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/_template/TemplateComplete.java Tue Apr 22 17:57:40 2014 -0700 @@ -33,10 +33,6 @@ public class TemplateComplete extends JavadocTester { - //Test information. - private static final String BUG_ID = ""; - private static final String OUTPUT_DIR = "docs-" + BUG_ID; - //Javadoc arguments. private static final String[] ARGS = new String[] { "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR @@ -51,6 +47,8 @@ //Input for file diff test. + private static final String DIFFDIR1 = null; + private static final String DIFFDIR2 = null; private static final String[][] FILES_TO_DIFF = {}; /** @@ -61,21 +59,7 @@ TemplateComplete tester = new TemplateComplete(); int actualExitCode = tester.run(ARGS, TEST, NEGATED_TEST); tester.checkExitCode(EXPECTED_EXIT_CODE, actualExitCode); - tester.runDiffs(FILES_TO_DIFF, false); + tester.runDiffs(DIFFDIR1, DIFFDIR2, FILES_TO_DIFF, false); tester.printSummary(); } - - /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } } diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/constantValues/TestConstantValuesDriver.java --- a/langtools/test/com/sun/javadoc/constantValues/TestConstantValuesDriver.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/constantValues/TestConstantValuesDriver.java Tue Apr 22 17:57:40 2014 -0700 @@ -33,9 +33,8 @@ */ public class TestConstantValuesDriver extends JavadocTester { - private static final String BUG_ID = "4504730-4526070-5077317"; private static final String[] ARGS = new String[] { - "-d", BUG_ID, SRC_DIR + "/TestConstantValues.java", + "-d", OUTPUT_DIR, SRC_DIR + "/TestConstantValues.java", SRC_DIR + "/TestConstantValues2.java", SRC_DIR + "/A.java" }; @@ -47,10 +46,10 @@ public static void main(String[] args) { String[][] tests = new String[5][2]; for (int i = 0; i < tests.length-1; i++) { - tests[i][0] = BUG_ID + "/constant-values.html"; + tests[i][0] = "constant-values.html"; tests[i][1] = "TEST"+(i+1)+"PASSES"; } - tests[tests.length-1][0] = BUG_ID + "/constant-values.html"; + tests[tests.length-1][0] = "constant-values.html"; tests[tests.length-1][1] = "\"<Hello World>\""; TestConstantValuesDriver tester = new TestConstantValuesDriver(); tester.run(ARGS, tests, NO_TEST); @@ -58,20 +57,6 @@ } /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } - - /** * @throws java.io.IOException Test 1 passes * @throws java.io.IOException Test 2 passes * @throws java.lang.NullPointerException comment three diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/dupThrowsTags/TestDupThrowsTags.java --- a/langtools/test/com/sun/javadoc/dupThrowsTags/TestDupThrowsTags.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/dupThrowsTags/TestDupThrowsTags.java Tue Apr 22 17:57:40 2014 -0700 @@ -33,9 +33,8 @@ */ public class TestDupThrowsTags extends JavadocTester { - private static final String BUG_ID = "4525364"; private static final String[] ARGS = new String[] { - "-d", BUG_ID, SRC_DIR + "/TestDupThrowsTags.java" + "-d", OUTPUT_DIR, SRC_DIR + "/TestDupThrowsTags.java" }; /** @@ -45,7 +44,7 @@ public static void main(String[] args) { String[][] tests = new String[4][2]; for (int i = 0; i < tests.length; i++) { - tests[i][0] = BUG_ID + "/TestDupThrowsTags.html"; + tests[i][0] = "TestDupThrowsTags.html"; tests[i][1] = "Test "+(i+1)+" passes"; } TestDupThrowsTags tester = new TestDupThrowsTags(); @@ -54,20 +53,6 @@ } /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } - - /** * @throws java.io.IOException Test 1 passes * @throws java.io.IOException Test 2 passes * @throws java.lang.NullPointerException Test 3 passes diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/lib/JavadocTester.java --- a/langtools/test/com/sun/javadoc/lib/JavadocTester.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/lib/JavadocTester.java Tue Apr 22 17:57:40 2014 -0700 @@ -21,8 +21,6 @@ * questions. */ -import com.sun.javadoc.*; -import java.util.*; import java.io.*; @@ -56,6 +54,7 @@ protected static final String SRC_DIR = System.getProperty("test.src", "."); protected static final String JAVA_VERSION = System.getProperty("java.version"); + protected static final String OUTPUT_DIR = "out"; protected static final String[][] NO_TEST = new String[][] {}; protected static final String[] NO_FILE_TEST = new String[] {}; @@ -105,11 +104,16 @@ public StringWriter warnings; /** - * The buffer of warning output.. + * The buffer of warning output. */ public StringBuffer standardOut; /** + * The output directory. + */ + private File outputDir; + + /** * The current subtest number. */ private static int numTestsRun = 0; @@ -131,18 +135,6 @@ } /** - * Return the bug id. - * @return the bug id - */ - public abstract String getBugId(); - - /** - * Return the name of the bug. - * @return the name of the bug - */ - public abstract String getBugName(); - - /** * Execute the tests. * * @param args the arguments to pass to Javadoc @@ -206,6 +198,13 @@ + javadocRunNum + ")..."); } initOutputBuffers(); + outputDir = new File("."); + for (int i = 0; i < args.length - 2; i++) { + if (args[i].equals("-d")) { + outputDir = new File(args[++i]); + break; + } + } ByteArrayOutputStream stdout = new ByteArrayOutputStream(); PrintStream prevOut = System.out; @@ -216,7 +215,7 @@ System.setErr(new PrintStream(stderr)); int returnCode = com.sun.tools.javadoc.Main.execute( - getBugName(), + "javadoc", new PrintWriter(errors, true), new PrintWriter(warnings, true), new PrintWriter(notices, true), @@ -258,60 +257,53 @@ * Run array of tests on the generated files. * This method accepts a fileTestArray for testing if a file is generated * and a negatedFileTestArray for testing if a file is not found. + * The files are relative to the most recent output directory specified + * with -d. * - * @param testArray the array of file tests - * @param negatedTestArray the array of negated file tests + * @param fileTestArray the array of file tests + * @param negatedFileTestArray the array of negated file tests */ public void runTestsOnFile(String[] fileTestArray, String[] negatedFileTestArray) { - runTestsOnFile(fileTestArray, false); - runTestsOnFile(negatedFileTestArray, true); + runTestsOnFile(outputDir, fileTestArray, false); + runTestsOnFile(outputDir, negatedFileTestArray, true); } /** * Run the array of tests on the resulting HTML. + * The files are relative to the most recent output directory specified + * with -d. * * @param testArray the array of tests * @param isNegated true if test is negated; false otherwise */ private void runTestsOnHTML(String[][] testArray , boolean isNegated) { - for (int i = 0; i < testArray.length; i++) { - + for (String[] test : testArray) { numTestsRun++; - System.out.print("Running subtest #" + numTestsRun + "... "); - // Get string to find - String stringToFind = testArray[i][1]; - + String stringToFind = test[1]; // Read contents of file into a string String fileString; try { - fileString = readFileToString(testArray[i][0]); + fileString = readFileToString(outputDir, test[0]); } catch (Error e) { if (isNegated) { - System.out.println( "FAILED" + "\n" - + "for bug " + getBugId() - + " (" + getBugName() + ") " - + "due to " - + e + "\n"); - continue; + System.out.println( "FAILED, due to " + e + "\n"); + continue; } throw e; } // Find string in file's contents boolean isFound = findString(fileString, stringToFind); - if ((isNegated && !isFound) || (!isNegated && isFound) ) { + if ((isNegated && !isFound) || (!isNegated && isFound)) { numTestsPassed += 1; - System.out.println( "Passed" + "\n" - + (isNegated ? "not found:" : "found:") + "\n" - + stringToFind + " in " + testArray[i][0] + "\n"); + System.out.println("Passed" + "\n" + + (isNegated ? "not found:" : "found:") + "\n" + + stringToFind + " in " + test[0] + "\n"); } else { - System.out.println( "FAILED" + "\n" - + "for bug " + getBugId() - + " (" + getBugName() + ")" + "\n" - + "when searching for:" + "\n" - + stringToFind - + " in " + testArray[i][0] + "\n"); + System.out.println("FAILED, when searching for:" + "\n" + + stringToFind + + " in " + test[0] + "\n"); } } } @@ -322,21 +314,15 @@ * @param testArray the array of file tests * @param isNegated true if test is negated; false otherwise */ - private void runTestsOnFile(String[] testArray, boolean isNegated) { - String fileName; - String failedString; - String passedString; - for (int i = 0; i < testArray.length; i++) { + private void runTestsOnFile(File baseDir, String[] testArray, boolean isNegated) { + for (String fileName : testArray) { numTestsRun++; - fileName = testArray[i]; - failedString = "FAILED" + "\n" - + "for bug " + getBugId() + " (" + getBugName() + ") " - + "file (" + fileName + ") found" + "\n"; - passedString = "Passed" + "\n" + - "file (" + fileName + ") not found" + "\n"; + String failedString = "FAILED: file (" + fileName + ") found" + "\n"; + String passedString = "Passed" + "\n" + + "file (" + fileName + ") not found" + "\n"; System.out.print("Running subtest #" + numTestsRun + "... "); try { - File file = new File(fileName); + File file = new File(baseDir, fileName); if ((file.exists() && !isNegated) || (!file.exists() && isNegated)) { numTestsPassed += 1; System.out.println(passedString); @@ -352,27 +338,33 @@ /** * Iterate through the list of given file pairs and diff each file. * - * @param filePairs the pairs of files to diff. - * @throws an Error is thrown if any differences are found between + * @param baseDir1 the directory containing the first set of files + * @param baseDir2 the directory containing the second set of files + * @param files the set of files to be compared + * @throws Error if any differences are found between * file pairs. */ - public void runDiffs(String[][] filePairs) throws Error { - runDiffs(filePairs, true); + public void runDiffs(String baseDir1, String baseDir2, String[] files) throws Error { + runDiffs(baseDir1, baseDir2, files, true); } /** * Iterate through the list of given file pairs and diff each file. * - * @param filePairs the pairs of files to diff. - * @param throwErrorIFNoMatch flag to indicate whether or not to throw + * @param baseDir1 the directory containing the first set of files + * @param baseDir2 the directory containing the second set of files + * @param files the set of files to be compared + * @param throwErrorIfNoMatch flag to indicate whether or not to throw * an error if the files do not match. * - * @throws an Error is thrown if any differences are found between - * file pairs and throwErrorIFNoMatch is true. + * @throws Error if any differences are found between + * file pairs and throwErrorIfNoMatch is true. */ - public void runDiffs(String[][] filePairs, boolean throwErrorIfNoMatch) throws Error { - for (int i = 0; i < filePairs.length; i++) { - diff(filePairs[i][0], filePairs[i][1], throwErrorIfNoMatch); + public void runDiffs(String baseDir1, String baseDir2, String[] files, boolean throwErrorIfNoMatch) throws Error { + File bd1 = new File(baseDir1); + File bd2 = new File(baseDir2); + for (String file : files) { + diff(bd1, bd2, file, throwErrorIfNoMatch); } } @@ -392,8 +384,7 @@ actualExitCode); numTestsPassed++; } else { - System.out.println( "FAILED" + "\n" + "for bug " + getBugId() - + " (" + getBugName() + ")" + "\n" + "Expected return code " + + System.out.println( "FAILED: expected return code " + expectedExitCode + " but got " + actualExitCode); } } @@ -410,8 +401,7 @@ // Test failed throw new Error("\n" + (numTestsRun - numTestsPassed) + " of " + (numTestsRun) - + " subtests failed for bug " + getBugId() - + " (" + getBugName() + ")" + "\n"); + + " subtests failed\n"); } } @@ -432,28 +422,39 @@ * @return the file in string format */ public String readFileToString(String fileName) throws Error { - if (fileName.equals(ERROR_OUTPUT)) { - return getErrorOutput(); - } else if (fileName.equals(NOTICE_OUTPUT)) { - return getNoticeOutput(); - } else if (fileName.equals(WARNING_OUTPUT)) { - return getWarningOutput(); - } else if (fileName.equals(STANDARD_OUTPUT)) { - return getStandardOutput(); + return readFileToString(outputDir, fileName); + } + + /** + * Read the file and return it as a string. + * + * @param baseDir the directory in which to locate the file + * @param fileName the name of the file to read + * @return the file in string format + */ + private String readFileToString(File baseDir, String fileName) throws Error { + switch (fileName) { + case ERROR_OUTPUT: + return getErrorOutput(); + case NOTICE_OUTPUT: + return getNoticeOutput(); + case WARNING_OUTPUT: + return getWarningOutput(); + case STANDARD_OUTPUT: + return getStandardOutput(); } try { - File file = new File(fileName); + File file = new File(baseDir, fileName); if ( !file.exists() ) { System.out.println("\n" + "FILE DOES NOT EXIST: " + fileName); } - BufferedReader in = new BufferedReader(new FileReader(file)); - - // Create an array of characters the size of the file - char[] allChars = new char[(int)file.length()]; - - // Read the characters into the allChars array - in.read(allChars, 0, (int)file.length()); - in.close(); + char[] allChars; + try (BufferedReader in = new BufferedReader(new FileReader(file))) { + // Create an array of characters the size of the file + allChars = new char[(int)file.length()]; + // Read the characters into the allChars array + in.read(allChars, 0, (int)file.length()); + } // Convert to a string String allCharsString = new String(allChars); @@ -470,22 +471,24 @@ /** * Compare the two given files. * - * @param file1 the first file to compare. - * @param file2 the second file to compare. + * @param baseDir1 the directory in which to locate the first file + * @param baseDir2 the directory in which to locate the second file + * @param file the file to compare in the two base directories * @param throwErrorIFNoMatch flag to indicate whether or not to throw * an error if the files do not match. * @return true if the files are the same and false otherwise. */ - public boolean diff(String file1, String file2, boolean throwErrorIFNoMatch) throws Error { - String file1Contents = readFileToString(file1); - String file2Contents = readFileToString(file2); + private boolean diff(File baseDir1, File baseDir2, String file, + boolean throwErrorIFNoMatch) throws Error { + String file1Contents = readFileToString(baseDir1, file); + String file2Contents = readFileToString(baseDir2, file); numTestsRun++; if (file1Contents.trim().compareTo(file2Contents.trim()) == 0) { - System.out.println("Diff successful: " + file1 + ", " + file2); + System.out.println("Diff successful: " + new File(baseDir1, file) + ", " + new File(baseDir2, file)); numTestsPassed++; return true; } else if (throwErrorIFNoMatch) { - throw new Error("Diff failed: " + file1 + ", " + file2); + throw new Error("Diff failed: " + new File(baseDir1, file) + ", " + new File(baseDir2, file)); } else { return false; } @@ -559,12 +562,12 @@ destDirObj.mkdir(); } String[] files = targetDirObj.list(); - for (int i = 0; i < files.length; i++) { - File srcFile = new File(targetDirObj, files[i]); - File destFile = new File(destDirObj, files[i]); + for (String file : files) { + File srcFile = new File(targetDirObj, file); + File destFile = new File(destDirObj, file); if (srcFile.isFile()) { System.out.println("Copying " + srcFile + " to " + destFile); - copyFile(destFile, srcFile); + copyFile(destFile, srcFile); } else if(srcFile.isDirectory()) { copyDir(srcFile.getAbsolutePath(), destDirObj.getAbsolutePath()); } @@ -577,13 +580,15 @@ /** * Copy source file to destination file. * + * @param destfile the destination file + * @param srcfile the source file * @throws SecurityException * @throws IOException */ public static void copyFile(File destfile, File srcfile) throws IOException { byte[] bytearr = new byte[512]; - int len = 0; + int len; FileInputStream input = new FileInputStream(srcfile); File destDir = destfile.getParentFile(); destDir.mkdirs(); @@ -592,8 +597,7 @@ while ((len = input.read(bytearr)) != -1) { output.write(bytearr, 0, len); } - } catch (FileNotFoundException exc) { - } catch (SecurityException exc) { + } catch (FileNotFoundException | SecurityException exc) { } finally { input.close(); output.close(); diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/testAbsLinkPath/TestAbsLinkPath.java --- a/langtools/test/com/sun/javadoc/testAbsLinkPath/TestAbsLinkPath.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/testAbsLinkPath/TestAbsLinkPath.java Tue Apr 22 17:57:40 2014 -0700 @@ -34,9 +34,8 @@ public class TestAbsLinkPath extends JavadocTester { - private static final String BUG_ID = "4640745"; private static final String[][] TEST = { - {"tmp/pkg1/C1.html", "C2.html"}}; + { "pkg1/C1.html", "C2.html"}}; private static final String[] ARGS1 = new String[] { @@ -56,18 +55,4 @@ tester.run(ARGS2, TEST, NO_TEST); tester.printSummary(); } - - /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } } diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/testAbstractMethod/TestAbstractMethod.java --- a/langtools/test/com/sun/javadoc/testAbstractMethod/TestAbstractMethod.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/testAbstractMethod/TestAbstractMethod.java Tue Apr 22 17:57:40 2014 -0700 @@ -35,18 +35,17 @@ public class TestAbstractMethod extends JavadocTester { //Test information. - private static final String BUG_ID = "8004891"; //Javadoc arguments. private static final String[] ARGS = new String[] { - "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg" + "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg" }; //Input for string search tests. private static final String[][] TEST = { - {BUG_ID + "/pkg/A.html", + { "pkg/A.html", "default void"}, - {BUG_ID + "/pkg/A.html", + { "pkg/A.html", "" + "All Methods " + "" + @@ -57,7 +56,7 @@ "" + "Default Methods" + " "}, - {BUG_ID + "/pkg/B.html", + { "pkg/B.html", "" + "All Methods " + "" + @@ -68,9 +67,9 @@ "" + "Concrete Methods" + " "}, - {BUG_ID + "/pkg/B.html", + { "pkg/B.html", "abstract void"}, - {BUG_ID + "/pkg/C.html", + { "pkg/C.html", "" + "All Methods " + "" + @@ -79,18 +78,18 @@ "" + "Default Methods" + " "}, - {BUG_ID + "/pkg/C.html", + { "pkg/C.html", "default void"} }; private static final String[][] NEGATED_TEST = { - {BUG_ID + "/pkg/A.html", + { "pkg/A.html", "abstract void"}, - {BUG_ID + "/pkg/B.html", + { "pkg/B.html", "Default Methods" + " "}, - {BUG_ID + "/pkg/B.html", + { "pkg/B.html", "default void"}, - {BUG_ID + "/pkg/C.html", + { "pkg/C.html", "Abstract Methods" + " "} }; @@ -104,18 +103,4 @@ tester.run(ARGS, TEST, NEGATED_TEST); tester.printSummary(); } - - /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } } diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/testAnchorNames/TestAnchorNames.java --- a/langtools/test/com/sun/javadoc/testAnchorNames/TestAnchorNames.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/testAnchorNames/TestAnchorNames.java Tue Apr 22 17:57:40 2014 -0700 @@ -33,41 +33,40 @@ public class TestAnchorNames extends JavadocTester { - private static final String BUG_ID = "8025633"; //Input for string search tests. private static final String[][] TEST = { //Test some section markers and links to these markers - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, @@ -75,170 +74,170 @@ //The marker for this appears in the serialized-form.html which we will //test below - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, //Test some fields - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/DeprMemClass.html", + { "pkg1/DeprMemClass.html", "" }, - {BUG_ID + "/pkg1/DeprMemClass.html", + { "pkg1/DeprMemClass.html", "" }, //Test constructor - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, //Test some methods - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", "" }, - {BUG_ID + "/pkg1/DeprMemClass.html", + { "pkg1/DeprMemClass.html", "" }, - {BUG_ID + "/pkg1/DeprMemClass.html", + { "pkg1/DeprMemClass.html", "" }, //Test enum - {BUG_ID + "/pkg1/RegClass.Te$t_Enum.html", + { "pkg1/RegClass.Te$t_Enum.html", "" }, - {BUG_ID + "/pkg1/RegClass.Te$t_Enum.html", + { "pkg1/RegClass.Te$t_Enum.html", "" }, //Test nested class - {BUG_ID + "/pkg1/RegClass._NestedClas$.html", + { "pkg1/RegClass._NestedClas$.html", "" }, - {BUG_ID + "/pkg1/RegClass._NestedClas$.html", + { "pkg1/RegClass._NestedClas$.html", "" }, //Test class use page - {BUG_ID + "/pkg1/class-use/DeprMemClass.html", + { "pkg1/class-use/DeprMemClass.html", "" }, //Test deprecated list page - {BUG_ID + "/deprecated-list.html", + { "deprecated-list.html", "" }, - {BUG_ID + "/deprecated-list.html", + { "deprecated-list.html", "" }, //Test constant values page - {BUG_ID + "/constant-values.html", + { "constant-values.html", "" }, //Test serialized form page //This is the marker for the link that appears in the pkg1.RegClass.html page - {BUG_ID + "/serialized-form.html", + { "serialized-form.html", "" }, //Test member name index page - {BUG_ID + "/index-all.html", + { "index-all.html", "" }, - {BUG_ID + "/index-all.html", + { "index-all.html", "$" }, - {BUG_ID + "/index-all.html", + { "index-all.html", "_" } }; @@ -246,22 +245,22 @@ private static final String[][] NEGATED_TEST = { //The marker name conversion should only affect HTML anchors. It should not //affect the lables. - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", " Z:Z_" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", " Z:Z:Dfield" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", " Z:Z_field_In_Class" }, - {BUG_ID + "/pkg1/RegClass.html", + { "pkg1/RegClass.html", " S_:D:D:D:D:DINT" }, }; private static final String[] ARGS = new String[] { - "-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "pkg1" + "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "-use", "pkg1" }; /** @@ -273,18 +272,4 @@ tester.run(ARGS, TEST, NEGATED_TEST); tester.printSummary(); } - - /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } } diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java --- a/langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java Tue Apr 22 17:57:40 2014 -0700 @@ -35,17 +35,14 @@ public class TestAnnotationOptional extends JavadocTester { - //Test information. - private static final String BUG_ID = "NO_BUG_ID_YET"; - //Javadoc arguments. private static final String[] ARGS = new String[] { - "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg" + "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg" }; //Input for string search tests. private static final String[][] TEST = { - {BUG_ID + "/pkg/AnnotationOptional.html", + { "pkg/AnnotationOptional.html", "" } }; @@ -58,18 +55,4 @@ tester.run(ARGS, TEST, NO_TEST); tester.printSummary(); } - - /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } } diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java --- a/langtools/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java Tue Apr 22 17:57:40 2014 -0700 @@ -34,47 +34,44 @@ public class TestAnnotationTypes extends JavadocTester { - //Test information. - private static final String BUG_ID = "4973609-8015249"; - //Javadoc arguments. private static final String[] ARGS = new String[] { - "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg" + "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg" }; //Input for string search tests. private static final String[][] TEST = { - {BUG_ID + "/pkg/AnnotationTypeField.html", + { "pkg/AnnotationTypeField.html", "
  • Summary: 
  • \n" + "
  • Field | 
  • "}, - {BUG_ID + "/pkg/AnnotationTypeField.html", + { "pkg/AnnotationTypeField.html", "
  • Detail: 
  • \n" + "
  • Field | 
  • "}, - {BUG_ID + "/pkg/AnnotationTypeField.html", + { "pkg/AnnotationTypeField.html", ""}, - {BUG_ID + "/pkg/AnnotationTypeField.html", + { "pkg/AnnotationTypeField.html", "

    Field Summary

    "}, - {BUG_ID + "/pkg/AnnotationTypeField.html", + { "pkg/AnnotationTypeField.html", "DEFAULT_NAME" + " "}, - {BUG_ID + "/pkg/AnnotationTypeField.html", + { "pkg/AnnotationTypeField.html", ""}, - {BUG_ID + "/pkg/AnnotationTypeField.html", + { "pkg/AnnotationTypeField.html", "

    DEFAULT_NAME

    \n" + "
    public static final java." +
                 "lang.String DEFAULT_NAME
    "}, - {BUG_ID + "/pkg/AnnotationType.html", + { "pkg/AnnotationType.html", "
  • Summary: 
  • \n" + "
  • Field | 
  • "}, - {BUG_ID + "/pkg/AnnotationType.html", + { "pkg/AnnotationType.html", "
  • Detail: 
  • \n" + "
  • Field | 
  • "}, }; private static final String[][] NEGATED_TEST = { - {BUG_ID + "/pkg/AnnotationType.html", + { "pkg/AnnotationType.html", "
    \n\n" + "

    \n\n" + "

    " + @@ -90,18 +87,4 @@ tester.run(ARGS, TEST, NEGATED_TEST); tester.printSummary(); } - - /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } } diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/testBackSlashInLink/TestBackSlashInLink.java --- a/langtools/test/com/sun/javadoc/testBackSlashInLink/TestBackSlashInLink.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/testBackSlashInLink/TestBackSlashInLink.java Tue Apr 22 17:57:40 2014 -0700 @@ -35,12 +35,11 @@ public class TestBackSlashInLink extends JavadocTester { - private static final String BUG_ID = "4511110"; private static final String[][] TEST = { - {BUG_ID + "/C.html", "src-html/C.html#line.7"}}; + { "C.html", "src-html/C.html#line.7"}}; private static final String[] ARGS = new String[] { - "-d", BUG_ID, "-sourcepath", SRC_DIR, + "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "-linksource", SRC_DIR + "/C.java"}; /** @@ -52,18 +51,4 @@ tester.run(ARGS, TEST, NO_TEST); tester.printSummary(); } - - /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } } diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/testBadPackageFileInJar/TestBadPackageFileInJar.java --- a/langtools/test/com/sun/javadoc/testBadPackageFileInJar/TestBadPackageFileInJar.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/testBadPackageFileInJar/TestBadPackageFileInJar.java Tue Apr 22 17:57:40 2014 -0700 @@ -35,10 +35,6 @@ public class TestBadPackageFileInJar extends JavadocTester { - protected static final String FS = System.getProperty("file.separator"); - - private static final String BUG_ID = "4691095"; - private static final String[][] TEST = new String[][] { {ERROR_OUTPUT, @@ -47,7 +43,7 @@ private static final String[] ARGS = new String[] { - "-d", BUG_ID, "-sourcepath", SRC_DIR, "-classpath", + "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "-classpath", SRC_DIR + "/badPackageFileInJar.jar", "pkg"}; @@ -60,18 +56,4 @@ tester.run(ARGS, TEST, NO_TEST); tester.printSummary(); } - - /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } } diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/testBadSourceFile/TestBadSourceFile.java --- a/langtools/test/com/sun/javadoc/testBadSourceFile/TestBadSourceFile.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/testBadSourceFile/TestBadSourceFile.java Tue Apr 22 17:57:40 2014 -0700 @@ -35,12 +35,9 @@ public class TestBadSourceFile extends JavadocTester { - //Test information. - private static final String BUG_ID = "4835749"; - //Javadoc arguments. private static final String[] ARGS = new String[] { - "-Xdoclint:none", "-d", BUG_ID, SRC_DIR + "/C2.java" + "-Xdoclint:none", "-d", OUTPUT_DIR, SRC_DIR + "/C2.java" }; /** @@ -53,18 +50,4 @@ tester.checkExitCode(0, exitCode); tester.printSummary(); } - - /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } } diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/testBaseClass/TestBaseClass.java --- a/langtools/test/com/sun/javadoc/testBaseClass/TestBaseClass.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/testBaseClass/TestBaseClass.java Tue Apr 22 17:57:40 2014 -0700 @@ -35,7 +35,6 @@ public class TestBaseClass extends JavadocTester { - private static final String BUG_ID = "4197513"; private static final String[] ARGS = new String[] { "-sourcepath", SRC_DIR, @@ -52,18 +51,4 @@ throw new Error("Javadoc failed to execute."); } } - - /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } } diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/testBreakIterator/TestBreakIterator.java --- a/langtools/test/com/sun/javadoc/testBreakIterator/TestBreakIterator.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/testBreakIterator/TestBreakIterator.java Tue Apr 22 17:57:40 2014 -0700 @@ -37,13 +37,12 @@ public class TestBreakIterator extends JavadocTester { - private static final String BUG_ID = "4165985"; private static final String[][] TEST = { - {BUG_ID + "/pkg/BreakIteratorTest.html", + { "pkg/BreakIteratorTest.html", "The class is empty (i.e. it has no members)."}}; private static final String[] ARGS = new String[] { - "-d", BUG_ID, "-sourcepath", SRC_DIR, + "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "-breakiterator", "pkg"}; /** @@ -55,18 +54,4 @@ tester.run(ARGS, TEST, NO_TEST); tester.printSummary(); } - - /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } } diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/testCRLineSeparator/TestCRLineSeparator.java --- a/langtools/test/com/sun/javadoc/testCRLineSeparator/TestCRLineSeparator.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/testCRLineSeparator/TestCRLineSeparator.java Tue Apr 22 17:57:40 2014 -0700 @@ -37,17 +37,14 @@ public class TestCRLineSeparator extends JavadocTester { - //Test information. - private static final String BUG_ID = "4979486-8014636"; - //Javadoc arguments. private static final String[] ARGS = new String[] { - "-d", BUG_ID, "-sourcepath", ".", "pkg" + "-d", OUTPUT_DIR, "-sourcepath", ".", "pkg" }; //Input for string search tests. private static final String[][] TEST = { - {BUG_ID + "/pkg/MyClass.html", "Line 1\n" + + { "pkg/MyClass.html", "Line 1\n" + " Line 2"} }; @@ -63,20 +60,6 @@ tester.printSummary(); } - /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } - // recursively copy files from fromDir to toDir, replacing newlines // with \r static void initFiles(File fromDir, File toDir, String f) throws IOException { diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/testCharset/TestCharset.java --- a/langtools/test/com/sun/javadoc/testCharset/TestCharset.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/testCharset/TestCharset.java Tue Apr 22 17:57:40 2014 -0700 @@ -34,25 +34,22 @@ public class TestCharset extends JavadocTester { - //Test information. - private static final String BUG_ID = "7052170"; - //Javadoc arguments. private static final String[] ARGS = new String[] { - "-d", BUG_ID, "-charset", "UTF-8", "-sourcepath", SRC_DIR, "pkg" + "-d", OUTPUT_DIR, "-charset", "UTF-8", "-sourcepath", SRC_DIR, "pkg" }; private static final String[][] TEST = { - {BUG_ID + "/index.html", + { "index.html", ""}, - {BUG_ID + "/pkg/Foo.html", + { "pkg/Foo.html", ""} }; private static final String[][] NEGATED_TEST = { - {BUG_ID + "/index.html", + { "index.html", ""}, - {BUG_ID + "/pkg/Foo.html", + { "pkg/Foo.html", ""} }; @@ -65,18 +62,4 @@ tester.run(ARGS, TEST, NEGATED_TEST); tester.printSummary(); } - - /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } } diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/testClassCrossReferences/TestClassCrossReferences.java --- a/langtools/test/com/sun/javadoc/testClassCrossReferences/TestClassCrossReferences.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/testClassCrossReferences/TestClassCrossReferences.java Tue Apr 22 17:57:40 2014 -0700 @@ -34,20 +34,19 @@ public class TestClassCrossReferences extends JavadocTester { - private static final String BUG_ID = "4652655-4857717"; private static final String[][] TEST = { - {BUG_ID + "/C.html", + { "C.html", "Link to math package"}, - {BUG_ID + "/C.html", + { "C.html", "Link to AttributeContext innerclass"}, - {BUG_ID + "/C.html", + { "C.html", "Link to external class BigDecimal"}, - {BUG_ID + "/C.html", + { "C.html", "Link to external member gcd"}, - {BUG_ID + "/C.html", + { "C.html", "

    \n" + "
    Overrides:
    \n" + "
    toString in class java.lang.Object
    \n" + @@ -55,7 +54,7 @@ }; private static final String[] ARGS = new String[] { - "-d", BUG_ID, "-sourcepath", SRC_DIR, + "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "-linkoffline", "http://java.sun.com/j2se/1.4/docs/api/", SRC_DIR, SRC_DIR + "/C.java"}; @@ -68,18 +67,4 @@ tester.run(ARGS, TEST, NO_TEST); tester.printSummary(); } - - /** - * {@inheritDoc} - */ - public String getBugId() { - return BUG_ID; - } - - /** - * {@inheritDoc} - */ - public String getBugName() { - return getClass().getName(); - } } diff -r b0845717434e -r e7549dcbc4af langtools/test/com/sun/javadoc/testClassTree/TestClassTree.java --- a/langtools/test/com/sun/javadoc/testClassTree/TestClassTree.java Tue Apr 22 17:41:11 2014 -0700 +++ b/langtools/test/com/sun/javadoc/testClassTree/TestClassTree.java Tue Apr 22 17:57:40 2014 -0700 @@ -37,22 +37,19 @@ public class TestClassTree extends JavadocTester { - //Test information. - private static final String BUG_ID = "4632553-4973607"; - //Javadoc arguments. private static final String[] ARGS = new String[] { - "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg" + "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg" }; //Input for string search tests. private static final String[][] TEST = { - {BUG_ID + "/pkg/package-tree.html", + { "pkg/package-tree.html", "