From 34189c8a9c1d5c8b01382dddf80f44bb5f3d3724 Mon Sep 17 00:00:00 2001 From: bpatel Date: Thu, 2 Jan 2014 02:15:21 -0800 Subject: 8029143: javadoc standard doclet should add Functional Interface blurb when @FunctionalInterface annotation is present Reviewed-by: jjg --- .../testLambdaFeature/TestLambdaFeature.java | 7 +++++- test/com/sun/javadoc/testLambdaFeature/pkg/A.java | 3 ++- .../javadoc/testLambdaFeature/pkg1/FuncInf.java | 1 + .../testLambdaFeature/pkg1/NotAFuncInf.java | 29 ++++++++++++++++++++++ 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 test/com/sun/javadoc/testLambdaFeature/pkg1/NotAFuncInf.java (limited to 'test') diff --git a/test/com/sun/javadoc/testLambdaFeature/TestLambdaFeature.java b/test/com/sun/javadoc/testLambdaFeature/TestLambdaFeature.java index 151549b5..5d8c3334 100644 --- a/test/com/sun/javadoc/testLambdaFeature/TestLambdaFeature.java +++ b/test/com/sun/javadoc/testLambdaFeature/TestLambdaFeature.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8004893 8022738 + * @bug 8004893 8022738 8029143 * @summary Make sure that the lambda feature changes work fine in * javadoc. * @author bpatel @@ -81,6 +81,11 @@ public class TestLambdaFeature extends JavadocTester { "
default default void defaultMethod()
"}, {BUG_ID + FS + "pkg" + FS + "B.html", "default void"}, + {BUG_ID + FS + "pkg1" + FS + "NotAFuncInf.html", + "
" + NL + "
Functional Interface:
" + NL + + "
This is a functional interface and can therefore be used as " + + "the assignment target for a lambda expression or method " + + "reference.
" + NL + "
"}, {BUG_ID + FS + "pkg" + FS + "B.html", "
" + NL + "
Functional Interface:
"} }; diff --git a/test/com/sun/javadoc/testLambdaFeature/pkg/A.java b/test/com/sun/javadoc/testLambdaFeature/pkg/A.java index c52f249b..1ef8ac5b 100644 --- a/test/com/sun/javadoc/testLambdaFeature/pkg/A.java +++ b/test/com/sun/javadoc/testLambdaFeature/pkg/A.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2013, 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,7 @@ package pkg; +@FunctionalInterface public interface A { public void method1(); diff --git a/test/com/sun/javadoc/testLambdaFeature/pkg1/FuncInf.java b/test/com/sun/javadoc/testLambdaFeature/pkg1/FuncInf.java index 566acf59..bace6ea9 100644 --- a/test/com/sun/javadoc/testLambdaFeature/pkg1/FuncInf.java +++ b/test/com/sun/javadoc/testLambdaFeature/pkg1/FuncInf.java @@ -23,6 +23,7 @@ package pkg1; +@FunctionalInterface public interface FuncInf { V call() throws Exception; diff --git a/test/com/sun/javadoc/testLambdaFeature/pkg1/NotAFuncInf.java b/test/com/sun/javadoc/testLambdaFeature/pkg1/NotAFuncInf.java new file mode 100644 index 00000000..6c366869 --- /dev/null +++ b/test/com/sun/javadoc/testLambdaFeature/pkg1/NotAFuncInf.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2013, 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 interface NotAFuncInf { + + V call() throws Exception; +} -- cgit v1.2.3