1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/doclint/anchorTests/p/Test.java Wed Apr 27 01:34:52 2016 +0800 1.3 @@ -0,0 +1,53 @@ 1.4 +/* @test /nodynamiccopyright/ 1.5 + * @bug 8025246 1.6 + * @summary doclint is showing error on anchor already defined when it's not 1.7 + * @library ../.. 1.8 + * @build DocLintTester 1.9 + * @run main DocLintTester -ref Test.out Test.java 1.10 + * @compile/fail/ref=Test.javac.out -XDrawDiagnostics -Werror -Xdoclint:all Test.java 1.11 + */ 1.12 + 1.13 +package p; 1.14 + 1.15 +/** 1.16 + * <a name="dupTest">dupTest</a> 1.17 + * <a name="dupTest">dupTest again</a> 1.18 + * 1.19 + * <a name="dupTestField">dupTestField</a> 1.20 + * <a name="dupTestMethod">dupTestMethod</a> 1.21 + 1.22 + * <a name="okClass">okClass</a> 1.23 + * <a name="okField">okField</a> 1.24 + * <a name="okMethod">okMethod</a> 1.25 + */ 1.26 +public class Test { 1.27 + /** <a name="dupTestField">dupTestField again</a> */ 1.28 + public int f; 1.29 + 1.30 + /** <a name="dupTestMethod">dupTestMethod again</a> */ 1.31 + public void m() { } 1.32 + 1.33 + /** 1.34 + * <a name="dupNested">dupNested</a> 1.35 + * <a name="dupNested">dupNested again</a> 1.36 + * <a name="dupNestedField">dupNestedField</a> 1.37 + * <a name="dupNestedMethod">dupNestedMethod</a> 1.38 + * 1.39 + * <a name="okClass">okClass again</a> 1.40 + */ 1.41 + public class Nested { 1.42 + /** 1.43 + * <a name="dupNestedField">dupNestedField</a> 1.44 + * 1.45 + * <a name="okField">okField again</a> 1.46 + */ 1.47 + public int f; 1.48 + 1.49 + /** 1.50 + * <a name="dupNestedMethod">dupNestedMethod</a> 1.51 + * 1.52 + * <a name="okMethod">okMethod again</a> 1.53 + */ 1.54 + public void m() { } 1.55 + } 1.56 +}