Lines 3098-3110
Link Here
|
3098 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=209936" |
3098 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=209936" |
3099 |
*/ |
3099 |
*/ |
3100 |
public void testBug209936a() { |
3100 |
public void testBug209936a() { |
3101 |
reportMissingJavadocComments = CompilerOptions.IGNORE; |
3101 |
reportMissingJavadocCommentsVisibility = CompilerOptions.WARNING; |
3102 |
reportMissingJavadocCommentsVisibility = CompilerOptions.IGNORE; |
|
|
3103 |
runNegativeTest( |
3102 |
runNegativeTest( |
3104 |
new String[] { |
3103 |
new String[] { |
3105 |
"p/X.java", |
3104 |
"p/X.java", |
3106 |
"package p;\n" + |
3105 |
"package p;\n" + |
3107 |
"\n" + |
|
|
3108 |
"public abstract class X extends Y {\n" + |
3106 |
"public abstract class X extends Y {\n" + |
3109 |
" protected class A extends Member {\n" + |
3107 |
" protected class A extends Member {\n" + |
3110 |
" /**\n" + |
3108 |
" /**\n" + |
Lines 3115-3128
Link Here
|
3115 |
"}", |
3113 |
"}", |
3116 |
"p/Y.java", |
3114 |
"p/Y.java", |
3117 |
"package p;\n" + |
3115 |
"package p;\n" + |
3118 |
"\n" + |
|
|
3119 |
"import p1.Z;\n" + |
3116 |
"import p1.Z;\n" + |
3120 |
"\n" + |
|
|
3121 |
"public abstract class Y extends Z<Object> {\n" + |
3117 |
"public abstract class Y extends Z<Object> {\n" + |
3122 |
"}", |
3118 |
"}", |
3123 |
"p1/Z.java", |
3119 |
"p1/Z.java", |
3124 |
"package p1;\n" + |
3120 |
"package p1;\n" + |
3125 |
"\n" + |
|
|
3126 |
"public abstract class Z<T> {\n" + |
3121 |
"public abstract class Z<T> {\n" + |
3127 |
" protected class Member {\n" + |
3122 |
" protected class Member {\n" + |
3128 |
" protected void foo(Object source, Object data) {\n" + |
3123 |
" protected void foo(Object source, Object data) {\n" + |
Lines 3131-3163
Link Here
|
3131 |
"}" |
3126 |
"}" |
3132 |
}, |
3127 |
}, |
3133 |
"----------\n" + |
3128 |
"----------\n" + |
3134 |
"1. ERROR in p\\X.java (at line 6)\n" + |
3129 |
"1. ERROR in p\\X.java (at line 5)\n" + |
3135 |
" * @see Member#foo(Object, Object)\n" + |
3130 |
" * @see Member#foo(Object, Object)\n" + |
3136 |
" ^^^\n" + |
3131 |
" ^^^^^^\n" + |
3137 |
"Javadoc: The method foo(Object, Object) from the type Z<T>.Member is not visible\n" + |
3132 |
"Javadoc: Invalid member type qualification\n" + |
3138 |
"----------\n" + |
|
|
3139 |
"2. ERROR in p\\X.java (at line 8)\n" + |
3140 |
" public void foo(Object source, Object data) {}\n" + |
3141 |
" ^^^^^^\n" + |
3142 |
"Javadoc: Missing tag for parameter source\n" + |
3143 |
"----------\n" + |
3144 |
"3. ERROR in p\\X.java (at line 8)\n" + |
3145 |
" public void foo(Object source, Object data) {}\n" + |
3146 |
" ^^^^\n" + |
3147 |
"Javadoc: Missing tag for parameter data\n" + |
3148 |
"----------\n" |
3133 |
"----------\n" |
3149 |
); |
3134 |
); |
3150 |
} |
3135 |
} |
3151 |
|
3136 |
|
3152 |
public void testBug209936b() { |
3137 |
public void testBug209936b() { |
3153 |
reportMissingJavadocTags = CompilerOptions.IGNORE; |
3138 |
reportMissingJavadocCommentsVisibility = CompilerOptions.WARNING; |
3154 |
reportMissingJavadocComments = CompilerOptions.IGNORE; |
|
|
3155 |
reportMissingJavadocCommentsVisibility = CompilerOptions.IGNORE; |
3156 |
runNegativeTest( |
3139 |
runNegativeTest( |
3157 |
new String[] { |
3140 |
new String[] { |
3158 |
"p/X.java", |
3141 |
"p/X.java", |
3159 |
"package p;\n" + |
3142 |
"package p;\n" + |
3160 |
"\n" + |
|
|
3161 |
"public abstract class X extends Y {\n" + |
3143 |
"public abstract class X extends Y {\n" + |
3162 |
" protected class A extends Member {\n" + |
3144 |
" protected class A extends Member {\n" + |
3163 |
" /**\n" + |
3145 |
" /**\n" + |
Lines 3170-3193
Link Here
|
3170 |
"package p;\n" + |
3152 |
"package p;\n" + |
3171 |
"\n" + |
3153 |
"\n" + |
3172 |
"import p1.Z;\n" + |
3154 |
"import p1.Z;\n" + |
3173 |
"\n" + |
3155 |
"public abstract class Y extends Z<Object> {}", |
3174 |
"public abstract class Y extends Z<Object> {\n" + |
|
|
3175 |
"}", |
3176 |
"p1/Z.java", |
3156 |
"p1/Z.java", |
3177 |
"package p1;\n" + |
3157 |
"package p1;\n" + |
3178 |
"\n" + |
|
|
3179 |
"public abstract class Z<T> {\n" + |
3158 |
"public abstract class Z<T> {\n" + |
3180 |
" protected class Member {\n" + |
3159 |
" protected class Member {\n" + |
3181 |
" protected void foo(Object source, Object data) {\n" + |
3160 |
" protected void foo(Object source, Object data) {}\n" + |
3182 |
" }\n" + |
|
|
3183 |
" }\n" + |
3161 |
" }\n" + |
3184 |
"}" |
3162 |
"}" |
3185 |
}, |
3163 |
}, |
3186 |
"----------\n" + |
3164 |
"----------\n" + |
3187 |
"1. ERROR in p\\X.java (at line 6)\n" + |
3165 |
"1. ERROR in p\\X.java (at line 5)\n" + |
3188 |
" * @see Member#foo(Object, Object)\n" + |
3166 |
" * @see Member#foo(Object, Object)\n" + |
3189 |
" ^^^\n" + |
3167 |
" ^^^^^^\n" + |
3190 |
"Javadoc: The method foo(Object, Object) from the type Z<T>.Member is not visible\n" + |
3168 |
"Javadoc: Invalid member type qualification\n" + |
|
|
3169 |
"----------\n" |
3170 |
); |
3171 |
} |
3172 |
|
3173 |
public void testBug209936_GenericMemberImplicitReference() { |
3174 |
reportMissingJavadocTags = CompilerOptions.IGNORE; |
3175 |
reportMissingJavadocCommentsVisibility = CompilerOptions.WARNING; |
3176 |
runNegativeTest( |
3177 |
new String[] { |
3178 |
"p1/A.java", |
3179 |
"package p1;\n" + |
3180 |
"public class A<R> {\n" + |
3181 |
" public class A1<S> {\n" + |
3182 |
" public class A2<T> {\n" + |
3183 |
" public class A3<U> {\n" + |
3184 |
" public class A4<V> {\n" + |
3185 |
" public void foo(V v) {}\n" + |
3186 |
" }\n" + |
3187 |
" }\n" + |
3188 |
" }\n" + |
3189 |
" }\n" + |
3190 |
"}", |
3191 |
"p2/X.java", |
3192 |
"package p2;\n" + |
3193 |
"import p1.A;\n" + |
3194 |
"public class X<R> extends A<R> {\n" + |
3195 |
" public class X1<S> extends A1<S> {\n" + |
3196 |
" public class X2<T> extends A2<T> {\n" + |
3197 |
" public class X3<U> extends A3<U> {\n" + |
3198 |
" public class X4<V> extends A4<V> {\n" + |
3199 |
" /**\n" + |
3200 |
// implicit type reference |
3201 |
" * @see #foo(Object)\n" + |
3202 |
" * @see #foo(V)\n" + |
3203 |
" */\n" + |
3204 |
" public void foo(V v) {}\n" + |
3205 |
" }\n" + |
3206 |
" }\n" + |
3207 |
" }\n" + |
3208 |
" }\n" + |
3209 |
"}" |
3210 |
}, |
3211 |
"----------\n" + |
3212 |
"1. ERROR in p2\\X.java (at line 10)\n" + |
3213 |
" * @see #foo(V)\n" + |
3214 |
" ^^^\n" + |
3215 |
"Javadoc: The method foo(Object) in the type X.X1.X2.X3.X4 is not applicable for the arguments (V)\n" + |
3216 |
"----------\n" |
3217 |
); |
3218 |
} |
3219 |
|
3220 |
public void testBug209936_GenericMemberSingleReference() { |
3221 |
reportMissingJavadocTags = CompilerOptions.IGNORE; |
3222 |
reportMissingJavadocCommentsVisibility = CompilerOptions.WARNING; |
3223 |
runNegativeTest( |
3224 |
new String[] { |
3225 |
"p1/A.java", |
3226 |
"package p1;\n" + |
3227 |
"public class A<R> {\n" + |
3228 |
" public class A1<S> {\n" + |
3229 |
" public class A2<T> {\n" + |
3230 |
" public class A3<U> {\n" + |
3231 |
" public class A4<V> {\n" + |
3232 |
" public void foo(V v) {}\n" + |
3233 |
" }\n" + |
3234 |
" }\n" + |
3235 |
" }\n" + |
3236 |
" }\n" + |
3237 |
"}", |
3238 |
"p2/X.java", |
3239 |
"package p2;\n" + |
3240 |
"import p1.A;\n" + |
3241 |
"public class X<R> extends A<R> {\n" + |
3242 |
" public class X1<S> extends A1<S> {\n" + |
3243 |
" public class X2<T> extends A2<T> {\n" + |
3244 |
" public class X3<U> extends A3<U> {\n" + |
3245 |
" public class X4<V> extends A4<V> {\n" + |
3246 |
" /**\n" + |
3247 |
// single type reference |
3248 |
" * @see A4#foo(V)\n" + |
3249 |
" * @see A4#foo(Object)\n" + |
3250 |
" */\n" + |
3251 |
" public void myFoo(V v) {}\n" + |
3252 |
" }\n" + |
3253 |
" }\n" + |
3254 |
" }\n" + |
3255 |
" }\n" + |
3256 |
"}" |
3257 |
}, |
3258 |
"----------\n" + |
3259 |
"1. ERROR in p2\\X.java (at line 9)\n" + |
3260 |
" * @see A4#foo(V)\n" + |
3261 |
" ^^^\n" + |
3262 |
"Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (V)\n" + |
3263 |
"----------\n" + |
3264 |
"2. ERROR in p2\\X.java (at line 10)\n" + |
3265 |
" * @see A4#foo(Object)\n" + |
3266 |
" ^^\n" + |
3267 |
"Javadoc: Invalid member type qualification\n" + |
3268 |
"----------\n" |
3269 |
); |
3270 |
} |
3271 |
|
3272 |
public void testBug209936_GenericMemberQualifiedSingleReference() { |
3273 |
reportMissingJavadocCommentsVisibility = CompilerOptions.WARNING; |
3274 |
runNegativeTest( |
3275 |
new String[] { |
3276 |
"p1/A.java", |
3277 |
"package p1;\n" + |
3278 |
"public class A<R> {\n" + |
3279 |
" public class A1<S> {\n" + |
3280 |
" public class A2<T> {\n" + |
3281 |
" public class A3<U> {\n" + |
3282 |
" public class A4<V> {\n" + |
3283 |
" public void foo(V v) {}\n" + |
3284 |
" }\n" + |
3285 |
" }\n" + |
3286 |
" }\n" + |
3287 |
" }\n" + |
3288 |
"}", |
3289 |
"p2/X.java", |
3290 |
"package p2;\n" + |
3291 |
"import p1.A;\n" + |
3292 |
"public class X<R> extends A<R> {\n" + |
3293 |
" public class X1<S> extends A1<S> {\n" + |
3294 |
" public class X2<T> extends A2<T> {\n" + |
3295 |
" public class X3<U> extends A3<U> {\n" + |
3296 |
" public class X4<V> extends A4<V> {\n" + |
3297 |
" /**\n" + |
3298 |
// qualified single type reference |
3299 |
" * @see A3.A4#foo(V)\n" + |
3300 |
" * @see A3.A4#foo(Object)\n" + |
3301 |
" */\n" + |
3302 |
" public void foo(V v) {}\n" + |
3303 |
" }\n" + |
3304 |
" }\n" + |
3305 |
" }\n" + |
3306 |
" }\n" + |
3307 |
"}" |
3308 |
}, |
3309 |
"----------\n" + |
3310 |
"1. ERROR in p2\\X.java (at line 9)\n" + |
3311 |
" * @see A3.A4#foo(V)\n" + |
3312 |
" ^^^\n" + |
3313 |
"Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (V)\n" + |
3314 |
"----------\n" |
3315 |
); |
3316 |
} |
3317 |
|
3318 |
public void testBug209936_GenericMemberFullyQualifiedSingleReference() { |
3319 |
reportMissingJavadocCommentsVisibility = CompilerOptions.WARNING; |
3320 |
runNegativeTest( |
3321 |
new String[] { |
3322 |
"p1/A.java", |
3323 |
"package p1;\n" + |
3324 |
"public class A<R> {\n" + |
3325 |
" public class A1<S> {\n" + |
3326 |
" public class A2<T> {\n" + |
3327 |
" public class A3<U> {\n" + |
3328 |
" public class A4<V> {\n" + |
3329 |
" public void foo(V v) {}\n" + |
3330 |
" }\n" + |
3331 |
" }\n" + |
3332 |
" }\n" + |
3333 |
" }\n" + |
3334 |
"}", |
3335 |
"p2/X.java", |
3336 |
"package p2;\n" + |
3337 |
"import p1.A;\n" + |
3338 |
"public class X<R> extends A<R> {\n" + |
3339 |
" public class X1<S> extends A1<S> {\n" + |
3340 |
" public class X2<T> extends A2<T> {\n" + |
3341 |
" public class X3<U> extends A3<U> {\n" + |
3342 |
" public class X4<V> extends A4<V> {\n" + |
3343 |
" /**\n" + |
3344 |
// fully qualified type reference |
3345 |
" * @see A.A1.A2.A3.A4#foo(V)\n" + |
3346 |
" * @see A.A1.A2.A3.A4#foo(Object)\n" + |
3347 |
" */\n" + |
3348 |
" public void foo(V v) {}\n" + |
3349 |
" }\n" + |
3350 |
" }\n" + |
3351 |
" }\n" + |
3352 |
" }\n" + |
3353 |
"}" |
3354 |
}, |
3355 |
"----------\n" + |
3356 |
"1. ERROR in p2\\X.java (at line 9)\n" + |
3357 |
" * @see A.A1.A2.A3.A4#foo(V)\n" + |
3358 |
" ^^^\n" + |
3359 |
"Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (V)\n" + |
3360 |
"----------\n" |
3361 |
); |
3362 |
} |
3363 |
|
3364 |
public void testBug209936_MemberImplicitReference() { |
3365 |
reportMissingJavadocTags = CompilerOptions.IGNORE; |
3366 |
reportMissingJavadocCommentsVisibility = CompilerOptions.WARNING; |
3367 |
runNegativeTest( |
3368 |
new String[] { |
3369 |
"p1/A.java", |
3370 |
"package p1;\n" + |
3371 |
"public class A<R> {\n" + |
3372 |
" public class A1<S> {\n" + |
3373 |
" public class A2<T> {\n" + |
3374 |
" public class A3<U> {\n" + |
3375 |
" public class A4 {\n" + |
3376 |
" public void foo(U u) {}\n" + |
3377 |
" }\n" + |
3378 |
" }\n" + |
3379 |
" }\n" + |
3380 |
" }\n" + |
3381 |
"}", |
3382 |
"p2/X.java", |
3383 |
"package p2;\n" + |
3384 |
"import p1.A;\n" + |
3385 |
"public class X<R> extends A<R> {\n" + |
3386 |
" public class X1<S> extends A1<S> {\n" + |
3387 |
" public class X2<T> extends A2<T> {\n" + |
3388 |
" public class X3<U> extends A3<U> {\n" + |
3389 |
" public class X4 extends A4 {\n" + |
3390 |
" /**\n" + |
3391 |
// implicit reference |
3392 |
" * @see #foo(Object)\n" + |
3393 |
" * @see #foo(U u)\n" + |
3394 |
" */\n" + |
3395 |
" public void foo(U u) {}\n" + |
3396 |
" }\n" + |
3397 |
" }\n" + |
3398 |
" }\n" + |
3399 |
" }\n" + |
3400 |
"}" |
3401 |
}, |
3402 |
"----------\n" + |
3403 |
"1. ERROR in p2\\X.java (at line 10)\r\n" + |
3404 |
" * @see #foo(U u)\r\n" + |
3405 |
" ^^^\n" + |
3406 |
"Javadoc: The method foo(Object) in the type X.X1.X2.X3.X4 is not applicable for the arguments (U)\n" + |
3407 |
"----------\n" |
3408 |
); |
3409 |
} |
3410 |
|
3411 |
public void testBug209936_MemberSingleReference1(){ |
3412 |
reportMissingJavadocCommentsVisibility = CompilerOptions.WARNING; |
3413 |
runNegativeTest( |
3414 |
new String[] { |
3415 |
"p1/A.java", |
3416 |
"package p1;\n" + |
3417 |
"public class A<R> {\n" + |
3418 |
" public class A1<S> {\n" + |
3419 |
" public class A2<T> {\n" + |
3420 |
" public class A3 {\n" + |
3421 |
" public class A4 {\n" + |
3422 |
" public void foo(T t) {}\n" + |
3423 |
" }\n" + |
3424 |
" }\n" + |
3425 |
" }\n" + |
3426 |
" }\n" + |
3427 |
"}", |
3428 |
"p2/X.java", |
3429 |
"package p2;\n" + |
3430 |
"import p1.A;\n" + |
3431 |
"public class X<R> extends A<R> {\n" + |
3432 |
" public class X1<S> extends A1<S> {\n" + |
3433 |
" public class X2<T> extends A2<T> {\n" + |
3434 |
" public class X3 extends A3 {\n" + |
3435 |
" public class X4 extends A4 {\n" + |
3436 |
" /**\n" + |
3437 |
// single type reference |
3438 |
" * @see A4#foo(Object)\n" + |
3439 |
" * @see A4#foo(T)\n" + |
3440 |
" */\n" + |
3441 |
" public void foo(T t) {}\n" + |
3442 |
" }\n" + |
3443 |
" }\n" + |
3444 |
" }\n" + |
3445 |
" }\n" + |
3446 |
"}" |
3447 |
}, |
3448 |
"----------\n" + |
3449 |
"1. ERROR in p2\\X.java (at line 9)\n" + |
3450 |
" * @see A4#foo(Object)\n" + |
3451 |
" ^^\n" + |
3452 |
"Javadoc: Invalid member type qualification\n" + |
3453 |
"----------\n" + |
3454 |
"2. ERROR in p2\\X.java (at line 10)\n" + |
3455 |
" * @see A4#foo(T)\n" + |
3456 |
" ^^^\n" + |
3457 |
"Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (T)\n" + |
3458 |
"----------\n" |
3459 |
); |
3460 |
} |
3461 |
|
3462 |
public void testBug209936_MemberSingleReference2(){ |
3463 |
reportMissingJavadocCommentsVisibility = CompilerOptions.WARNING; |
3464 |
runNegativeTest( |
3465 |
new String[] { |
3466 |
"p1/A.java", |
3467 |
"package p1;\n" + |
3468 |
"public class A<R> {\n" + |
3469 |
" public class A1<S> {\n" + |
3470 |
" public class A2 {\n" + |
3471 |
" public class A3 {\n" + |
3472 |
" public class A4 {\n" + |
3473 |
" public void foo(S s) {}\n" + |
3474 |
" }\n" + |
3475 |
" }\n" + |
3476 |
" }\n" + |
3477 |
" }\n" + |
3478 |
"}", |
3479 |
"p2/X.java", |
3480 |
"package p2;\n" + |
3481 |
"import p1.A;\n" + |
3482 |
"public class X<R> extends A<R> {\n" + |
3483 |
" public class X1<S> extends A1<S> {\n" + |
3484 |
" public class X2 extends A2 {\n" + |
3485 |
" public class X3 extends A3 {\n" + |
3486 |
" public class X4 extends A4 {\n" + |
3487 |
" /**\n" + |
3488 |
// single type reference |
3489 |
" * @see A4#foo(Object)\n" + |
3490 |
" * @see A4#foo(S)\n" + |
3491 |
" */\n" + |
3492 |
" public void foo(S s) {}\n" + |
3493 |
" }\n" + |
3494 |
" }\n" + |
3495 |
" }\n" + |
3496 |
" }\n" + |
3497 |
"}" |
3498 |
}, |
3499 |
"----------\n" + |
3500 |
"1. ERROR in p2\\X.java (at line 9)\n" + |
3501 |
" * @see A4#foo(Object)\n" + |
3502 |
" ^^\n" + |
3503 |
"Javadoc: Invalid member type qualification\n" + |
3504 |
"----------\n" + |
3505 |
"2. ERROR in p2\\X.java (at line 10)\n" + |
3506 |
" * @see A4#foo(S)\n" + |
3507 |
" ^^^\n" + |
3508 |
"Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (S)\n" + |
3509 |
"----------\n" |
3510 |
); |
3511 |
} |
3512 |
|
3513 |
public void testBug209936_MemberSingleReference3(){ |
3514 |
reportMissingJavadocCommentsVisibility = CompilerOptions.WARNING; |
3515 |
runNegativeTest( |
3516 |
new String[] { |
3517 |
"p1/A.java", |
3518 |
"package p1;\n" + |
3519 |
"public class A {\n" + |
3520 |
" public class A1 {\n" + |
3521 |
" public class A2<T> {\n" + |
3522 |
" public class A3 {\n" + |
3523 |
" public class A4 {\n" + |
3524 |
" public void foo(T t) {}\n" + |
3525 |
" }\n" + |
3526 |
" }\n" + |
3527 |
" }\n" + |
3528 |
" }\n" + |
3529 |
"}", |
3530 |
"p2/X.java", |
3531 |
"package p2;\n" + |
3532 |
"import p1.A;\n" + |
3533 |
"public class X extends A {\n" + |
3534 |
" public class X1 extends A1 {\n" + |
3535 |
" public class X2<T> extends A2<T> {\n" + |
3536 |
" public class X3 extends A3 {\n" + |
3537 |
" public class X4 extends A4 {\n" + |
3538 |
" /**\n" + |
3539 |
// single type reference |
3540 |
" * @see A4#foo(Object)\n" + |
3541 |
" * @see A4#foo(T)\n" + |
3542 |
" */\n" + |
3543 |
" public void foo(T t) {}\n" + |
3544 |
" }\n" + |
3545 |
" }\n" + |
3546 |
" }\n" + |
3547 |
" }\n" + |
3548 |
"}" |
3549 |
}, |
3550 |
"----------\n" + |
3551 |
"1. ERROR in p2\\X.java (at line 9)\n" + |
3552 |
" * @see A4#foo(Object)\n" + |
3553 |
" ^^\n" + |
3554 |
"Javadoc: Invalid member type qualification\n" + |
3555 |
"----------\n" + |
3556 |
"2. ERROR in p2\\X.java (at line 10)\n" + |
3557 |
" * @see A4#foo(T)\n" + |
3558 |
" ^^^\n" + |
3559 |
"Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (T)\n" + |
3560 |
"----------\n" |
3561 |
); |
3562 |
} |
3563 |
|
3564 |
public void testBug209936_MemberSingleReference4(){ |
3565 |
reportMissingJavadocCommentsVisibility = CompilerOptions.WARNING; |
3566 |
runNegativeTest( |
3567 |
new String[] { |
3568 |
"p1/A.java", |
3569 |
"package p1;\n" + |
3570 |
"public class A {\n" + |
3571 |
" public class A1 {\n" + |
3572 |
" public class A2<T> {\n" + |
3573 |
" public class A3 {\n" + |
3574 |
" public class A4 {\n" + |
3575 |
" public void foo(T t) {}\n" + |
3576 |
" }\n" + |
3577 |
" }\n" + |
3578 |
" }\n" + |
3579 |
" }\n" + |
3580 |
"}", |
3581 |
"p2/X.java", |
3582 |
"package p2;\n" + |
3583 |
"import p1.A;\n" + |
3584 |
"public class X extends A {\n" + |
3585 |
" public class X1 extends A1 {\n" + |
3586 |
" public class X2<T> extends A2<T> {\n" + |
3587 |
" public class X3 extends A3 {\n" + |
3588 |
" public class X4 extends A4 {\n" + |
3589 |
" /**\n" + |
3590 |
// single type reference |
3591 |
" * @see A4#foo(Object)\n" + |
3592 |
" * @see A4#foo(T)\n" + |
3593 |
" */\n" + |
3594 |
" public void foo(T t) {}\n" + |
3595 |
" }\n" + |
3596 |
" }\n" + |
3597 |
" }\n" + |
3598 |
" }\n" + |
3599 |
"}" |
3600 |
}, |
3601 |
"----------\n" + |
3602 |
"1. ERROR in p2\\X.java (at line 9)\n" + |
3603 |
" * @see A4#foo(Object)\n" + |
3604 |
" ^^\n" + |
3605 |
"Javadoc: Invalid member type qualification\n" + |
3606 |
"----------\n" + |
3607 |
"2. ERROR in p2\\X.java (at line 10)\n" + |
3608 |
" * @see A4#foo(T)\n" + |
3609 |
" ^^^\n" + |
3610 |
"Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (T)\n" + |
3611 |
"----------\n" |
3612 |
); |
3613 |
} |
3614 |
|
3615 |
public void testBug209936_MemberQualifiedSingleReference1() { |
3616 |
reportMissingJavadocCommentsVisibility = CompilerOptions.WARNING; |
3617 |
runConformTest( |
3618 |
new String[] { |
3619 |
"p1/A.java", |
3620 |
"package p1;\n" + |
3621 |
"\n" + |
3622 |
"public class A<R> {\n" + |
3623 |
" public class A1<S> {\n" + |
3624 |
" public class A2 {\n" + |
3625 |
" public class A3 {\n" + |
3626 |
" public class A4 {\n" + |
3627 |
" public void foo(S s) {}\n" + |
3628 |
" }\n" + |
3629 |
" }\n" + |
3630 |
" }\n" + |
3631 |
" }\n" + |
3632 |
"}", |
3633 |
"p2/X.java", |
3634 |
"package p2;\n" + |
3635 |
"import p1.A;\n" + |
3636 |
"public class X<R> extends A<R> {\n" + |
3637 |
" public class X1<S> extends A1<S> {\n" + |
3638 |
" public class X2 extends A2 {\n" + |
3639 |
" public class X3 extends A3 {\n" + |
3640 |
" public class X4 extends A4 {\n" + |
3641 |
" /**\n" + |
3642 |
// qualified single type reference |
3643 |
" * @see A3.A4#foo(Object)\n" + |
3644 |
" * @see A2.A3.A4#foo(Object)\n" + |
3645 |
" * @see A1.A2.A3.A4#foo(Object)\n" + |
3646 |
" */\n" + |
3647 |
" public void foo(S s) {}\n" + |
3648 |
" }\n" + |
3649 |
" }\n" + |
3650 |
" }\n" + |
3651 |
" }\n" + |
3652 |
"}" |
3653 |
} |
3654 |
); |
3655 |
} |
3656 |
|
3657 |
public void testBug209936_MemberQualifiedSingleReference2() { |
3658 |
reportMissingJavadocCommentsVisibility = CompilerOptions.WARNING; |
3659 |
runConformTest( |
3660 |
new String[] { |
3661 |
"p1/A.java", |
3662 |
"package p1;\n" + |
3663 |
"\n" + |
3664 |
"public class A<R> {\n" + |
3665 |
" public class A1<S> {\n" + |
3666 |
" public class A2 {\n" + |
3667 |
" public class A3 {\n" + |
3668 |
" public class A4 {\n" + |
3669 |
" public class A5 {\n" + |
3670 |
" public class A6 {\n" + |
3671 |
" public void foo(S s) {}\n" + |
3672 |
" }\n" + |
3673 |
" }\n" + |
3674 |
" }\n" + |
3675 |
" }\n" + |
3676 |
" }\n" + |
3677 |
" }\n" + |
3678 |
"}", |
3679 |
"p2/X.java", |
3680 |
"package p2;\n" + |
3681 |
"import p1.A;\n" + |
3682 |
"public class X<R> extends A<R> {\n" + |
3683 |
" public class X1<S> extends A1<S> {\n" + |
3684 |
" public class X2 extends A2 {\n" + |
3685 |
" public class X3 extends A3 {\n" + |
3686 |
" public class X4 extends A4 {\n" + |
3687 |
" public class X5 extends A5 {\n" + |
3688 |
" public class X6 extends A6 {\n" + |
3689 |
" /**\n" + |
3690 |
// qualified single type reference |
3691 |
" * @see A5.A6#foo(Object)\n" + |
3692 |
" * @see A4.A5.A6#foo(Object)\n" + |
3693 |
" */\n" + |
3694 |
" public void foo(S s) {}\n" + |
3695 |
" }\n" + |
3696 |
" }\n" + |
3697 |
" }\n" + |
3698 |
" }\n" + |
3699 |
" }\n" + |
3700 |
" }\n" + |
3701 |
"}" |
3702 |
} |
3703 |
); |
3704 |
} |
3705 |
|
3706 |
public void testBug209936_MemberFullyQualifiedSingleReference() { |
3707 |
reportMissingJavadocCommentsVisibility = CompilerOptions.WARNING; |
3708 |
runNegativeTest( |
3709 |
new String[] { |
3710 |
"p1/A.java", |
3711 |
"package p1;\n" + |
3712 |
"\n" + |
3713 |
"public class A<R> {\n" + |
3714 |
" public class A1 {\n" + |
3715 |
" public class A2 {\n" + |
3716 |
" public class A3 {\n" + |
3717 |
" public class A4 {\n" + |
3718 |
" public void foo(R r) {}\n" + |
3719 |
" }\n" + |
3720 |
" }\n" + |
3721 |
" }\n" + |
3722 |
" }\n" + |
3723 |
"}", |
3724 |
"p2/X.java", |
3725 |
"package p2;\n" + |
3726 |
"import p1.A;\n" + |
3727 |
"public class X<R> extends A<R> {\n" + |
3728 |
" public class X1 extends A1 {\n" + |
3729 |
" public class X2 extends A2 {\n" + |
3730 |
" public class X3 extends A3 {\n" + |
3731 |
" public class X4 extends A4 {\n" + |
3732 |
" /**\n" + |
3733 |
// fully qualified type reference |
3734 |
" * @see A.A1.A2.A3.A4#foo(Object)\n" + |
3735 |
" * @see A.A1.A2.A3.A4#foo(R)\n" + |
3736 |
" */\n" + |
3737 |
" public void foo(R r) {}\n" + |
3738 |
" }\n" + |
3739 |
" }\n" + |
3740 |
" }\n" + |
3741 |
" }\n" + |
3742 |
"}" |
3743 |
}, |
3744 |
"----------\n" + |
3745 |
"1. ERROR in p2\\X.java (at line 10)\r\n" + |
3746 |
" * @see A.A1.A2.A3.A4#foo(R)\r\n" + |
3747 |
" ^^^\n" + |
3748 |
"Javadoc: The method foo(Object) in the type A.A1.A2.A3.A4 is not applicable for the arguments (R)\n" + |
3191 |
"----------\n" |
3749 |
"----------\n" |
3192 |
); |
3750 |
); |
3193 |
} |
3751 |
} |