View | Details | Raw Unified | Return to bug 222188 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java (-6 / +67 lines)
Lines 1970-1980 Link Here
1970
			},
1970
			},
1971
			//comment6a\test\Invalid.java:8: warning - Tag @link: reference not found: Inner
1971
			//comment6a\test\Invalid.java:8: warning - Tag @link: reference not found: Inner
1972
			//comment6a\test\Invalid2.java:8: warning - Tag @see: reference not found: Test.Inner => bug ID: 4464323
1972
			//comment6a\test\Invalid2.java:8: warning - Tag @see: reference not found: Test.Inner => bug ID: 4464323
1973
			// => bug ID: 4464323 - fixed by // https://bugs.eclipse.org/bugs/show_bug.cgi?id=222188: partially qualified references should be warned
1973
			"----------\n" + 
1974
			"----------\n" + 
1974
			"1. ERROR in comment6a\\test\\Invalid.java (at line 4)\n" + 
1975
			"1. ERROR in comment6a\\test\\Invalid.java (at line 4)\n" + 
1975
			"	* See also {@link Inner}\n" + 
1976
			"	* See also {@link Inner}\n" + 
1976
			"	                  ^^^^^\n" + 
1977
			"	                  ^^^^^\n" + 
1977
			"Javadoc: Invalid member type qualification\n" + 
1978
			"Javadoc: Invalid member type qualification\n" + 
1979
			"----------\n" + 
1980
			"----------\n" + 
1981
			"1. ERROR in comment6a\\test\\Invalid2.java (at line 4)\n" + 
1982
			"	* @see Test.Inner\n" + 
1983
			"	       ^^^^^^^^^^\n" + 
1984
			"Javadoc: Invalid member type qualification\n" + 
1978
			"----------\n"
1985
			"----------\n"
1979
		);
1986
		);
1980
	}
1987
	}
Lines 2271-2281 Link Here
2271
			},
2278
			},
2272
			//comment6a\test\Invalid.java:8: warning - Tag @link: reference not found: Inner
2279
			//comment6a\test\Invalid.java:8: warning - Tag @link: reference not found: Inner
2273
			//comment6a\test\Invalid2.java:8: warning - Tag @see: reference not found: Test.Inner => bug ID: 4464323
2280
			//comment6a\test\Invalid2.java:8: warning - Tag @see: reference not found: Test.Inner => bug ID: 4464323
2281
			// => bug ID: 4464323 - fixed by // https://bugs.eclipse.org/bugs/show_bug.cgi?id=222188: partially qualified references should be warned
2274
			"----------\n" + 
2282
			"----------\n" + 
2275
			"1. ERROR in comment6a\\test\\Invalid.java (at line 4)\n" + 
2283
			"1. ERROR in comment6a\\test\\Invalid.java (at line 4)\n" + 
2276
			"	* See also {@link Inner}\n" + 
2284
			"	* See also {@link Inner}\n" + 
2277
			"	                  ^^^^^\n" + 
2285
			"	                  ^^^^^\n" + 
2278
			"Javadoc: Invalid member type qualification\n" + 
2286
			"Javadoc: Invalid member type qualification\n" + 
2287
			"----------\n" + 
2288
			"----------\n" + 
2289
			"1. ERROR in comment6a\\test\\Invalid2.java (at line 4)\n" + 
2290
			"	* @see Test.Inner\n" + 
2291
			"	       ^^^^^^^^^^\n" + 
2292
			"Javadoc: Invalid member type qualification\n" + 
2279
			"----------\n"
2293
			"----------\n"
2280
		);
2294
		);
2281
	}
2295
	}
Lines 3352-3357 Link Here
3352
			"	* @see A3.A4#foo(V)\n" + 
3366
			"	* @see A3.A4#foo(V)\n" + 
3353
			"	             ^^^\n" + 
3367
			"	             ^^^\n" + 
3354
			"Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (V)\n" + 
3368
			"Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (V)\n" + 
3369
			"----------\n" + 
3370
			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=222188: partially qualified references should be warned
3371
			"2. ERROR in p2\\X.java (at line 10)\n" + 
3372
			"	* @see A3.A4#foo(Object)\n" + 
3373
			"	       ^^^^^\n" + 
3374
			"Javadoc: Invalid member type qualification\n" + 
3355
			"----------\n"
3375
			"----------\n"
3356
		);
3376
		);
3357
	}
3377
	}
Lines 3398-3403 Link Here
3398
			"	* @see A.A1.A2.A3.A4#foo(V)\n" + 
3418
			"	* @see A.A1.A2.A3.A4#foo(V)\n" + 
3399
			"	                     ^^^\n" + 
3419
			"	                     ^^^\n" + 
3400
			"Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (V)\n" + 
3420
			"Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (V)\n" + 
3421
			"----------\n" + 
3422
			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=222188: partially qualified references should be warned
3423
			"2. ERROR in p2\\X.java (at line 10)\n" + 
3424
			"	* @see A.A1.A2.A3.A4#foo(Object)\n" + 
3425
			"	       ^^^^^^^^^^^^^\n" + 
3426
			"Javadoc: Invalid member type qualification\n" + 
3401
			"----------\n"
3427
			"----------\n"
3402
		);
3428
		);
3403
	}
3429
	}
Lines 3660-3666 Link Here
3660
	public void testBug209936_MemberQualifiedSingleReference1() {
3686
	public void testBug209936_MemberQualifiedSingleReference1() {
3661
		reportMissingJavadocTags = CompilerOptions.IGNORE;
3687
		reportMissingJavadocTags = CompilerOptions.IGNORE;
3662
		reportMissingJavadocCommentsVisibility = CompilerOptions.WARNING;
3688
		reportMissingJavadocCommentsVisibility = CompilerOptions.WARNING;
3663
		runConformTest(
3689
		runNegativeTest(
3664
			new String[] {
3690
			new String[] {
3665
				"p1/A.java",
3691
				"p1/A.java",
3666
				"package p1;\n" + 
3692
				"package p1;\n" + 
Lines 3696-3709 Link Here
3696
				"		}\n" + 
3722
				"		}\n" + 
3697
				"	}\n" + 
3723
				"	}\n" + 
3698
				"}"
3724
				"}"
3699
			}
3725
			},
3726
			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=222188: partially qualified references should be warned
3727
			"----------\n" + 
3728
			"1. ERROR in p2\\X.java (at line 9)\r\n" + 
3729
			"	* @see A3.A4#foo(Object)\r\n" + 
3730
			"	       ^^^^^\n" + 
3731
			"Javadoc: Invalid member type qualification\n" + 
3732
			"----------\n" + 
3733
			"2. ERROR in p2\\X.java (at line 10)\r\n" + 
3734
			"	* @see A2.A3.A4#foo(Object)\r\n" + 
3735
			"	       ^^^^^^^^\n" + 
3736
			"Javadoc: Invalid member type qualification\n" + 
3737
			"----------\n" + 
3738
			"3. ERROR in p2\\X.java (at line 11)\r\n" + 
3739
			"	* @see A1.A2.A3.A4#foo(Object)\r\n" + 
3740
			"	       ^^^^^^^^^^^\n" + 
3741
			"Javadoc: Invalid member type qualification\n" + 
3742
			"----------\n"
3700
		);
3743
		);
3701
	}
3744
	}
3702
3745
3703
	public void testBug209936_MemberQualifiedSingleReference2() {
3746
	public void testBug209936_MemberQualifiedSingleReference2() {
3704
		reportMissingJavadocTags = CompilerOptions.IGNORE;
3747
		reportMissingJavadocTags = CompilerOptions.IGNORE;
3705
		reportMissingJavadocCommentsVisibility = CompilerOptions.WARNING;
3748
		reportMissingJavadocCommentsVisibility = CompilerOptions.WARNING;
3706
		runConformTest(
3749
		runNegativeTest(
3707
			new String[] {
3750
			new String[] {
3708
				"p1/A.java",
3751
				"p1/A.java",
3709
				"package p1;\n" + 
3752
				"package p1;\n" + 
Lines 3746-3752 Link Here
3746
				"		}\n" + 
3789
				"		}\n" + 
3747
				"	}\n" + 
3790
				"	}\n" + 
3748
				"}"
3791
				"}"
3749
			}
3792
			},
3793
			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=222188: partially qualified references should be warned
3794
			"----------\n" + 
3795
			"1. ERROR in p2\\X.java (at line 11)\r\n" + 
3796
			"	* @see A5.A6#foo(Object)\r\n" + 
3797
			"	       ^^^^^\n" + 
3798
			"Javadoc: Invalid member type qualification\n" + 
3799
			"----------\n" + 
3800
			"2. ERROR in p2\\X.java (at line 12)\r\n" + 
3801
			"	* @see A4.A5.A6#foo(Object)\r\n" + 
3802
			"	       ^^^^^^^^\n" + 
3803
			"Javadoc: Invalid member type qualification\n" + 
3804
			"----------\n"
3750
		);
3805
		);
3751
	}
3806
	}
3752
3807
Lines 3789-3796 Link Here
3789
				"}"
3844
				"}"
3790
			},
3845
			},
3791
			"----------\n" + 
3846
			"----------\n" + 
3792
			"1. ERROR in p2\\X.java (at line 10)\r\n" + 
3847
			"1. ERROR in p2\\X.java (at line 9)\n" + 
3793
			"	* @see A.A1.A2.A3.A4#foo(R)\r\n" + 
3848
			"	* @see A.A1.A2.A3.A4#foo(Object)\n" + 
3849
			"	       ^^^^^^^^^^^^^\n" + 
3850
			"Javadoc: Invalid member type qualification\n" + 
3851
			"----------\n" + 
3852
			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=222188: partially qualified references should be warned
3853
			"2. ERROR in p2\\X.java (at line 10)\n" + 
3854
			"	* @see A.A1.A2.A3.A4#foo(R)\n" + 
3794
			"	                     ^^^\n" + 
3855
			"	                     ^^^\n" + 
3795
			"Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (R)\n" + 
3856
			"Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (R)\n" + 
3796
			"----------\n"
3857
			"----------\n"
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_3.java (+14 lines)
Lines 2735-2740 Link Here
2735
			//comment6a\def\Test.java:6: warning - Tag @see: reference not found: Inner
2735
			//comment6a\def\Test.java:6: warning - Tag @see: reference not found: Inner
2736
			//comment6a\test\Invalid.java:8: warning - Tag @link: reference not found: Inner
2736
			//comment6a\test\Invalid.java:8: warning - Tag @link: reference not found: Inner
2737
			//comment6a\test\Invalid2.java:8: warning - Tag @see: reference not found: Test.Inner => bug ID: 4464323
2737
			//comment6a\test\Invalid2.java:8: warning - Tag @see: reference not found: Test.Inner => bug ID: 4464323
2738
			// => bug ID: 4464323 - fixed by // https://bugs.eclipse.org/bugs/show_bug.cgi?id=222188: partially qualified references should be warned
2738
			"----------\n" + 
2739
			"----------\n" + 
2739
			"1. ERROR in comment6a\\def\\Test.java (at line 4)\n" + 
2740
			"1. ERROR in comment6a\\def\\Test.java (at line 4)\n" + 
2740
			"	* @see Inner\n" + 
2741
			"	* @see Inner\n" + 
Lines 2746-2751 Link Here
2746
			"	* See also {@link Inner}\n" + 
2747
			"	* See also {@link Inner}\n" + 
2747
			"	                  ^^^^^\n" + 
2748
			"	                  ^^^^^\n" + 
2748
			"Javadoc: Invalid member type qualification\n" + 
2749
			"Javadoc: Invalid member type qualification\n" + 
2750
			"----------\n" + 
2751
			"----------\n" + 
2752
			"1. ERROR in comment6a\\test\\Invalid2.java (at line 4)\n" + 
2753
			"	* @see Test.Inner\n" + 
2754
			"	       ^^^^^^^^^^\n" + 
2755
			"Javadoc: Invalid member type qualification\n" + 
2749
			"----------\n"
2756
			"----------\n"
2750
		);
2757
		);
2751
	}
2758
	}
Lines 3056-3061 Link Here
3056
			//comment6a\def\Test.java:6: warning - Tag @see: reference not found: Inner
3063
			//comment6a\def\Test.java:6: warning - Tag @see: reference not found: Inner
3057
			//comment6a\test\Invalid.java:8: warning - Tag @link: reference not found: Inner
3064
			//comment6a\test\Invalid.java:8: warning - Tag @link: reference not found: Inner
3058
			//comment6a\test\Invalid2.java:8: warning - Tag @see: reference not found: Test.Inner => bug ID: 4464323
3065
			//comment6a\test\Invalid2.java:8: warning - Tag @see: reference not found: Test.Inner => bug ID: 4464323
3066
			// => bug ID: 4464323 - fixed by // https://bugs.eclipse.org/bugs/show_bug.cgi?id=222188: partially qualified references should be warned
3059
			"----------\n" + 
3067
			"----------\n" + 
3060
			"1. ERROR in comment6a\\def\\Test.java (at line 4)\n" + 
3068
			"1. ERROR in comment6a\\def\\Test.java (at line 4)\n" + 
3061
			"	* @see Inner\n" + 
3069
			"	* @see Inner\n" + 
Lines 3067-3072 Link Here
3067
			"	* See also {@link Inner}\n" + 
3075
			"	* See also {@link Inner}\n" + 
3068
			"	                  ^^^^^\n" + 
3076
			"	                  ^^^^^\n" + 
3069
			"Javadoc: Invalid member type qualification\n" + 
3077
			"Javadoc: Invalid member type qualification\n" + 
3078
			"----------\n" + 
3079
			"----------\n" + 
3080
			"1. ERROR in comment6a\\test\\Invalid2.java (at line 4)\n" + 
3081
			"	* @see Test.Inner\n" + 
3082
			"	       ^^^^^^^^^^\n" + 
3083
			"Javadoc: Invalid member type qualification\n" + 
3070
			"----------\n"
3084
			"----------\n"
3071
		);
3085
		);
3072
	}
3086
	}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java (-54 / +113 lines)
Lines 1959-1982 Link Here
1959
1959
1960
	// @see Classes references
1960
	// @see Classes references
1961
	public void test090() {
1961
	public void test090() {
1962
		this.runConformReferenceTest(
1962
		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=222188: partially qualified references should be warned
1963
		// warning - Tag @see: reference not found: Visibility.AvcPublic invalid ref for javadoc too
1964
		// warning - Tag @see: reference not found: test.Visibility.AvcPublic invalid ref for javadoc too
1965
		runNegativeReferenceTest(
1963
			new String[] {
1966
			new String[] {
1964
				"test/X.java",
1967
				"test/X.java",
1965
				"package test;\n"
1968
				"package test;\n" +
1966
					+ "public class X {\n"
1969
				"public class X {\n" +
1967
					+ "	/**\n"
1970
				"	/**\n" +
1968
					+ "	 * Valid local classes references \n"
1971
				"	 * Valid local classes references \n" +
1969
					+ "	 *\n"
1972
				"	 *\n" +
1970
					+ "	 * @see Visibility Valid ref: local class \n"
1973
				"	 * @see Visibility Valid ref: local class \n" +
1971
					+ "	 * @see Visibility.VcPublic Valid ref: visible inner class of local class \n"
1974
				"	 * @see Visibility.VcPublic Valid ref: visible inner class of local class \n" +
1972
					+ "	 * @see Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n"
1975
				"	 * @see Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n" +
1973
					+ "	 * @see test.Visibility Valid ref: local class \n"
1976
				"	 * @see test.Visibility Valid ref: local class \n" +
1974
					+ "	 * @see test.Visibility.VcPublic Valid ref: visible inner class of local class \n"
1977
				"	 * @see test.Visibility.VcPublic Valid ref: visible inner class of local class \n" +
1975
					+ "	 * @see test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n"
1978
				"	 * @see test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n" +
1976
					+ "	 */\n"
1979
				"	 */\n" +
1977
					+ "	public void s_foo() {\n"
1980
				"	public void s_foo() {\n" +
1978
					+ "	}\n"
1981
				"	}\n" +
1979
					+ "}\n" });
1982
				"}\n" },
1983
				"----------\n" + 
1984
				"1. ERROR in test\\X.java (at line 8)\r\n" + 
1985
				"	* @see Visibility.AvcPublic Valid ref: visible inherited inner class of local class \r\n" + 
1986
				"	       ^^^^^^^^^^^^^^^^^^^^\n" + 
1987
				"Javadoc: Invalid member type qualification\n" + 
1988
				"----------\n" + 
1989
				"2. ERROR in test\\X.java (at line 11)\r\n" + 
1990
				"	* @see test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class \r\n" + 
1991
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
1992
				"Javadoc: Invalid member type qualification\n" + 
1993
				"----------\n"
1994
			);
1980
	}
1995
	}
1981
1996
1982
	public void test091() {
1997
	public void test091() {
Lines 2026-2032 Link Here
2026
	}
2041
	}
2027
2042
2028
	public void test092() {
2043
	public void test092() {
2029
		runConformReferenceTest(
2044
		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=222188: partially qualified references should be warned
2045
		// warning - Tag @see: reference not found: VisibilityPublic.VpPublic Valid ref: visible inner class in visible class
2046
		runNegativeReferenceTest(
2030
			new String[] {
2047
			new String[] {
2031
				"test/X.java",
2048
				"test/X.java",
2032
				"package test;\n" +
2049
				"package test;\n" +
Lines 2040-2048 Link Here
2040
				"	 */\n" +
2057
				"	 */\n" +
2041
				"	public void s_foo() {\n" +
2058
				"	public void s_foo() {\n" +
2042
				"	}\n" +
2059
				"	}\n" +
2043
				"}\n"
2060
				"}\n" },
2044
			}
2061
				"----------\n" + 
2045
		);
2062
				"1. ERROR in test\\X.java (at line 8)\r\n" + 
2063
				"	* @see VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \r\n" + 
2064
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2065
				"Javadoc: Invalid member type qualification\n" + 
2066
				"----------\n"
2067
			);
2046
	}
2068
	}
2047
2069
2048
	public void test093() {
2070
	public void test093() {
Lines 2224-2243 Link Here
2224
	}
2246
	}
2225
2247
2226
	public void test102() {
2248
	public void test102() {
2227
		this.runConformReferenceTest(
2249
		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=222188: partially qualified references should be warned
2250
		// warning - Tag @see: reference not found: Visibility.AvcPublic#avf_public Valid ref: visible field of inherited visible inner class
2251
		runNegativeReferenceTest(
2228
			new String[] {
2252
			new String[] {
2229
				"test/X.java",
2253
				"test/X.java",
2230
				"package test;\n"
2254
				"package test;\n" +
2231
					+ "public class X {\n"
2255
				"public class X {\n" +
2232
					+ "	/**\n"
2256
				"	/**\n" +
2233
					+ "	 * Valid super class field references in the same package\n"
2257
				"	 * Valid super class field references in the same package\n" +
2234
					+ "	 *\n"
2258
				"	 *\n" +
2235
					+ "	 * @see Visibility#avf_public Valid ref: visible inherited field\n"
2259
				"	 * @see Visibility#avf_public Valid ref: visible inherited field\n" +
2236
					+ "	 * @see Visibility.AvcPublic#avf_public Valid ref: visible field of inherited visible inner class\n"
2260
				"	 * @see Visibility.AvcPublic#avf_public Valid ref: visible field of inherited visible inner class\n" +
2237
					+ "	 */\n"
2261
				"	 */\n" +
2238
					+ "	public void s_foo() {\n"
2262
				"	public void s_foo() {\n" +
2239
					+ "	}\n"
2263
				"	}\n" +
2240
					+ "}\n" });
2264
				"}\n" },
2265
				"----------\n" + 
2266
				"1. ERROR in test\\X.java (at line 7)\r\n" + 
2267
				"	* @see Visibility.AvcPublic#avf_public Valid ref: visible field of inherited visible inner class\r\n" + 
2268
				"	       ^^^^^^^^^^^^^^^^^^^^\n" + 
2269
				"Javadoc: Invalid member type qualification\n" + 
2270
				"----------\n"
2271
			);
2241
	}
2272
	}
2242
2273
2243
	public void test103() {
2274
	public void test103() {
Lines 2492-2498 Link Here
2492
	}
2523
	}
2493
2524
2494
	public void test107() {
2525
	public void test107() {
2495
		runConformReferenceTest(
2526
		// warning - Tag @see: reference not found: VisibilityPublic.VpPublic#vf_public Valid ref to not visible field of other package public inner class
2527
		runNegativeReferenceTest(
2496
			new String[] {
2528
			new String[] {
2497
				"test/X.java",
2529
				"test/X.java",
2498
				"package test;\n" +
2530
				"package test;\n" +
Lines 2506-2514 Link Here
2506
				"	 */\n" +
2538
				"	 */\n" +
2507
				"	public void s_foo() {\n" +
2539
				"	public void s_foo() {\n" +
2508
				"	}\n" +
2540
				"	}\n" +
2509
				"}\n"
2541
				"}\n" },
2510
			}
2542
				"----------\n" + 
2511
		);
2543
				"1. ERROR in test\\X.java (at line 8)\r\n" + 
2544
				"	* @see VisibilityPublic.VpPublic#vf_public Valid ref to not visible field of other package public inner class\r\n" + 
2545
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2546
				"Javadoc: Invalid member type qualification\n" + 
2547
				"----------\n"
2548
			);
2512
	}
2549
	}
2513
2550
2514
	public void test108() {
2551
	public void test108() {
Lines 3962-3983 Link Here
3962
	}
3999
	}
3963
4000
3964
	public void test145() {
4001
	public void test145() {
3965
		this.runConformReferenceTest(
4002
		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=222188: partially qualified references should be warned
4003
		// warning - Tag @see: reference not found: Visibility.AvcPublic#avm_public() Valid ref: visible inherited method in visible inner class
4004
		// warning - Tag @see: reference not found: test.Visibility.AvcPublic#avm_public() Valid ref: visible inherited method in visible inner class
4005
		runNegativeReferenceTest(
3966
			new String[] {
4006
			new String[] {
3967
				"test/X.java",
4007
				"test/X.java",
3968
				"package test;\n"
4008
				"package test;\n" +
3969
					+ "public class X {\n"
4009
				"public class X {\n" +
3970
					+ "	/**\n"
4010
				"	/**\n" +
3971
					+ "	 * Valid package super class methods references\n"
4011
				"	 * Valid package super class methods references\n" +
3972
					+ "	 * \n"
4012
				"	 * \n" +
3973
					+ "	 * @see Visibility#avm_public() Valid ref: visible inherited method\n"
4013
				"	 * @see Visibility#avm_public() Valid ref: visible inherited method\n" +
3974
					+ "	 * @see Visibility.AvcPublic#avm_public() Valid ref: visible inherited method in visible inner class\n"
4014
				"	 * @see Visibility.AvcPublic#avm_public() Valid ref: visible inherited method in visible inner class\n" +
3975
					+ "	 * @see test.Visibility#avm_public() Valid ref: visible inherited method\n"
4015
				"	 * @see test.Visibility#avm_public() Valid ref: visible inherited method\n" +
3976
					+ "	 * @see test.Visibility.AvcPublic#avm_public() Valid ref: visible inherited method in visible inner class\n"
4016
				"	 * @see test.Visibility.AvcPublic#avm_public() Valid ref: visible inherited method in visible inner class\n" +
3977
					+ "	 */  \n"
4017
				"	 */  \n" +
3978
					+ "	public void s_foo() {\n"
4018
				"	public void s_foo() {\n" +
3979
					+ "	}\n"
4019
				"	}\n" +
3980
					+ "}\n" });
4020
				"}\n" },
4021
				"----------\n" + 
4022
				"1. ERROR in test\\X.java (at line 7)\r\n" + 
4023
				"	* @see Visibility.AvcPublic#avm_public() Valid ref: visible inherited method in visible inner class\r\n" + 
4024
				"	       ^^^^^^^^^^^^^^^^^^^^\n" + 
4025
				"Javadoc: Invalid member type qualification\n" + 
4026
				"----------\n" + 
4027
				"2. ERROR in test\\X.java (at line 9)\r\n" + 
4028
				"	* @see test.Visibility.AvcPublic#avm_public() Valid ref: visible inherited method in visible inner class\r\n" + 
4029
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
4030
				"Javadoc: Invalid member type qualification\n" + 
4031
				"----------\n"
4032
			);
3981
	}
4033
	}
3982
4034
3983
	public void test146() {
4035
	public void test146() {
Lines 4454-4460 Link Here
4454
	}
4506
	}
4455
4507
4456
	public void test154() {
4508
	public void test154() {
4457
		runConformReferenceTest(
4509
		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=222188: partially qualified references should be warned
4510
		// warning - Tag @see: reference not found: VisibilityPublic.VpPublic#vm_public() Valid ref to visible method of other package public inner class
4511
		runNegativeReferenceTest(
4458
			new String[] {
4512
			new String[] {
4459
				"test/X.java",
4513
				"test/X.java",
4460
				"package test;\n" +
4514
				"package test;\n" +
Lines 4468-4476 Link Here
4468
				"	 */\n" +
4522
				"	 */\n" +
4469
				"	public void s_foo() {\n" +
4523
				"	public void s_foo() {\n" +
4470
				"	}\n" +
4524
				"	}\n" +
4471
				"}\n"
4525
				"}\n" },
4472
			}
4526
				"----------\n" + 
4473
		);
4527
				"1. ERROR in test\\X.java (at line 8)\r\n" + 
4528
				"	* @see VisibilityPublic.VpPublic#vm_public() Valid ref to visible method of other package public inner class\r\n" + 
4529
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
4530
				"Javadoc: Invalid member type qualification\n" + 
4531
				"----------\n"
4532
			);
4474
	}
4533
	}
4475
4534
4476
	public void test155() {
4535
	public void test155() {
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForInterface.java (-46 / +98 lines)
Lines 298-320 Link Here
298
298
299
	// @see Classes references
299
	// @see Classes references
300
	public void test020() {
300
	public void test020() {
301
		this.runConformReferenceTest(
301
		// warning - Tag @see: reference not found: Visibility.AvcPublic Valid ref: visible inherited inner class of local class
302
		// warning - Tag @see: reference not found: test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class
303
		runNegativeReferenceTest(
302
			new String[] {
304
			new String[] {
303
				"test/IX.java",
305
				"test/IX.java",
304
				"package test;\n"
306
				"package test;\n" +
305
					+ "	/**\n"
307
				"	/**\n" +
306
					+ "	 * Valid local classes references \n"
308
				"	 * Valid local classes references \n" +
307
					+ "	 *\n"
309
				"	 *\n" +
308
					+ "	 * @see Visibility Valid ref: local class \n"
310
				"	 * @see Visibility Valid ref: local class \n" +
309
					+ "	 * @see Visibility.VcPublic Valid ref: visible inner class of local class \n"
311
				"	 * @see Visibility.VcPublic Valid ref: visible inner class of local class \n" +
310
					+ "	 * @see Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n"
312
				"	 * @see Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n" +
311
					+ "	 * @see test.Visibility Valid ref: local class \n"
313
				"	 * @see test.Visibility Valid ref: local class \n" +
312
					+ "	 * @see test.Visibility.VcPublic Valid ref: visible inner class of local class \n"
314
				"	 * @see test.Visibility.VcPublic Valid ref: visible inner class of local class \n" +
313
					+ "	 * @see test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n"
315
				"	 * @see test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n" +
314
					+ "	 */\n"
316
				"	 */\n" +
315
					+ "public interface IX {\n"
317
				"public interface IX {\n" +
316
					+ "	public void foo();\n"
318
				"	public void foo();\n" +
317
					+ "}\n" });
319
				"}\n" },
320
				"----------\n" + 
321
				"1. ERROR in test\\IX.java (at line 7)\r\n" + 
322
				"	* @see Visibility.AvcPublic Valid ref: visible inherited inner class of local class \r\n" + 
323
				"	       ^^^^^^^^^^^^^^^^^^^^\n" + 
324
				"Javadoc: Invalid member type qualification\n" + 
325
				"----------\n" + 
326
				"2. ERROR in test\\IX.java (at line 10)\r\n" + 
327
				"	* @see test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class \r\n" + 
328
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
329
				"Javadoc: Invalid member type qualification\n" + 
330
				"----------\n"
331
			);
318
	}
332
	}
319
333
320
	public void test021() {
334
	public void test021() {
Lines 498-504 Link Here
498
	}
512
	}
499
513
500
	public void test032() {
514
	public void test032() {
501
		runConformReferenceTest(
515
		// warning - Tag @see: reference not found: VisibilityPublic.VpPublic#vf_public Valid ref to not visible field of other package public inner class
516
		runNegativeReferenceTest(
502
			new String[] {
517
			new String[] {
503
				"test/IX.java",
518
				"test/IX.java",
504
				"package test;\n" +
519
				"package test;\n" +
Lines 511-519 Link Here
511
				"	 */\n" +
526
				"	 */\n" +
512
				"public interface IX {\n" +
527
				"public interface IX {\n" +
513
				"	public void foo();\n" +
528
				"	public void foo();\n" +
514
				"}\n"
529
				"}\n" },
515
			}
530
				"----------\n" + 
516
		);
531
				"1. ERROR in test\\IX.java (at line 7)\r\n" + 
532
				"	* @see VisibilityPublic.VpPublic#vf_public Valid ref to not visible field of other package public inner class\r\n" + 
533
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
534
				"Javadoc: Invalid member type qualification\n" + 
535
				"----------\n"
536
			);
517
	}
537
	}
518
538
519
	public void test033() {
539
	public void test033() {
Lines 913-919 Link Here
913
	}
933
	}
914
934
915
	public void test052() {
935
	public void test052() {
916
		runConformReferenceTest(
936
		// warning - Tag @see: reference not found: VisibilityPublic.VpPublic#vm_public() Valid ref to visible method of other package public inner class
937
		runNegativeReferenceTest(
917
			new String[] {
938
			new String[] {
918
				"test/IX.java",
939
				"test/IX.java",
919
				"package test;\n" +
940
				"package test;\n" +
Lines 926-934 Link Here
926
				"	 */\n" +
947
				"	 */\n" +
927
				"public interface IX {\n" +
948
				"public interface IX {\n" +
928
				"	public void foo();\n" +
949
				"	public void foo();\n" +
929
				"}\n"
950
				"}\n" },
930
			}
951
				"----------\n" + 
931
		);
952
				"1. ERROR in test\\IX.java (at line 7)\r\n" + 
953
				"	* @see VisibilityPublic.VpPublic#vm_public() Valid ref to visible method of other package public inner class\r\n" + 
954
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
955
				"Javadoc: Invalid member type qualification\n" + 
956
				"----------\n"
957
			);
932
	}
958
	}
933
959
934
	public void test053() {
960
	public void test053() {
Lines 1565-1587 Link Here
1565
1591
1566
	// @see tag: class references
1592
	// @see tag: class references
1567
	public void test095() {
1593
	public void test095() {
1568
		this.runConformReferenceTest(
1594
		// warning - Tag @see: reference not found: Visibility.AvcPublic Valid ref: visible inherited inner class of local class
1595
		// warning - Tag @see: reference not found: test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class
1596
		runNegativeReferenceTest(
1569
			new String[] {
1597
			new String[] {
1570
				"test/IX.java",
1598
				"test/IX.java",
1571
				"package test;\n"
1599
				"package test;\n" +
1572
					+ "public interface IX {\n"
1600
				"public interface IX {\n" +
1573
					+ "	/**\n"
1601
				"	/**\n" +
1574
					+ "	 * Valid local classes references \n"
1602
				"	 * Valid local classes references \n" +
1575
					+ "	 *\n"
1603
				"	 *\n" +
1576
					+ "	 * @see Visibility Valid ref: local class \n"
1604
				"	 * @see Visibility Valid ref: local class \n" +
1577
					+ "	 * @see Visibility.VcPublic Valid ref: visible inner class of local class \n"
1605
				"	 * @see Visibility.VcPublic Valid ref: visible inner class of local class \n" +
1578
					+ "	 * @see Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n"
1606
				"	 * @see Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n" +
1579
					+ "	 * @see test.Visibility Valid ref: local class \n"
1607
				"	 * @see test.Visibility Valid ref: local class \n" +
1580
					+ "	 * @see test.Visibility.VcPublic Valid ref: visible inner class of local class \n"
1608
				"	 * @see test.Visibility.VcPublic Valid ref: visible inner class of local class \n" +
1581
					+ "	 * @see test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n"
1609
				"	 * @see test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n" +
1582
					+ "	 */\n"
1610
				"	 */\n" +
1583
					+ "	public void foo();\n"
1611
				"	public void foo();\n" +
1584
					+ "}\n" });
1612
				"}\n" },
1613
				"----------\n" + 
1614
				"1. ERROR in test\\IX.java (at line 8)\r\n" + 
1615
				"	* @see Visibility.AvcPublic Valid ref: visible inherited inner class of local class \r\n" + 
1616
				"	       ^^^^^^^^^^^^^^^^^^^^\n" + 
1617
				"Javadoc: Invalid member type qualification\n" + 
1618
				"----------\n" + 
1619
				"2. ERROR in test\\IX.java (at line 11)\r\n" + 
1620
				"	* @see test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class \r\n" + 
1621
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
1622
				"Javadoc: Invalid member type qualification\n" + 
1623
				"----------\n"
1624
			);
1585
	}
1625
	}
1586
1626
1587
	public void test096() {
1627
	public void test096() {
Lines 1765-1771 Link Here
1765
	}
1805
	}
1766
1806
1767
	public void test107() {
1807
	public void test107() {
1768
		runConformReferenceTest(
1808
		// warning - Tag @see: reference not found: VisibilityPublic.VpPublic#vf_public Valid ref to not visible field of other package public inner class
1809
		runNegativeReferenceTest(
1769
			new String[] {
1810
			new String[] {
1770
				"test/IX.java",
1811
				"test/IX.java",
1771
				"package test;\n" +
1812
				"package test;\n" +
Lines 1778-1786 Link Here
1778
				"	 * @see VisibilityPublic.VpPublic#vf_public Valid ref to not visible field of other package public inner class\n" +
1819
				"	 * @see VisibilityPublic.VpPublic#vf_public Valid ref to not visible field of other package public inner class\n" +
1779
				"	 */\n" +
1820
				"	 */\n" +
1780
				"	public void foo();\n" +
1821
				"	public void foo();\n" +
1781
				"}\n"
1822
				"}\n" },
1782
			}
1823
				"----------\n" + 
1783
		);
1824
				"1. ERROR in test\\IX.java (at line 8)\r\n" + 
1825
				"	* @see VisibilityPublic.VpPublic#vf_public Valid ref to not visible field of other package public inner class\r\n" + 
1826
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
1827
				"Javadoc: Invalid member type qualification\n" + 
1828
				"----------\n"
1829
			);
1784
	}
1830
	}
1785
1831
1786
	public void test108() {
1832
	public void test108() {
Lines 2183-2189 Link Here
2183
	}
2229
	}
2184
2230
2185
	public void test122() {
2231
	public void test122() {
2186
		runConformReferenceTest(
2232
		// warning - Tag @see: reference not found: VisibilityPublic.VpPublic#vm_public() Valid ref to visible method of other package public inner class
2233
		runNegativeReferenceTest(
2187
			new String[] {
2234
			new String[] {
2188
				"test/IX.java",
2235
				"test/IX.java",
2189
				"package test;\n" +
2236
				"package test;\n" +
Lines 2196-2204 Link Here
2196
				"	 * @see VisibilityPublic.VpPublic#vm_public() Valid ref to visible method of other package public inner class\n" +
2243
				"	 * @see VisibilityPublic.VpPublic#vm_public() Valid ref to visible method of other package public inner class\n" +
2197
				"	 */\n" +
2244
				"	 */\n" +
2198
				"	public void foo();\n" +
2245
				"	public void foo();\n" +
2199
				"}\n"
2246
				"}\n" },
2200
			}
2247
				"----------\n" + 
2201
		);
2248
				"1. ERROR in test\\IX.java (at line 8)\r\n" + 
2249
				"	* @see VisibilityPublic.VpPublic#vm_public() Valid ref to visible method of other package public inner class\r\n" + 
2250
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2251
				"Javadoc: Invalid member type qualification\n" + 
2252
				"----------\n"
2253
			);
2202
	}
2254
	}
2203
2255
2204
	public void test123() {
2256
	public void test123() {
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_4.java (+14 lines)
Lines 3000-3005 Link Here
3000
			//comment6a\def\Test.java:6: warning - Tag @see: reference not found: Inner
3000
			//comment6a\def\Test.java:6: warning - Tag @see: reference not found: Inner
3001
			//comment6a\test\Invalid.java:8: warning - Tag @link: reference not found: Inner
3001
			//comment6a\test\Invalid.java:8: warning - Tag @link: reference not found: Inner
3002
			//comment6a\test\Invalid2.java:8: warning - Tag @see: reference not found: Test.Inner => bug ID: 4464323
3002
			//comment6a\test\Invalid2.java:8: warning - Tag @see: reference not found: Test.Inner => bug ID: 4464323
3003
			// => bug ID: 4464323 - fixed by // https://bugs.eclipse.org/bugs/show_bug.cgi?id=222188: partially qualified references should be warned
3003
			"----------\n" + 
3004
			"----------\n" + 
3004
			"1. ERROR in comment6a\\def\\Test.java (at line 4)\n" + 
3005
			"1. ERROR in comment6a\\def\\Test.java (at line 4)\n" + 
3005
			"	* @see Inner\n" + 
3006
			"	* @see Inner\n" + 
Lines 3011-3016 Link Here
3011
			"	* See also {@link Inner}\n" + 
3012
			"	* See also {@link Inner}\n" + 
3012
			"	                  ^^^^^\n" + 
3013
			"	                  ^^^^^\n" + 
3013
			"Javadoc: Invalid member type qualification\n" + 
3014
			"Javadoc: Invalid member type qualification\n" + 
3015
			"----------\n" + 
3016
			"----------\n" + 
3017
			"1. ERROR in comment6a\\test\\Invalid2.java (at line 4)\n" + 
3018
			"	* @see Test.Inner\n" + 
3019
			"	       ^^^^^^^^^^\n" + 
3020
			"Javadoc: Invalid member type qualification\n" + 
3014
			"----------\n"
3021
			"----------\n"
3015
		);
3022
		);
3016
	}
3023
	}
Lines 3321-3326 Link Here
3321
			//comment6a\def\Test.java:6: warning - Tag @see: reference not found: Inner
3328
			//comment6a\def\Test.java:6: warning - Tag @see: reference not found: Inner
3322
			//comment6a\test\Invalid.java:8: warning - Tag @link: reference not found: Inner
3329
			//comment6a\test\Invalid.java:8: warning - Tag @link: reference not found: Inner
3323
			//comment6a\test\Invalid2.java:8: warning - Tag @see: reference not found: Test.Inner => bug ID: 4464323
3330
			//comment6a\test\Invalid2.java:8: warning - Tag @see: reference not found: Test.Inner => bug ID: 4464323
3331
			// => bug ID: 4464323 - fixed by // https://bugs.eclipse.org/bugs/show_bug.cgi?id=222188: partially qualified references should be warned
3324
			"----------\n" + 
3332
			"----------\n" + 
3325
			"1. ERROR in comment6a\\def\\Test.java (at line 4)\n" + 
3333
			"1. ERROR in comment6a\\def\\Test.java (at line 4)\n" + 
3326
			"	* @see Inner\n" + 
3334
			"	* @see Inner\n" + 
Lines 3332-3337 Link Here
3332
			"	* See also {@link Inner}\n" + 
3340
			"	* See also {@link Inner}\n" + 
3333
			"	                  ^^^^^\n" + 
3341
			"	                  ^^^^^\n" + 
3334
			"Javadoc: Invalid member type qualification\n" + 
3342
			"Javadoc: Invalid member type qualification\n" + 
3343
			"----------\n" + 
3344
			"----------\n" + 
3345
			"1. ERROR in comment6a\\test\\Invalid2.java (at line 4)\n" + 
3346
			"	* @see Test.Inner\n" + 
3347
			"	       ^^^^^^^^^^\n" + 
3348
			"Javadoc: Invalid member type qualification\n" + 
3335
			"----------\n"
3349
			"----------\n"
3336
		);
3350
		);
3337
	}
3351
	}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForField.java (-23 / +49 lines)
Lines 340-362 Link Here
340
340
341
	// @see Classes references
341
	// @see Classes references
342
	public void test020() {
342
	public void test020() {
343
		this.runConformReferenceTest(
343
		// warning - Tag @see: reference not found: Visibility.AvcPublic Valid ref: visible inherited inner class of local class
344
		// warning - Tag @see: reference not found: test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class
345
		runNegativeReferenceTest(
344
			new String[] {
346
			new String[] {
345
				"test/X.java",
347
				"test/X.java",
346
				"package test;\n"
348
				"package test;\n" +
347
					+ "public class X {\n"
349
				"public class X {\n" +
348
					+ "	/**\n"
350
				"	/**\n" +
349
					+ "	 * Valid local classes references \n"
351
				"	 * Valid local classes references \n" +
350
					+ "	 *\n"
352
				"	 *\n" +
351
					+ "	 * @see Visibility Valid ref: local class \n"
353
				"	 * @see Visibility Valid ref: local class \n" +
352
					+ "	 * @see Visibility.VcPublic Valid ref: visible inner class of local class \n"
354
				"	 * @see Visibility.VcPublic Valid ref: visible inner class of local class \n" +
353
					+ "	 * @see Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n"
355
				"	 * @see Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n" +
354
					+ "	 * @see test.Visibility Valid ref: local class \n"
356
				"	 * @see test.Visibility Valid ref: local class \n" +
355
					+ "	 * @see test.Visibility.VcPublic Valid ref: visible inner class of local class \n"
357
				"	 * @see test.Visibility.VcPublic Valid ref: visible inner class of local class \n" +
356
					+ "	 * @see test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n"
358
				"	 * @see test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n" +
357
					+ "	 */\n"
359
				"	 */\n" +
358
					+ "	public int x;\n"
360
				"	public int x;\n" +
359
					+ "}\n" });
361
				"}\n" },
362
				"----------\n" + 
363
				"1. ERROR in test\\X.java (at line 8)\r\n" + 
364
				"	* @see Visibility.AvcPublic Valid ref: visible inherited inner class of local class \r\n" + 
365
				"	       ^^^^^^^^^^^^^^^^^^^^\n" + 
366
				"Javadoc: Invalid member type qualification\n" + 
367
				"----------\n" + 
368
				"2. ERROR in test\\X.java (at line 11)\r\n" + 
369
				"	* @see test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class \r\n" + 
370
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
371
				"Javadoc: Invalid member type qualification\n" + 
372
				"----------\n"
373
			);
360
	}
374
	}
361
375
362
	public void test021() {
376
	public void test021() {
Lines 542-548 Link Here
542
	}
556
	}
543
557
544
	public void test032() {
558
	public void test032() {
545
		runConformReferenceTest(
559
		// warning - Tag @see: reference not found: VisibilityPublic.VpPublic#vf_public Valid ref to not visible field of other package public inner class
560
		runNegativeReferenceTest(
546
			new String[] {
561
			new String[] {
547
				"test/X.java",
562
				"test/X.java",
548
				"package test;\n" +
563
				"package test;\n" +
Lines 555-563 Link Here
555
				"	 * @see VisibilityPublic.VpPublic#vf_public Valid ref to not visible field of other package public inner class\n" +
570
				"	 * @see VisibilityPublic.VpPublic#vf_public Valid ref to not visible field of other package public inner class\n" +
556
				"	 */\n" +
571
				"	 */\n" +
557
				"	public int x;\n" +
572
				"	public int x;\n" +
558
				"}\n"
573
				"}\n" },
559
			}
574
				"----------\n" + 
560
		);
575
				"1. ERROR in test\\X.java (at line 8)\r\n" + 
576
				"	* @see VisibilityPublic.VpPublic#vf_public Valid ref to not visible field of other package public inner class\r\n" + 
577
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
578
				"Javadoc: Invalid member type qualification\n" + 
579
				"----------\n"
580
			);
561
	}
581
	}
562
582
563
	public void test033() {
583
	public void test033() {
Lines 977-983 Link Here
977
	}
997
	}
978
998
979
	public void test052() {
999
	public void test052() {
980
		runConformReferenceTest(
1000
		// warning - Tag @see: reference not found: VisibilityPublic.VpPublic#vm_public() Valid ref to visible method of other package public inner class
1001
		runNegativeReferenceTest(
981
			new String[] {
1002
			new String[] {
982
				"test/X.java",
1003
				"test/X.java",
983
				"package test;\n" +
1004
				"package test;\n" +
Lines 990-998 Link Here
990
				"	 * @see VisibilityPublic.VpPublic#vm_public() Valid ref to visible method of other package public inner class\n" +
1011
				"	 * @see VisibilityPublic.VpPublic#vm_public() Valid ref to visible method of other package public inner class\n" +
991
				"	 */\n" +
1012
				"	 */\n" +
992
				"	public int x;\n" +
1013
				"	public int x;\n" +
993
				"}\n"
1014
				"}\n" },
994
			}
1015
				"----------\n" + 
995
		);
1016
				"1. ERROR in test\\X.java (at line 8)\r\n" + 
1017
				"	* @see VisibilityPublic.VpPublic#vm_public() Valid ref to visible method of other package public inner class\r\n" + 
1018
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
1019
				"Javadoc: Invalid member type qualification\n" + 
1020
				"----------\n"
1021
			);
996
	}
1022
	}
997
1023
998
	public void test053() {
1024
	public void test053() {
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForConstructor.java (-24 / +50 lines)
Lines 261-284 Link Here
261
261
262
	// @see Classes references
262
	// @see Classes references
263
	public void test020() {
263
	public void test020() {
264
		this.runConformReferenceTest(
264
		// warning - Tag @see: reference not found: Visibility.AvcPublic Valid ref: visible inherited inner class of local class
265
		// warning - Tag @see: reference not found: test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class
266
		runNegativeReferenceTest(
265
			new String[] {
267
			new String[] {
266
				"test/X.java",
268
				"test/X.java",
267
				"package test;\n"
269
				"package test;\n" +
268
					+ "public class X {\n"
270
				"public class X {\n" +
269
					+ "	/**\n"
271
				"	/**\n" +
270
					+ "	 * Valid local classes references \n"
272
				"	 * Valid local classes references \n" +
271
					+ "	 *\n"
273
				"	 *\n" +
272
					+ "	 * @see Visibility Valid ref: local class \n"
274
				"	 * @see Visibility Valid ref: local class \n" +
273
					+ "	 * @see Visibility.VcPublic Valid ref: visible inner class of local class \n"
275
				"	 * @see Visibility.VcPublic Valid ref: visible inner class of local class \n" +
274
					+ "	 * @see Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n"
276
				"	 * @see Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n" +
275
					+ "	 * @see test.Visibility Valid ref: local class \n"
277
				"	 * @see test.Visibility Valid ref: local class \n" +
276
					+ "	 * @see test.Visibility.VcPublic Valid ref: visible inner class of local class \n"
278
				"	 * @see test.Visibility.VcPublic Valid ref: visible inner class of local class \n" +
277
					+ "	 * @see test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n"
279
				"	 * @see test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n" +
278
					+ "	 */\n"
280
				"	 */\n" +
279
					+ "	public X() {\n"
281
				"	public X() {\n" +
280
					+ "	}\n"
282
				"	}\n" +
281
					+ "}\n" });
283
				"}\n" },
284
				"----------\n" + 
285
				"1. ERROR in test\\X.java (at line 8)\r\n" + 
286
				"	* @see Visibility.AvcPublic Valid ref: visible inherited inner class of local class \r\n" + 
287
				"	       ^^^^^^^^^^^^^^^^^^^^\n" + 
288
				"Javadoc: Invalid member type qualification\n" + 
289
				"----------\n" + 
290
				"2. ERROR in test\\X.java (at line 11)\r\n" + 
291
				"	* @see test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class \r\n" + 
292
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
293
				"Javadoc: Invalid member type qualification\n" + 
294
				"----------\n"
295
			);
282
	}
296
	}
283
297
284
	public void test021() {
298
	public void test021() {
Lines 470-476 Link Here
470
	}
484
	}
471
485
472
	public void test032() {
486
	public void test032() {
473
		runConformReferenceTest(
487
		// warning - Tag @see: reference not found: VisibilityPublic.VpPublic#vf_public Valid ref to not visible field of other package public inner class
488
		runNegativeReferenceTest(
474
			new String[] {
489
			new String[] {
475
				"test/X.java",
490
				"test/X.java",
476
				"package test;\n" +
491
				"package test;\n" +
Lines 484-492 Link Here
484
				"	 */\n" +
499
				"	 */\n" +
485
				"	public X() {\n" +
500
				"	public X() {\n" +
486
				"	}\n" +
501
				"	}\n" +
487
				"}\n"
502
				"}\n" },
488
			}
503
				"----------\n" + 
489
		);
504
				"1. ERROR in test\\X.java (at line 8)\r\n" + 
505
				"	* @see VisibilityPublic.VpPublic#vf_public Valid ref to not visible field of other package public inner class\r\n" + 
506
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
507
				"Javadoc: Invalid member type qualification\n" + 
508
				"----------\n"
509
			);
490
	}
510
	}
491
511
492
	public void test033() {
512
	public void test033() {
Lines 908-914 Link Here
908
	}
928
	}
909
929
910
	public void test052() {
930
	public void test052() {
911
		runConformReferenceTest(
931
		// warning - Tag @see: reference not found: VisibilityPublic.VpPublic#vf_public Valid ref to not visible field of other package public inner class
932
		runNegativeReferenceTest(
912
			new String[] {
933
			new String[] {
913
				"test/X.java",
934
				"test/X.java",
914
				"package test;\n" +
935
				"package test;\n" +
Lines 922-930 Link Here
922
				"	 */\n" +
943
				"	 */\n" +
923
				"	public X() {\n" +
944
				"	public X() {\n" +
924
				"	}\n" +
945
				"	}\n" +
925
				"}\n"
946
				"}\n" },
926
			}
947
				"----------\n" + 
927
		);
948
				"1. ERROR in test\\X.java (at line 8)\r\n" + 
949
				"	* @see VisibilityPublic.VpPublic#vm_public() Valid ref to visible method of other package public inner class\r\n" + 
950
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
951
				"Javadoc: Invalid member type qualification\n" + 
952
				"----------\n"
953
			);
928
	}
954
	}
929
955
930
	public void test053() {
956
	public void test053() {
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java (-24 / +50 lines)
Lines 319-342 Link Here
319
319
320
	// @see Classes references
320
	// @see Classes references
321
	public void test020() {
321
	public void test020() {
322
		this.runConformReferenceTest(
322
		// warning - Tag @see: reference not found: Visibility.AvcPublic Valid ref: visible inherited inner class of local class
323
		// warning - Tag @see: reference not found: test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class
324
		runNegativeReferenceTest(
323
			new String[] {
325
			new String[] {
324
				"test/X.java",
326
				"test/X.java",
325
				"package test;\n"
327
				"package test;\n" +
326
					+ "	/**\n"
328
				"	/**\n" +
327
					+ "	 * Valid local classes references \n"
329
				"	 * Valid local classes references \n" +
328
					+ "	 *\n"
330
				"	 *\n" +
329
					+ "	 * @see Visibility Valid ref: local class \n"
331
				"	 * @see Visibility Valid ref: local class \n" +
330
					+ "	 * @see Visibility.VcPublic Valid ref: visible inner class of local class \n"
332
				"	 * @see Visibility.VcPublic Valid ref: visible inner class of local class \n" +
331
					+ "	 * @see Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n"
333
				"	 * @see Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n" +
332
					+ "	 * @see test.Visibility Valid ref: local class \n"
334
				"	 * @see test.Visibility Valid ref: local class \n" +
333
					+ "	 * @see test.Visibility.VcPublic Valid ref: visible inner class of local class \n"
335
				"	 * @see test.Visibility.VcPublic Valid ref: visible inner class of local class \n" +
334
					+ "	 * @see test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n"
336
				"	 * @see test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class \n" +
335
					+ "	 */\n"
337
				"	 */\n" +
336
					+ "public class X {\n"
338
				"public class X {\n" +
337
					+ "	public void s_foo() {\n"
339
				"	public void s_foo() {\n" +
338
					+ "	}\n"
340
				"	}\n" +
339
					+ "}\n" });
341
				"}\n" },
342
				"----------\n" + 
343
				"1. ERROR in test\\X.java (at line 7)\r\n" + 
344
				"	* @see Visibility.AvcPublic Valid ref: visible inherited inner class of local class \r\n" + 
345
				"	       ^^^^^^^^^^^^^^^^^^^^\n" + 
346
				"Javadoc: Invalid member type qualification\n" + 
347
				"----------\n" + 
348
				"2. ERROR in test\\X.java (at line 10)\r\n" + 
349
				"	* @see test.Visibility.AvcPublic Valid ref: visible inherited inner class of local class \r\n" + 
350
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
351
				"Javadoc: Invalid member type qualification\n" + 
352
				"----------\n"
353
			);
340
	}
354
	}
341
355
342
	public void test021() {
356
	public void test021() {
Lines 528-534 Link Here
528
	}
542
	}
529
543
530
	public void test032() {
544
	public void test032() {
531
		runConformReferenceTest(
545
		// warning - Tag @see: reference not found: VisibilityPublic.VpPublic#vf_public Valid ref to not visible field of other package public inner class
546
		runNegativeReferenceTest(
532
			new String[] {
547
			new String[] {
533
				"test/X.java",
548
				"test/X.java",
534
				"package test;\n" +
549
				"package test;\n" +
Lines 542-550 Link Here
542
				"public class X {\n" +
557
				"public class X {\n" +
543
				"	public void s_foo() {\n" +
558
				"	public void s_foo() {\n" +
544
				"	}\n" +
559
				"	}\n" +
545
				"}\n"
560
				"}\n" },
546
			}
561
				"----------\n" + 
547
		);
562
				"1. ERROR in test\\X.java (at line 7)\r\n" + 
563
				"	* @see VisibilityPublic.VpPublic#vf_public Valid ref to not visible field of other package public inner class\r\n" + 
564
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
565
				"Javadoc: Invalid member type qualification\n" + 
566
				"----------\n"
567
			);
548
	}
568
	}
549
569
550
	public void test033() {
570
	public void test033() {
Lines 952-958 Link Here
952
	}
972
	}
953
973
954
	public void test052() {
974
	public void test052() {
955
		runConformReferenceTest(
975
		// warning - Tag @see: reference not found: VisibilityPublic.VpPublic#vm_public() Valid ref to visible method of other package public inner class
976
		runNegativeReferenceTest(
956
			new String[] {
977
			new String[] {
957
				"test/X.java",
978
				"test/X.java",
958
				"package test;\n" +
979
				"package test;\n" +
Lines 966-974 Link Here
966
				"public class X {\n" +
987
				"public class X {\n" +
967
				"	public void s_foo() {\n" +
988
				"	public void s_foo() {\n" +
968
				"	}\n" +
989
				"	}\n" +
969
				"}\n"
990
				"}\n" },
970
			}
991
				"----------\n" + 
971
		);
992
				"1. ERROR in test\\X.java (at line 7)\r\n" + 
993
				"	* @see VisibilityPublic.VpPublic#vm_public() Valid ref to visible method of other package public inner class\r\n" + 
994
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
995
				"Javadoc: Invalid member type qualification\n" + 
996
				"----------\n"
997
			);
972
	}
998
	}
973
999
974
	public void test053() {
1000
	public void test053() {
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java (+165 lines)
Lines 7247-7250 Link Here
7247
		reportMissingJavadocDescription = CompilerOptions.ALL_STANDARD_TAGS;
7247
		reportMissingJavadocDescription = CompilerOptions.ALL_STANDARD_TAGS;
7248
		runConformTest(units);
7248
		runConformTest(units);
7249
	}
7249
	}
7250
	
7251
	/**
7252
	 * @bug 222188: [javadoc] Incorrect usage of inner type not reported
7253
	 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=222188"
7254
	 */
7255
	public void testBug222188a() {
7256
		// case 1: partially qualified reference in another package
7257
		String[] units = new String[] {
7258
			"pack/Test.java",
7259
			"package pack;\n" +
7260
			"public class Test {\n" +
7261
			"        public interface Inner { }\n" +
7262
			"}\n"
7263
			,
7264
			"pack2/X.java",
7265
			"package pack2;\n" +
7266
			"import pack.Test;\n" +
7267
			"public class X {\n" +
7268
			"/**\n" +
7269
			" * See also {@link Test.Inner} -- error/warning \n" +
7270
			" */\n" +
7271
			"     public void m() { }\n" +
7272
			"}\n"
7273
		};
7274
		reportInvalidJavadoc = CompilerOptions.ERROR;
7275
		runNegativeTest(units,
7276
			// warning - Tag @link: reference not found: Test.Inner
7277
			"----------\n" + 
7278
			"1. ERROR in pack2\\X.java (at line 5)\n" + 
7279
			"	* See also {@link Test.Inner} -- error/warning \n" + 
7280
			"	                  ^^^^^^^^^^\n" + 
7281
			"Javadoc: Invalid member type qualification\n" + 
7282
			"----------\n"
7283
		);
7284
	}
7285
	
7286
	public void testBug222188b() {
7287
		// case 2: fully but invalid qualified reference in another package
7288
		String[] units = new String[] {
7289
			"pack/Test.java",
7290
			"package pack;\n" +
7291
			"public class Test {\n" +
7292
			"        public interface Inner { }\n" +
7293
			"}\n"
7294
			,
7295
			"pack2/X.java",
7296
			"package pack2;\n" +
7297
			"public class X {\n" +
7298
			"/**\n" +
7299
			" * See also {@link pack.Test.Inners} -- error/warning \n" +
7300
			" */\n" +
7301
			"     public void m() { }\n" +
7302
			"}\n"
7303
		};
7304
		reportInvalidJavadoc = CompilerOptions.ERROR;
7305
		runNegativeTest(units,
7306
			// warning - Tag @link: reference not found: Test.Inner
7307
			"----------\n" + 
7308
			"1. ERROR in pack2\\X.java (at line 4)\n" + 
7309
			"	* See also {@link pack.Test.Inners} -- error/warning \n" + 
7310
			"	                  ^^^^^^^^^^^^^^^^\n" + 
7311
			"Javadoc: pack.Test.Inners cannot be resolved to a type\n" + 
7312
			"----------\n"
7313
		);
7314
	}
7315
	
7316
	/**
7317
	 * @bug 221539: [javadoc] doesn't detect non visible inner class
7318
	 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=221539"
7319
	 */
7320
	public void testBug221539a() {
7321
		// partially qualified reference in the same package
7322
		String[] units = new String[] {
7323
			"p/Test.java",
7324
			"package p;\n" +
7325
			"/**\n" + 
7326
			" * {@link Test.Inner} not ok for Javadoc\n" + 
7327
			" * {@link Foo.Inner} ok for Javadoc\n" + 
7328
			" */\n" +
7329
			"public class Test extends Foo {\n" +
7330
			"}\n"
7331
			,
7332
			"p/Foo.java",
7333
			"package p;\n" +
7334
			"public class Foo {\n" +
7335
			"	static class Inner {}\n" +
7336
			"}\n"
7337
		};
7338
		reportInvalidJavadoc = CompilerOptions.ERROR;
7339
		runNegativeTest(units,
7340
			// warning - Tag @link: reference not found: Test.Inner
7341
			"----------\n" + 
7342
			"1. ERROR in p\\Test.java (at line 3)\n" + 
7343
			"	* {@link Test.Inner} not ok for Javadoc\n" + 
7344
			"	         ^^^^^^^^^^\n" + 
7345
			"Javadoc: Invalid member type qualification\n" + 
7346
			"----------\n"
7347
		);
7348
	}
7349
	public void testBug221539b() {
7350
		// partially qualified reference in different package
7351
		String[] units = new String[] {
7352
			"p1/Test.java",
7353
			"package p1;\n" +
7354
			"import p2.Foo;\n" + 
7355
			"/**\n" + 
7356
			" * {@link Test.Inner} not ok for Javadoc\n" + 
7357
			" * {@link Foo.Inner} not ok Javadoc\n" + 
7358
			" * {@link p2.Foo.Inner} ok for Javadoc as fully qualified\n" + 
7359
			" */\n" +
7360
			"public class Test extends Foo {\n" +
7361
			"}\n"
7362
			,
7363
			"p2/Foo.java",
7364
			"package p2;\n" +
7365
			"public class Foo {\n" +
7366
			"	public static class Inner {}\n" +
7367
			"}\n"
7368
		};
7369
		reportInvalidJavadoc = CompilerOptions.ERROR;
7370
		runNegativeTest(units,
7371
			// warning - Tag @link: reference not found: Test.Inner
7372
			// warning - Tag @link: reference not found: Foo.Inner
7373
			"----------\n" + 
7374
			"1. ERROR in p1\\Test.java (at line 4)\n" + 
7375
			"	* {@link Test.Inner} not ok for Javadoc\n" + 
7376
			"	         ^^^^^^^^^^\n" + 
7377
			"Javadoc: Invalid member type qualification\n" + 
7378
			"----------\n" + 
7379
			"2. ERROR in p1\\Test.java (at line 5)\n" + 
7380
			"	* {@link Foo.Inner} not ok Javadoc\n" + 
7381
			"	         ^^^^^^^^^\n" + 
7382
			"Javadoc: Invalid member type qualification\n" + 
7383
			"----------\n"
7384
		);
7385
	}
7386
	
7387
	public void testBug221539c() {
7388
		// case 3: partially qualified references are valid within the same CU
7389
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
7390
		runConformTest(
7391
			new String[] {
7392
				"pack/Test.java",
7393
				"package pack;\n" +
7394
				"/**\n" + 
7395
				" * @see Inner.Level2.Level3\n" + 
7396
				" * @see Test.Inner.Level2.Level3\n" + 
7397
				" */\n" + 
7398
				"public class Test {\n" + 
7399
				"	public class Inner {\n" + 
7400
				"		/**\n" + 
7401
				"		 * @see Level3\n" + 
7402
				"		 * @see Level2.Level3\n" + 
7403
				"		 * @see Inner.Level2.Level3\n" + 
7404
				"		 * @see Test.Inner.Level2.Level3\n" + 
7405
				"		 */\n" + 
7406
				"		public class Level2 {\n" + 
7407
				"			class Level3 {\n" + 
7408
				"			}\n" + 
7409
				"		}\n" + 
7410
				"	}\n" + 
7411
				"}\n"
7412
			}
7413
		);
7414
	}
7250
}
7415
}
(-)compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java (+38 lines)
Lines 802-807 Link Here
802
							}
802
							}
803
						}
803
						}
804
					}
804
					}
805
					// https://bugs.eclipse.org/bugs/show_bug.cgi?id=222188: partially qualified references should be warned
806
					else if (typeReference instanceof JavadocQualifiedTypeReference && ! scope.isDefinedInSameUnit(resolvedType)) { // references within the same CU are allowed
807
						char[][] typeRefName = ((JavadocQualifiedTypeReference) typeReference).getTypeName();
808
						boolean considerPackageName = false;
809
						//https://bugs.eclipse.org/bugs/show_bug.cgi?id=221539
810
						// when in the same package, references can be partially qualified
811
						if (topLevelScope.getCurrentPackage() == resolvedType.getPackage()) {
812
							// same package: check if the reference contains package name
813
							char[][] packageName = resolvedType.fPackage.compoundName;
814
							checkPackage: for (int i = 0 ; i < packageName.length; i++) {
815
								// verify each segment of the package name
816
								if (! CharOperation.equals(typeRefName[i], packageName[i])) {
817
									// type reference does not contain package name
818
									considerPackageName = true;
819
									break checkPackage;
820
								}
821
							}
822
						}
823
						int skipped = considerPackageName ? resolvedType.fPackage.compoundName.length : 0;
824
						boolean valid = true;		
825
						if (typeRefName.length == computedCompoundName.length - skipped) {
826
							// matching length: check if the reference is fully qualified
827
							checkQualification: for (int i = 0 ; i < typeRefName.length; i++) {
828
								// verify each segment
829
								if (! CharOperation.equals(typeRefName[i], computedCompoundName[i + skipped])) {
830
									valid = false;
831
									break checkQualification;
832
								}
833
							}
834
						} else {
835
							valid = false;
836
						}
837
						// report invalid reference
838
						if (! valid) {
839
							if (scopeModifiers == -1) scopeModifiers = scope.getDeclarationModifiers();
840
							scope.problemReporter().javadocInvalidMemberTypeQualification(typeReference.sourceStart, typeReference.sourceEnd, scopeModifiers);
841
						}
842
					}
805
				}
843
				}
806
			}
844
			}
807
		}
845
		}

Return to bug 222188