RFR: 8193671: Default Methods tab under Method Summary includes static methods

Jonathan Gibbons jonathan.gibbons at oracle.com
Wed Jan 3 22:11:26 UTC 2018


Re:

@@ -263,11 +263,11 @@
                  .addTab(resources.getText("doclet.Instance_Methods"), e -> !utils.isStatic(e))
                  .addTab(resources.getText("doclet.Abstract_Methods"), utils::isAbstract)
                  .addTab(resources.getText("doclet.Concrete_Methods"),
                          e -> !utils.isAbstract(e) && !utils.isInterface(e.getEnclosingElement()))
                  .addTab(resources.getText("doclet.Default_Methods"),
-                        e -> !utils.isAbstract(e) && utils.isInterface(e.getEnclosingElement()))
+                        e -> !utils.isAbstract(e) && utils.isInterface(e.getEnclosingElement()) && utils.isDefault(e))
                  .addTab(resources.getText("doclet.Deprecated_Methods"),
                          e -> utils.isDeprecated(e) || utils.isDeprecated(typeElement))
                  .setTabScriptVariable("methods")
                  .setTabScript(i -> "show(" + i + ");")
                  .setUseTBody(false)


Why is the new code not just

-                 .addTab(resources.getText("doclet.Default_Methods"),
-                        e -> !utils.isAbstract(e) && utils.isInterface(e.getEnclosingElement()))
+                  .addTab(resources.getText("doclet.Default_Methods"), utils::isDefault)


-- Jon

On 01/03/2018 08:34 AM, Kumar Srinivasan wrote:
> Hello,
>
> Please review simple fix for the above bug, most of the changes are in 
> the
> tests to eliminates warnings and the expected output.
>
> Thanks
> Kumar
>
> Webrev:
> http://cr.openjdk.java.net/~ksrini/8193671/webrev-00/
>
> Doc images:
> http://cr.openjdk.java.net/~ksrini/8193671/docs/api/java/util/List.html



More information about the javadoc-dev mailing list