"
diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testSearch/pkg/AnotherClass.java
--- a/langtools/test/jdk/javadoc/doclet/testSearch/pkg/AnotherClass.java Wed Jul 05 21:27:27 2017 +0200
+++ b/langtools/test/jdk/javadoc/doclet/testSearch/pkg/AnotherClass.java Mon Mar 14 15:04:57 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -72,7 +72,7 @@
* @param param some parameter.
* @return a test object.
*/
- public Class method(pkg1.RegClass param) {
+ public pkg1.RegClass method(pkg1.RegClass param) {
return param;
}
}
diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testSearch/pkg/package-info.java
--- a/langtools/test/jdk/javadoc/doclet/testSearch/pkg/package-info.java Wed Jul 05 21:27:27 2017 +0200
+++ b/langtools/test/jdk/javadoc/doclet/testSearch/pkg/package-info.java Mon Mar 14 15:04:57 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,6 +23,9 @@
/**
* Test package. Testing search tag for package. Single {@index SingleWord} search tag.
- * Search {@index "phrase with spaces"}.
+ * Search tag 1 {@index "phrase with spaces"}.
+ * Search tag 2 {@index "pkg"}.
+ * Search tag 3 {@index "pkg2.5"}.
+ * Search tag 5 {@index "r"}.
*/
package pkg;
diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testSearch/pkgfx/C.java
--- a/langtools/test/jdk/javadoc/doclet/testSearch/pkgfx/C.java Wed Jul 05 21:27:27 2017 +0200
+++ b/langtools/test/jdk/javadoc/doclet/testSearch/pkgfx/C.java Mon Mar 14 15:04:57 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -60,24 +60,24 @@
public final void setRate(double value) {}
- public final double getRate() {}
+ public final double getRate() {return 0.0;}
- public final DoubleProperty rateProperty() {}
+ public final DoubleProperty rateProperty() {return null;}
private BooleanProperty paused;
public final void setPaused(boolean value) {}
- public final double isPaused() {}
+ public final double isPaused() {return 0.0;}
class DoubleProperty {}
class BooleanProperty {}
- public final BooleanProperty setTestMethodProperty() {}
+ public final BooleanProperty setTestMethodProperty() {return null;}
private class Inner {
- private BooleanProperty testMethodProperty() {}
+ private BooleanProperty testMethodProperty() {return null;}
/**
* Defines the direction/speed at which the {@code Timeline} is expected to
@@ -88,8 +88,8 @@
public final void setRate(double value) {}
- public final double getRate() {}
+ public final double getRate() {return 0.0;}
- public final DoubleProperty rateProperty() {}
+ public final DoubleProperty rateProperty() {return null;}
}
}
diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testSerializedForm/ExternalizedForm.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/jdk/javadoc/doclet/testSerializedForm/ExternalizedForm.java Mon Mar 14 15:04:57 2016 -0700
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+public class ExternalizedForm implements Externalizable {
+
+ /**
+ * @throws IOException when there is an I/O error.
+ */
+ public void writeExternal(ObjectOutput oo) throws IOException {}
+
+ /**
+ * @throws IOException when there is an I/O error.
+ * @throws ClassNotFoundException if no class found.
+ * @serialData This is a serial data comment.
+ */
+ public void readExternal(ObjectInput oi) throws IOException, ClassNotFoundException {}
+}
diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testSerializedForm/SerializedForm.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/jdk/javadoc/doclet/testSerializedForm/SerializedForm.java Mon Mar 14 15:04:57 2016 -0700
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.ObjectStreamField;
+import java.io.Serializable;
+
+public class SerializedForm implements Serializable {
+
+ /**
+ * @serialField name String a test
+ * @see TestSerializedForm
+ */
+ @Deprecated
+ private static final ObjectStreamField[] serialPersistentFields = {
+ new ObjectStreamField("i", int.class),
+ new ObjectStreamField("count", Integer.TYPE),
+ new ObjectStreamField("name", String.class)
+ };
+
+ /**
+ * The entry point of the test.
+ * @param args the array of command line arguments.
+ */
+
+ /**
+ * @param s ObjectInputStream.
+ * @throws IOException when there is an I/O error.
+ * @serial
+ */
+ private void readObject(ObjectInputStream s) throws IOException {}
+
+ /**
+ * @param s ObjectOutputStream.
+ * @throws IOException when there is an I/O error.
+ * @serial
+ */
+ private void writeObject(ObjectOutputStream s) throws IOException {}
+
+ /**
+ * @throws IOException when there is an I/O error.
+ * @serialData This is a serial data comment.
+ * @return an object.
+ */
+ protected Object readResolve() throws IOException {return null;}
+
+ /**
+ * @throws IOException when there is an I/O error.
+ * @serialData This is a serial data comment.
+ * @return an object.
+ */
+ protected Object writeReplace() throws IOException {return null;}
+
+ /**
+ * @throws IOException when there is an I/O error.
+ * @serialData This is a serial data comment.
+ * @return an object.
+ */
+ protected Object readObjectNoData() throws IOException {
+ return null;
+ }
+}
diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testSerializedForm/TestSerializedForm.java
--- a/langtools/test/jdk/javadoc/doclet/testSerializedForm/TestSerializedForm.java Wed Jul 05 21:27:27 2017 +0200
+++ b/langtools/test/jdk/javadoc/doclet/testSerializedForm/TestSerializedForm.java Mon Mar 14 15:04:57 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4341304 4485668 4966728 8032066
+ * @bug 4341304 4485668 4966728 8032066 8071982
* @summary Test that methods readResolve and writeReplace show
* up in serialized-form.html the same way that readObject and writeObject do.
* If the doclet includes readResolve and writeReplace in the serialized-form
@@ -41,7 +41,7 @@
import java.io.*;
-public class TestSerializedForm extends JavadocTester implements Serializable {
+public class TestSerializedForm extends JavadocTester {
public static void main(String... args) throws Exception {
TestSerializedForm tester = new TestSerializedForm();
tester.runTests();
@@ -50,18 +50,23 @@
// tester.printSummary();
}
- @Test
+ // @ignore 8146022
+ // @Test
void testDefault() {
- javadoc("-d", "out-default",
+ javadoc("-d", "out-default", "-serialwarn", "-Xdoclint:none",
"-sourcepath", testSrc,
- testSrc("TestSerializedForm.java"), "pkg1");
+ testSrc("SerializedForm.java"), testSrc("ExternalizedForm.java"), "pkg1");
checkExit(Exit.OK);
checkOutput("serialized-form.html", true,
"protected java.lang.Object readResolve()",
"protected java.lang.Object writeReplace()",
"protected java.lang.Object readObjectNoData()",
- "See Also",
+ "Serialization Overview
\n\n"
+ + "- \n
"
+ + "Deprecated.
\n"
+ + "\n- See Also:
\n"
+ + "TestSerializedForm
\n
",
"Class pkg1.NestedInnerClass.InnerClass.ProNestedInnerClass "
+ "extends java.lang.Object implements Serializable
",
"Class pkg1.PrivateIncludeInnerClass.PriInnerClass extends "
@@ -86,7 +91,7 @@
javadoc("-private",
"-d", "out-private",
"-sourcepath", testSrc,
- testSrc("TestSerializedForm.java"), "pkg1");
+ testSrc("SerializedForm.java"), testSrc("ExternalizedForm.java"), "pkg1");
checkExit(Exit.OK);
checkOutput("serialized-form.html", true,
@@ -109,53 +114,4 @@
+ "title=\"class in pkg1\">pkg1.PublicExcludeInnerClass.PubInnerClass
"
+ "extends java.lang.Object implements Serializable");
}
-
- /**
- * @serial
- * @see TestSerializedForm
- */
- public final int SERIALIZABLE_CONSTANT = 1;
-
- /**
- * The entry point of the test.
- * @param args the array of command line arguments.
- */
-
- /**
- * @param s ObjectInputStream.
- * @throws IOException when there is an I/O error.
- * @serial
- */
- private void readObject(ObjectInputStream s) throws IOException {}
-
- /**
- * @param s ObjectOutputStream.
- * @throws IOException when there is an I/O error.
- * @serial
- */
- private void writeObject(ObjectOutputStream s) throws IOException {}
-
- /**
- * @throws IOException when there is an I/O error.
- * @serialData This is a serial data comment.
- * @return an object.
- */
- protected Object readResolve() throws IOException {return null;}
-
- /**
- * @throws IOException when there is an I/O error.
- * @serialData This is a serial data comment.
- * @return an object.
- */
- protected Object writeReplace() throws IOException {return null;}
-
- /**
- * @throws IOException when there is an I/O error.
- * @serialData This is a serial data comment.
- * @return an object.
- */
- protected Object readObjectNoData() throws IOException {
- return null;
- }
-
}
diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testSimpleTag/C.java
--- a/langtools/test/jdk/javadoc/doclet/testSimpleTag/C.java Wed Jul 05 21:27:27 2017 +0200
+++ b/langtools/test/jdk/javadoc/doclet/testSimpleTag/C.java Mon Mar 14 15:04:57 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,4 +28,10 @@
* @tag-with-hyphens a tag that contains hyphens.
*/
-public class C {}
+public class C {
+ /**
+ * @param arg this is an int argument.
+ */
+ public void m(int arg) {
+ }
+}
diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testSimpleTag/TestSimpleTag.java
--- a/langtools/test/jdk/javadoc/doclet/testSimpleTag/TestSimpleTag.java Wed Jul 05 21:27:27 2017 +0200
+++ b/langtools/test/jdk/javadoc/doclet/testSimpleTag/TestSimpleTag.java Mon Mar 14 15:04:57 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4695326 4750173 4920381 8078320
+ * @bug 4695326 4750173 4920381 8078320 8071982
* @summary Test the declaration of simple tags using -tag. Verify that
* "-tag name" is a shortcut for "-tag name:a:Name:". Also verity that
* you can escape the ":" character with a back slash so that it is not
@@ -46,6 +46,7 @@
void test() {
javadoc("-d", "out",
"-sourcepath", testSrc,
+ "-tag", "param",
"-tag", "todo",
"-tag", "ejb\\:bean:a:EJB Beans:",
"-tag", "regular:a:Regular Tag:",
@@ -57,6 +58,8 @@
"Todo:",
"EJB Beans:",
"Regular Tag:",
- "Tag-With-Hyphens:");
+ "Tag-With-Hyphens:",
+ "Parameters:\n"
+ + "arg
- this is an int argument.");
}
}
diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java
--- a/langtools/test/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java Wed Jul 05 21:27:27 2017 +0200
+++ b/langtools/test/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java Mon Mar 14 15:04:57 2016 -0700
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8005091 8009686 8025633 8026567 6469562
+ * @bug 8005091 8009686 8025633 8026567 6469562 8071982 8071984
* @summary Make sure that type annotations are displayed correctly
* @author Bhavesh Patel
* @library ../lib
@@ -355,5 +355,369 @@
checkOutput("typeannos/Generic2.html", true,
"void test2(@RcvrA Generic2<X> this)
");
+
+
+ // Test for repeated type annotations (RepeatedAnnotations.java).
+ checkOutput("typeannos/RepeatingAtClassLevel.html", true,
+ "@RepTypeA @RepTypeA\n"
+ + "@RepTypeB @RepTypeB\nclass RepeatingAtClassLevel\nextends "
+ + "java.lang.Object
");
+
+// @ignore 8146008
+// checkOutput("typeannos/RepeatingAtClassLevel2.html", true,
+// "@RepTypeUseA @RepTypeUseA\n@RepTypeUseB @RepTypeUseB\nclass RepeatingAtClassLevel2\nextends "
+// + "java.lang.Object
");
+//
+// checkOutput("typeannos/RepeatingAtClassLevel2.html", true,
+// "@RepAllContextsA @RepAllContextsA\n@RepAllContextsB @RepAllContextsB\n"
+// + "class RepeatingAtClassLevel3\n"
+// + "extends java.lang.Object
");
+
+ checkOutput("typeannos/RepeatingOnConstructor.html", true,
+ "@RepConstructorA @RepConstructorA\n@RepConstructorB @RepConstructorB\n"
+ + "RepeatingOnConstructor()
",
+
+ "@RepConstructorA @RepConstructorA\n@RepConstructorB @RepConstructorB\n"
+ + "RepeatingOnConstructor(int i,\n int j)
",
+
+ "@RepAllContextsA @RepAllContextsA\n"
+ + "@RepAllContextsB @RepAllContextsB\n"
+ + "RepeatingOnConstructor(int i,\n int j,\n"
+ + " int k)
",
+
+ "RepeatingOnConstructor(@RepParameterA @RepParameterA @RepParameterB "
+ + "@RepParameterB\n java.lang.String parameter,\n"
+ + " @RepParameterA "
+ + "@RepParameterA @RepParameterB "
+ + "@RepParameterB\n java.lang.String "
+ + ""
+ + "@RepTypeUseA @RepTypeUseA @RepTypeUseB "
+ + ""
+ + "@RepTypeUseB ... vararg)
"
+ );
+
+ checkOutput("typeannos/RepeatingOnConstructor.Inner.html", true,
+ "Inner"
+ + "(java.lang.String parameter,\n java.lang.String "
+ + "@RepTypeUseA @RepTypeUseA @RepTypeUseB "
+ + "@RepTypeUseB ... vararg)
",
+
+ "Inner("
+ + "@RepTypeUseA @RepTypeUseA @RepTypeUseB "
+ + "@RepTypeUseB RepeatingOnConstructor this,\n "
+ + "@RepParameterA @RepParameterA @RepParameterB "
+ + "@RepParameterB\n java.lang.String parameter,\n"
+ + " "
+ + "@RepParameterA @RepParameterA @RepParameterB "
+ + "@RepParameterB\n java.lang.String @RepTypeUseA "
+ + "@RepTypeUseA @RepTypeUseB @RepTypeUseB ... vararg)");
+
+ checkOutput("typeannos/RepeatingOnField.html", true,
+ "(package private) java.lang.Integer
\n"
+ + "i1 ",
+
+ "(package private) @RepTypeUseA "
+ + "@RepTypeUseA @RepTypeUseB @RepTypeUseB java.lang.Integer | \n"
+ + "i2 ",
+
+ "(package private) @RepTypeUseA @RepTypeUseA "
+ + "@RepTypeUseB @RepTypeUseB java.lang.Integer "
+ + " | \n"
+ + "i3 ",
+
+ "(package private) @RepAllContextsA @RepAllContextsA "
+ + "@RepAllContextsB @RepAllContextsB java.lang.Integer "
+ + " | \n"
+ + "i4 ",
+
+ "(package private) java.lang.String @RepTypeUseA "
+ + "@RepTypeUseA @RepTypeUseB @RepTypeUseB [] "
+ + "@RepTypeUseA @RepTypeUseA @RepTypeUseB "
+ + "@RepTypeUseB [] | \nsa ",
+
+ ""
+ + "@RepFieldA @RepFieldA\n@RepFieldB "
+ + "@RepFieldB\njava.lang.Integer i1 ",
+
+ "@RepTypeUseA @RepTypeUseA "
+ + ""
+ + "@RepTypeUseB @RepTypeUseB java.lang.Integer i2 ",
+
+ ""
+ + "@RepFieldA @RepFieldA\n@RepFieldB "
+ + "@RepFieldB\n@RepTypeUseA @RepTypeUseA "
+ + "@RepTypeUseB @RepTypeUseB java.lang.Integer i3 ",
+
+ ""
+ + "@RepAllContextsA @RepAllContextsA\n"
+ + "@RepAllContextsB @RepAllContextsB\n"
+ + ""
+ + "@RepAllContextsA @RepAllContextsA "
+ + "@RepAllContextsB @RepAllContextsB java.lang.Integer i4 ",
+
+ "java.lang.String @RepTypeUseA @RepTypeUseA "
+ + "@RepTypeUseB @RepTypeUseB [] "
+ + "@RepTypeUseA @RepTypeUseA @RepTypeUseB "
+ + "@RepTypeUseB [] sa ");
+
+ checkOutput("typeannos/RepeatingOnMethod.html", true,
+ "(package private) java.lang.String | \ntest1() ",
+
+ "(package private) @RepTypeUseA "
+ + "@RepTypeUseA @RepTypeUseB @RepTypeUseB java.lang.String "
+ + " | \n"
+ + "test2"
+ + "() ",
+
+ "(package private) @RepTypeUseA "
+ + "@RepTypeUseA @RepTypeUseB @RepTypeUseB java.lang.String "
+ + " | \n"
+ + "test3"
+ + "() ",
+
+ "(package private) @RepAllContextsA "
+ + "@RepAllContextsA @RepAllContextsB "
+ + "@RepAllContextsB java.lang.String | \n"
+ + "test4() ",
+
+ "test5"
+ + "(java.lang.String parameter,\n java.lang.String "
+ + "@RepTypeUseA @RepTypeUseA @RepTypeUseB "
+ + "@RepTypeUseB ... vararg) ",
+
+ ""
+ + "@RepMethodA @RepMethodA\n@RepMethodB "
+ + "@RepMethodB\njava.lang.String test1()",
+
+ ""
+ + "@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB java.lang.String test2()",
+
+ ""
+ + "@RepMethodA @RepMethodA\n@RepMethodB "
+ + "@RepMethodB\n@RepTypeUseA @RepTypeUseA "
+ + "@RepTypeUseB @RepTypeUseB java.lang.String test3()",
+
+ ""
+ + "@RepAllContextsA @RepAllContextsA\n"
+ + "@RepAllContextsB @RepAllContextsB\n"
+ + "@RepAllContextsA @RepAllContextsA "
+ + "@RepAllContextsB @RepAllContextsB java.lang.String test4()",
+
+ "java.lang.String test5(@RepTypeUseA "
+ + "@RepTypeUseA @RepTypeUseB @RepTypeUseB RepeatingOnMethod "
+ + "this,\n @RepParameterA "
+ + "@RepParameterA @RepParameterB "
+ + "@RepParameterB\n java.lang.String parameter,\n"
+ + " @RepParameterA @RepParameterA "
+ + "@RepParameterB @RepParameterB\n "
+ + "java.lang.String @RepTypeUseA @RepTypeUseA "
+ + "@RepTypeUseB @RepTypeUseB ... vararg)");
+
+ checkOutput("typeannos/RepeatingOnTypeParametersBoundsTypeArgumentsOnMethod.html", true,
+ "(package private) <T> java.lang.String | \n"
+ + "genericMethod(T t) ",
+
+ "(package private) <T> java.lang.String | \n"
+ + "genericMethod2(@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB T t) ",
+
+ "(package private) java.lang.String | \n"
+ + "test() ",
+
+ "java.lang.String test(@RepTypeUseA "
+ + "@RepTypeUseA @RepTypeUseB @RepTypeUseB "
+ + "RepeatingOnTypeParametersBoundsTypeArgumentsOnMethod<"
+ + "@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB T> this)");
+
+ checkOutput("typeannos/RepeatingOnVoidMethodDeclaration.html", true,
+ ""
+ + "@RepMethodA @RepMethodA\n@RepMethodB "
+ + "@RepMethodB\nvoid test()");
}
}
diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testTypeAnnotations/typeannos/RepeatedAnnotations.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/jdk/javadoc/doclet/testTypeAnnotations/typeannos/RepeatedAnnotations.java Mon Mar 14 15:04:57 2016 -0700
@@ -0,0 +1,346 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR RepeatingA PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package typeannos;
+
+import java.lang.annotation.*;
+import static java.lang.annotation.ElementType.*;
+
+/*
+ * This class is partially replicated from test/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest1.java; CombinationsTargetTest2.java; CombinationsTargetTest3.java
+ */
+@RepTypeA @RepTypeA @RepTypeB @RepTypeB class RepeatingAtClassLevel {
+}
+
+@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB class RepeatingAtClassLevel2 {
+}
+
+@RepAllContextsA @RepAllContextsA @RepAllContextsB @RepAllContextsB class RepeatingAtClassLevel3 {
+}
+
+class RepeatingOnConstructor {
+
+ @RepConstructorA @RepConstructorA @RepConstructorB @RepConstructorB
+ RepeatingOnConstructor() {
+ }
+
+ @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB RepeatingOnConstructor(int i) {
+ }
+
+ @RepConstructorA @RepConstructorA @RepConstructorB @RepConstructorB
+ @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB RepeatingOnConstructor(int i, int j) {
+ }
+
+ @RepAllContextsA @RepAllContextsA @RepAllContextsB @RepAllContextsB RepeatingOnConstructor(int i, int j, int k) {
+ }
+
+ RepeatingOnConstructor(@RepParameterA @RepParameterA @RepParameterB @RepParameterB String parameter, @RepParameterA @RepParameterA @RepParameterB @RepParameterB String @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB ... vararg) {
+ }
+
+ class Inner {
+ Inner(@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB RepeatingOnConstructor RepeatingOnConstructor.this, @RepParameterA @RepParameterA @RepParameterB @RepParameterB String parameter, @RepParameterA @RepParameterA @RepParameterB @RepParameterB String @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB ... vararg) {
+ }
+ }
+}
+
+class RepeatingOnField {
+ @RepFieldA @RepFieldA @RepFieldB @RepFieldB
+ Integer i1;
+
+ @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB Integer i2;
+
+ @RepFieldA @RepFieldA @RepFieldB @RepFieldB
+ @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB Integer i3;
+
+ @RepAllContextsA @RepAllContextsA @RepAllContextsB @RepAllContextsB Integer i4;
+
+ String @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB [] @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB [] sa = null;
+}
+
+class RepeatingOnMethod {
+
+ @RepMethodA @RepMethodA @RepMethodB @RepMethodB
+ String test1() {
+ return null;
+ }
+
+ @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB String test2() {
+ return null;
+ }
+
+ @RepMethodA @RepMethodA @RepMethodB @RepMethodB
+ @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB String test3() {
+ return null;
+ }
+
+ @RepAllContextsA @RepAllContextsA @RepAllContextsB @RepAllContextsB String test4() {
+ return null;
+ }
+
+ String test5(@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB RepeatingOnMethod this, @RepParameterA @RepParameterA @RepParameterB @RepParameterB String parameter, @RepParameterA @RepParameterA @RepParameterB @RepParameterB String @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB ... vararg) {
+ return null;
+ }
+}
+
+class RepeatingOnTypeParametersBoundsTypeArgumentsOnClassDecl <@RepTypeParameterA @RepTypeParameterA @RepTypeParameterB @RepTypeParameterB T extends @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB Object> {
+
+ String genericMethod(T t) {
+ return null;
+ }
+}
+
+class RepeatingOnTypeParametersBoundsTypeArgumentsOnClassDecl2 <@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB T extends @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB Object> {
+
+ String genericMethod(T t) {
+ return null;
+ }
+}
+
+class RepeatingOnTypeParametersBoundsTypeArgumentsOnMethod {
+
+ String test(@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB RepeatingOnTypeParametersBoundsTypeArgumentsOnMethod<@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB T> this) {
+ return null;
+ }
+
+ <@RepTypeParameterA @RepTypeParameterA @RepTypeParameterB @RepTypeParameterB T> String genericMethod(@RepParameterA @RepParameterA @RepParameterB @RepParameterB T t) {
+ return null;
+ }
+
+ <@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB T> String genericMethod2(@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB T t) {
+ return null;
+ }
+}
+
+class RepeatingOnVoidMethodDeclaration {
+
+ @RepMethodA @RepMethodA @RepMethodB @RepMethodB void test() {}
+}
+
+class RepeatingOnStaticMethodOfInterface {
+
+ interface I {
+ static @RepMethodA @RepMethodA @RepMethodB @RepMethodB String m() {
+ return null;
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+@Target({TYPE})
+@Repeatable(ContTypeA.class)
+@Documented
+@interface RepTypeA { }
+
+@Target({TYPE})
+@Documented
+@interface ContTypeA { RepTypeA[] value(); }
+
+@Target({TYPE})
+@Repeatable(ContTypeB.class)
+@Documented
+@interface RepTypeB { }
+
+@Target({TYPE})
+@Documented
+@interface ContTypeB { RepTypeB[] value(); }
+
+//------------------------------------------------------------------------------
+@Target({CONSTRUCTOR})
+@Repeatable(ContConstructorA.class)
+@Documented
+@interface RepConstructorA { }
+
+@Target({CONSTRUCTOR})
+@Documented
+@interface ContConstructorA { RepConstructorA[] value(); }
+
+@Target({CONSTRUCTOR})
+@Repeatable(ContConstructorB.class )
+@Documented
+@interface RepConstructorB { }
+
+@Target({CONSTRUCTOR})
+@Documented
+@interface ContConstructorB { RepConstructorB[] value(); }
+
+//------------------------------------------------------------------------------
+@Target({METHOD})
+@Repeatable(ContMethodA.class)
+@Documented
+@interface RepMethodA {}
+
+@Target({METHOD})
+@Documented
+@interface ContMethodA {
+ RepMethodA[] value();
+}
+
+@Target({METHOD})
+@Repeatable(ContMethodB.class)
+@Documented
+@interface RepMethodB {}
+
+@Target({METHOD})
+@Documented
+@interface ContMethodB {
+ RepMethodB[] value();
+}
+
+//------------------------------------------------------------------------------
+@Target({FIELD})
+@Repeatable(ContFieldA.class)
+@Documented
+@interface RepFieldA {}
+
+@Target({FIELD})
+@Documented
+@interface ContFieldA {
+ RepFieldA[] value();
+}
+
+@Target({FIELD})
+@Repeatable(ContFieldB.class)
+@Documented
+@interface RepFieldB {}
+
+@Target({FIELD})
+@Documented
+@interface ContFieldB {
+ RepFieldB[] value();
+}
+
+//------------------------------------------------------------------------------
+@Target({TYPE_USE})
+@Repeatable(ContTypeUseA.class)
+@Documented
+@interface RepTypeUseA {}
+
+@Target({TYPE_USE})
+@Documented
+@interface ContTypeUseA {
+ RepTypeUseA[] value();
+}
+
+@Target({TYPE_USE})
+@Repeatable(ContTypeUseB.class)
+@Documented
+@interface RepTypeUseB {}
+
+@Target({TYPE_USE})
+@Documented
+@interface ContTypeUseB {
+ RepTypeUseB[] value();
+}
+
+//------------------------------------------------------------------------------
+@Target({TYPE_PARAMETER})
+@Repeatable(ContTypeParameterA.class)
+@Documented
+@interface RepTypeParameterA {}
+
+@Target({TYPE_PARAMETER})
+@Documented
+@interface ContTypeParameterA {
+ RepTypeParameterA[] value();
+}
+
+@Target({TYPE_PARAMETER})
+@Repeatable(ContTypeParameterB.class)
+@Documented
+@interface RepTypeParameterB {}
+
+@Target({TYPE_PARAMETER})
+@Documented
+@interface ContTypeParameterB {
+ RepTypeParameterB[] value();
+}
+
+//------------------------------------------------------------------------------
+@Target({PARAMETER})
+@Repeatable(ContParameterA.class)
+@Documented
+@interface RepParameterA {}
+
+@Target({PARAMETER})
+@Documented
+@interface ContParameterA {
+ RepParameterA[] value();
+}
+
+@Target({PARAMETER})
+@Repeatable(ContParameterB.class)
+@Documented
+@interface RepParameterB {}
+
+@Target({PARAMETER})
+@Documented
+@interface ContParameterB {
+ RepParameterB[] value();
+}
+
+
+//------------------------------------------------------------------------------
+@Target({PACKAGE})
+@Repeatable(ContPackageA.class)
+@Documented
+@interface RepPackageA {}
+
+@Target({PACKAGE})
+@Documented
+@interface ContPackageA {
+ RepPackageA[] value();
+}
+
+@Target({PACKAGE})
+@Repeatable(ContPackageB.class)
+@Documented
+@interface RepPackageB {}
+
+@Target({PACKAGE})
+@Documented
+@interface ContPackageB {
+ RepPackageB[] value();
+}
+
+//------------------------------------------------------------------------------
+@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE, PACKAGE, TYPE_PARAMETER, TYPE_USE})
+@Repeatable(ContAllContextsA.class)
+@Documented
+@interface RepAllContextsA {}
+
+@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE, PACKAGE, TYPE_PARAMETER, TYPE_USE})
+@Documented
+@interface ContAllContextsA {
+ RepAllContextsA[] value();
+}
+
+@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE, PACKAGE, TYPE_PARAMETER, TYPE_USE})
+@Repeatable(ContAllContextsB.class)
+@Documented
+@interface RepAllContextsB {}
+
+@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE, PACKAGE, TYPE_PARAMETER, TYPE_USE})
+@Documented
+@interface ContAllContextsB {
+ RepAllContextsB[] value();
+}
diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testUseOption/TestUseOption.java
--- a/langtools/test/jdk/javadoc/doclet/testUseOption/TestUseOption.java Wed Jul 05 21:27:27 2017 +0200
+++ b/langtools/test/jdk/javadoc/doclet/testUseOption/TestUseOption.java Mon Mar 14 15:04:57 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4496290 4985072 7006178 7068595 8016328 8050031 8048351 8081854
+ * @bug 4496290 4985072 7006178 7068595 8016328 8050031 8048351 8081854 8071982
* @summary A simple test to ensure class-use files are correct.
* @author jamieh
* @library ../lib
@@ -121,6 +121,21 @@
"" +
"withTypeParametersOfType"
);
+ checkOutput("pkg1/class-use/UsedInterface.html", true,
+ "Subinterfaces of "
+ + "UsedInterface in pkg1",
+ "interface | \n"
+ + "SubInterface<T> | "
+ );
+ checkOutput("pkg1/class-use/UsedThrowable.html", true,
+ "Methods in pkg1 that throw "
+ + "UsedThrowable",
+ "void | \nC1."
+ + "methodInC1ThrowsThrowable"
+ + "() | "
+ );
}
@Test
@@ -128,7 +143,7 @@
javadoc("-d", "out-2",
"-sourcepath", testSrc,
"-use",
- testSrc("C.java"), testSrc("UsedInC.java"));
+ testSrc("C.java"), testSrc("UsedInC.java"), "pkg3");
checkExit(Exit.OK);
checkOutput("class-use/UsedInC.html", true,
@@ -140,7 +155,9 @@
);
checkOutput("package-use.html", true,
""
- + "UsedInC | "
+ + "UsedInC | ",
+ "<Unnamed> | \n"
+ + " | "
);
}
diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/C1.java
--- a/langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/C1.java Wed Jul 05 21:27:27 2017 +0200
+++ b/langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/C1.java Mon Mar 14 15:04:57 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -47,10 +47,13 @@
return null;
}
+ public void methodInC1ThrowsThrowable() throws UsedThrowable {
+ }
+
/*
* this must not appear anywhere.
*/
UsedClass methodInC1Protected(List p){
- return p;
+ return p.get(0);
}
}
diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/C9.java
--- a/langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/C9.java Wed Jul 05 21:27:27 2017 +0200
+++ b/langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/C9.java Mon Mar 14 15:04:57 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,5 +28,10 @@
*
*/
public class C9 implements UsedInterface, UsedInterfaceA {
+ @Override
public void doNothing(){}
+
+ @Override
+ public void doNothingA() {
+ }
}
diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/SubInterface.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/SubInterface.java Mon Mar 14 15:04:57 2016 -0700
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * An interface
+ *
+ */
+
+package pkg1;
+
+public interface SubInterface extends UsedInterface {
+
+ /**
+ * Does nothing
+ */
+ void doNothingS();
+}
diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/UsedThrowable.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/UsedThrowable.java Mon Mar 14 15:04:57 2016 -0700
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg1;
+
+public class UsedThrowable extends Throwable {
+}
diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testUseOption/pkg3/C.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/jdk/javadoc/doclet/testUseOption/pkg3/C.java Mon Mar 14 15:04:57 2016 -0700
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg3;
+
+public class C {}
diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/tool/VerifyLocale.java
--- a/langtools/test/jdk/javadoc/tool/VerifyLocale.java Wed Jul 05 21:27:27 2017 +0200
+++ b/langtools/test/jdk/javadoc/tool/VerifyLocale.java Mon Mar 14 15:04:57 2016 -0700
@@ -25,6 +25,7 @@
* @test
* @bug 8035473
* @summary Verify that init method works correctly.
+ * @ignore 8149565
* @modules jdk.javadoc
*/
@@ -40,6 +41,10 @@
import jdk.javadoc.doclet.DocletEnvironment;
public class VerifyLocale implements Doclet {
+ static String language;
+ static String country;
+ static String variant;
+
Locale locale;
Reporter reporter;
@@ -48,20 +53,29 @@
new java.io.File(System.getProperty("test.src", "."),
"VerifyLocale.java");
- String[] argarray = {
- // jumble the options in some weird order
- "-doclet", "VerifyLocale",
- "-locale", "ja",
- "-docletpath", System.getProperty("test.classes", "."),
- thisFile
- };
- if (jdk.javadoc.internal.tool.Main.execute(argarray) != 0)
- throw new Error("Javadoc encountered warnings or errors.");
+ for (Locale loc : Locale.getAvailableLocales()) {
+ language = loc.getLanguage();
+ country = loc.getCountry();
+ variant = loc.getVariant();
+ if (!language.equals("")) {
+ String[] command_line = {
+ // jumble the options in some weird order
+ "-doclet", "VerifyLocale",
+ "-locale", language + (country.equals("") ? "" : ("_" + country + (variant.equals("") ? "" : "_" + variant))),
+ "-docletpath", System.getProperty("test.classes", "."),
+ thisFile
+ };
+ if (jdk.javadoc.internal.tool.Main.execute(command_line) != 0)
+ throw new Error("Javadoc encountered warnings or errors.");
+ }
+ }
}
public boolean run(DocletEnvironment root) {
reporter.print(Kind.NOTE, "just a test: Locale is: " + locale.getDisplayName());
- return locale.getDisplayName(Locale.ENGLISH).contains("Japan");
+ return language.equals(locale.getLanguage())
+ && country.equals(locale.getCountry())
+ && variant.equals(locale.getVariant());
}
@Override