--- old/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java 2018-01-03 07:34:27.283871921 -0800 +++ new/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java 2018-01-03 07:34:26.833830779 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2018, 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 @@ -265,7 +265,7 @@ .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") --- old/test/langtools/jdk/javadoc/doclet/testMethodTypes/TestMethodTypes.java 2018-01-03 07:34:28.306965451 -0800 +++ new/test/langtools/jdk/javadoc/doclet/testMethodTypes/TestMethodTypes.java 2018-01-03 07:34:27.853924035 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2018, 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,8 +23,8 @@ /* * @test - * @bug 8002304 8024096 - * @summary Test for various method types in the method summary table + * @bug 8002304 8024096 8193671 + * @summary Test for various method type tabs in the method summary table * @author Bhavesh Patel * @library ../lib * @modules jdk.javadoc/jdk.javadoc.internal.tool @@ -62,13 +62,18 @@ ""); checkOutput("pkg1/B.html", true, - "All " - + "Methods " - + "" - + "Instance Methods " - + "" - + "Abstract Methods " - + ""); + "var methods = {\"i0\":6,\"i1\":18,\"i2\":18,\"i3\":1,\"i4\":1," + + "\"i5\":6,\"i6\":6,\"i7\":6,\"i8\":6};\n", + "All Methods" + + " " + + "Static Methods" + + " " + + "Instance Methods" + + " " + + "Abstract Methods" + + " " + + "Default Methods" + + " \n"); checkOutput("pkg1/D.html", true, "var methods = {", --- old/test/langtools/jdk/javadoc/doclet/testMethodTypes/pkg1/A.java 2018-01-03 07:34:29.626086043 -0800 +++ new/test/langtools/jdk/javadoc/doclet/testMethodTypes/pkg1/A.java 2018-01-03 07:34:28.974026433 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2018, 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 @@ -44,6 +44,7 @@ /** * This is the third concrete instance method. + * @return a string */ public String getParameter() { return "test"; --- old/test/langtools/jdk/javadoc/doclet/testMethodTypes/pkg1/B.java 2018-01-03 07:34:30.673181767 -0800 +++ new/test/langtools/jdk/javadoc/doclet/testMethodTypes/pkg1/B.java 2018-01-03 07:34:30.236141814 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2018, 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 @@ -24,8 +24,8 @@ package pkg1; /** - * This interface has different types of methods such as "Instance Methods" and - * "Abstract Methods". All the tabs will display same list of methods. + * This interface has different types of methods such as "Static Methods", + * "Instance Methods", "Abstract Methods", "Default Methods". */ public interface B { @@ -36,21 +36,45 @@ /** * This is the second abstract instance method. + * @return a string */ public String getName(); /** * This is the third abstract instance method. + * @return a boolean value */ public boolean addEntry(); /** * This is the fourth abstract instance method. + * @return a boolean value */ public boolean removeEntry(); /** * This is the fifth abstract instance method. + * @return a string */ public String getPermissions(); + + /** + * A static interface method. + */ + public static void aStaticMethod() {} + + /** + * Another static interface method. + */ + public static void anotherStaticMethod() {} + + /** + * A default method. + */ + public default void aDefaultMethod() {} + + /** + * Another default method. + */ + public default void anotherDefaultMethod() {} } --- old/test/langtools/jdk/javadoc/doclet/testMethodTypes/pkg1/D.java 2018-01-03 07:34:31.916295411 -0800 +++ new/test/langtools/jdk/javadoc/doclet/testMethodTypes/pkg1/D.java 2018-01-03 07:34:31.412249332 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2018, 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 @@ -46,6 +46,7 @@ /** * This is the second concrete instance method. + * @return a string */ public String getParameter() { return "test";