diff --git a/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java b/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java index 0e6345a0170..9b7e7c3f12e 100644 --- a/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java +++ b/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java @@ -23,7 +23,8 @@ /* * @test - * @bug 4682448 4947464 5029946 8025633 8026567 8035473 8139101 8175200 8186332 + * @bug 4682448 4947464 5029946 8025633 8026567 8035473 8139101 8175200 + 8186332 8186703 * @summary Verify that the public modifier does not show up in the * documentation for public methods, as recommended by the JLS. * If A implements I and B extends A, B should be in the list of @@ -122,10 +123,36 @@ public class TestInterface extends JavadocTester { "public int method()", "public static final int field"); - checkOutput("pkg/ClassWithStaticMethod.html", false, + checkOutput("pkg/ClassWithStaticMembers.html", false, //Make sure "Specified By" does not appear on class documentation when //the method is a static method in the interface. "
public static int f\n" + + "
static void"
+ + "m()public static void staticMethod()\n" + + "
"
+ + ""
+ + "InterfaceWithStaticMemberspublic static class "
+ + "ClassWithStaticMembers.InnerClass\n"
+ + "extends java.lang.Object\n"
+ + ""
+ + "Spliterator\n"
+ + ""
+ "Spliterator.OfDouble, Spliterator.OfInt<"
+ ""
diff --git a/test/langtools/jdk/javadoc/doclet/testInterface/pkg/ClassWithStaticMethod.java b/test/langtools/jdk/javadoc/doclet/testInterface/pkg/ClassWithStaticMembers.java
similarity index 71%
rename from test/langtools/jdk/javadoc/doclet/testInterface/pkg/ClassWithStaticMethod.java
rename to test/langtools/jdk/javadoc/doclet/testInterface/pkg/ClassWithStaticMembers.java
index db4e0315c24..159d329e805 100644
--- a/test/langtools/jdk/javadoc/doclet/testInterface/pkg/ClassWithStaticMethod.java
+++ b/test/langtools/jdk/javadoc/doclet/testInterface/pkg/ClassWithStaticMembers.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, 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,9 +23,18 @@
package pkg;
-public class ClassWithStaticMethod implements InterfaceWithStaticMethod {
+public class ClassWithStaticMembers implements InterfaceWithStaticMembers {
- public static void staticMethod() {
- }
+ /** A hider inner class */
+ public static class InnerClass{}
+
+ /** A hider field */
+ public static int f = 1;
+
+ /** A hider method */
+ public static void m(){}
+
+ // no comment
+ public static void staticMethod() {}
}
diff --git a/test/langtools/jdk/javadoc/doclet/testInterface/pkg/InterfaceWithStaticMethod.java b/test/langtools/jdk/javadoc/doclet/testInterface/pkg/InterfaceWithStaticMembers.java
similarity index 79%
rename from test/langtools/jdk/javadoc/doclet/testInterface/pkg/InterfaceWithStaticMethod.java
rename to test/langtools/jdk/javadoc/doclet/testInterface/pkg/InterfaceWithStaticMembers.java
index 2442ce390df..4da861917ae 100644
--- a/test/langtools/jdk/javadoc/doclet/testInterface/pkg/InterfaceWithStaticMethod.java
+++ b/test/langtools/jdk/javadoc/doclet/testInterface/pkg/InterfaceWithStaticMembers.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, 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,10 +23,14 @@
package pkg;
-public interface InterfaceWithStaticMethod {
+public interface InterfaceWithStaticMembers {
- /**
- * A static method
- */
+ /** A static nested class */
+ static class InnerClass {}
+
+ /** A static field */
+ static int f = 0;
+
+ /** A static method */
static void staticMethod() { }
}