Lines 2198-2237
Link Here
|
2198 |
"----------\n" + |
2198 |
"----------\n" + |
2199 |
"2. WARNING in X.java (at line 8)\n" + |
2199 |
"2. WARNING in X.java (at line 8)\n" + |
2200 |
" X x = new X((A)null, (A)null);\n" + |
2200 |
" X x = new X((A)null, (A)null);\n" + |
|
|
2201 |
" ^\n" + |
2202 |
"A is a raw type. References to generic type A<P> should be parameterized\n" + |
2203 |
"----------\n" + |
2204 |
"3. WARNING in X.java (at line 8)\n" + |
2205 |
" X x = new X((A)null, (A)null);\n" + |
2201 |
" ^^^^^^^\n" + |
2206 |
" ^^^^^^^\n" + |
2202 |
"Type safety: The expression of type A needs unchecked conversion to conform to A<String>\n" + |
2207 |
"Type safety: The expression of type A needs unchecked conversion to conform to A<String>\n" + |
2203 |
"----------\n" + |
2208 |
"----------\n" + |
2204 |
"3. WARNING in X.java (at line 9)\n" + |
2209 |
"4. WARNING in X.java (at line 8)\n" + |
|
|
2210 |
" X x = new X((A)null, (A)null);\n" + |
2211 |
" ^\n" + |
2212 |
"A is a raw type. References to generic type A<P> should be parameterized\n" + |
2213 |
"----------\n" + |
2214 |
"5. WARNING in X.java (at line 9)\n" + |
2205 |
" A a = new A((A)null);\n" + |
2215 |
" A a = new A((A)null);\n" + |
2206 |
" ^\n" + |
2216 |
" ^\n" + |
2207 |
"A is a raw type. References to generic type A<P> should be parameterized\n" + |
2217 |
"A is a raw type. References to generic type A<P> should be parameterized\n" + |
2208 |
"----------\n" + |
2218 |
"----------\n" + |
2209 |
"4. ERROR in X.java (at line 9)\n" + |
2219 |
"6. ERROR in X.java (at line 9)\n" + |
2210 |
" A a = new A((A)null);\n" + |
2220 |
" A a = new A((A)null);\n" + |
2211 |
" ^^^^^^^^^^^^^^\n" + |
2221 |
" ^^^^^^^^^^^^^^\n" + |
2212 |
"The constructor A(P) is not visible\n" + |
2222 |
"The constructor A(P) is not visible\n" + |
2213 |
"----------\n" + |
2223 |
"----------\n" + |
2214 |
"5. WARNING in X.java (at line 9)\n" + |
2224 |
"7. WARNING in X.java (at line 9)\n" + |
2215 |
" A a = new A((A)null);\n" + |
2225 |
" A a = new A((A)null);\n" + |
2216 |
" ^\n" + |
2226 |
" ^\n" + |
2217 |
"A is a raw type. References to generic type A<P> should be parameterized\n" + |
2227 |
"A is a raw type. References to generic type A<P> should be parameterized\n" + |
2218 |
"----------\n" + |
2228 |
"----------\n" + |
2219 |
"6. WARNING in X.java (at line 10)\n" + |
2229 |
"8. WARNING in X.java (at line 9)\n" + |
|
|
2230 |
" A a = new A((A)null);\n" + |
2231 |
" ^\n" + |
2232 |
"A is a raw type. References to generic type A<P> should be parameterized\n" + |
2233 |
"----------\n" + |
2234 |
"9. WARNING in X.java (at line 10)\n" + |
2220 |
" x.foo(a);\n" + |
2235 |
" x.foo(a);\n" + |
2221 |
" ^\n" + |
2236 |
" ^\n" + |
2222 |
"Type safety: The expression of type A needs unchecked conversion to conform to A<String>\n" + |
2237 |
"Type safety: The expression of type A needs unchecked conversion to conform to A<String>\n" + |
2223 |
"----------\n" + |
2238 |
"----------\n" + |
2224 |
"7. ERROR in X.java (at line 11)\n" + |
2239 |
"10. ERROR in X.java (at line 11)\n" + |
2225 |
" a.print(x);\n" + |
2240 |
" a.print(x);\n" + |
2226 |
" ^^^^^\n" + |
2241 |
" ^^^^^\n" + |
2227 |
"The method print(P) from the type A is not visible\n" + |
2242 |
"The method print(P) from the type A is not visible\n" + |
2228 |
"----------\n" + |
2243 |
"----------\n" + |
2229 |
"8. ERROR in X.java (at line 12)\n" + |
2244 |
"11. ERROR in X.java (at line 12)\n" + |
2230 |
" A<String> as = new A<String>(null);\n" + |
2245 |
" A<String> as = new A<String>(null);\n" + |
2231 |
" ^^^^^^^^^^^^^^^^^^^\n" + |
2246 |
" ^^^^^^^^^^^^^^^^^^^\n" + |
2232 |
"The constructor A<String>(P) is not visible\n" + |
2247 |
"The constructor A<String>(P) is not visible\n" + |
2233 |
"----------\n" + |
2248 |
"----------\n" + |
2234 |
"9. ERROR in X.java (at line 13)\n" + |
2249 |
"12. ERROR in X.java (at line 13)\n" + |
2235 |
" as.print(\"hello\");\n" + |
2250 |
" as.print(\"hello\");\n" + |
2236 |
" ^^^^^\n" + |
2251 |
" ^^^^^\n" + |
2237 |
"The method print(P) from the type A<String> is not visible\n" + |
2252 |
"The method print(P) from the type A<String> is not visible\n" + |
Lines 2421-2485
Link Here
|
2421 |
"----------\n" + |
2436 |
"----------\n" + |
2422 |
"2. WARNING in X.java (at line 7)\n" + |
2437 |
"2. WARNING in X.java (at line 7)\n" + |
2423 |
" X x = new X((AX)null, (AX)null);\n" + |
2438 |
" X x = new X((AX)null, (AX)null);\n" + |
|
|
2439 |
" ^^\n" + |
2440 |
"AX is a raw type. References to generic type AX<P> should be parameterized\n" + |
2441 |
"----------\n" + |
2442 |
"3. WARNING in X.java (at line 7)\n" + |
2443 |
" X x = new X((AX)null, (AX)null);\n" + |
2424 |
" ^^^^^^^^\n" + |
2444 |
" ^^^^^^^^\n" + |
2425 |
"Type safety: The expression of type AX needs unchecked conversion to conform to AX<String>\n" + |
2445 |
"Type safety: The expression of type AX needs unchecked conversion to conform to AX<String>\n" + |
2426 |
"----------\n" + |
2446 |
"----------\n" + |
2427 |
"3. WARNING in X.java (at line 8)\n" + |
2447 |
"4. WARNING in X.java (at line 7)\n" + |
|
|
2448 |
" X x = new X((AX)null, (AX)null);\n" + |
2449 |
" ^^\n" + |
2450 |
"AX is a raw type. References to generic type AX<P> should be parameterized\n" + |
2451 |
"----------\n" + |
2452 |
"5. WARNING in X.java (at line 8)\n" + |
2428 |
" AX a = new AX((AX)null);\n" + |
2453 |
" AX a = new AX((AX)null);\n" + |
2429 |
" ^^\n" + |
2454 |
" ^^\n" + |
2430 |
"AX is a raw type. References to generic type AX<P> should be parameterized\n" + |
2455 |
"AX is a raw type. References to generic type AX<P> should be parameterized\n" + |
2431 |
"----------\n" + |
2456 |
"----------\n" + |
2432 |
"4. WARNING in X.java (at line 8)\n" + |
2457 |
"6. WARNING in X.java (at line 8)\n" + |
2433 |
" AX a = new AX((AX)null);\n" + |
2458 |
" AX a = new AX((AX)null);\n" + |
2434 |
" ^^^^^^^^^^^^^^^^\n" + |
2459 |
" ^^^^^^^^^^^^^^^^\n" + |
2435 |
"Type safety: The constructor AX(AX) belongs to the raw type AX. References to generic type AX<P> should be parameterized\n" + |
2460 |
"Type safety: The constructor AX(AX) belongs to the raw type AX. References to generic type AX<P> should be parameterized\n" + |
2436 |
"----------\n" + |
2461 |
"----------\n" + |
2437 |
"5. WARNING in X.java (at line 8)\n" + |
2462 |
"7. WARNING in X.java (at line 8)\n" + |
2438 |
" AX a = new AX((AX)null);\n" + |
2463 |
" AX a = new AX((AX)null);\n" + |
2439 |
" ^^\n" + |
2464 |
" ^^\n" + |
2440 |
"AX is a raw type. References to generic type AX<P> should be parameterized\n" + |
2465 |
"AX is a raw type. References to generic type AX<P> should be parameterized\n" + |
2441 |
"----------\n" + |
2466 |
"----------\n" + |
2442 |
"6. WARNING in X.java (at line 9)\n" + |
2467 |
"8. WARNING in X.java (at line 8)\n" + |
|
|
2468 |
" AX a = new AX((AX)null);\n" + |
2469 |
" ^^\n" + |
2470 |
"AX is a raw type. References to generic type AX<P> should be parameterized\n" + |
2471 |
"----------\n" + |
2472 |
"9. WARNING in X.java (at line 9)\n" + |
2443 |
" AX a2 = new AX(null);\n" + |
2473 |
" AX a2 = new AX(null);\n" + |
2444 |
" ^^\n" + |
2474 |
" ^^\n" + |
2445 |
"AX is a raw type. References to generic type AX<P> should be parameterized\n" + |
2475 |
"AX is a raw type. References to generic type AX<P> should be parameterized\n" + |
2446 |
"----------\n" + |
2476 |
"----------\n" + |
2447 |
"7. WARNING in X.java (at line 9)\n" + |
2477 |
"10. WARNING in X.java (at line 9)\n" + |
2448 |
" AX a2 = new AX(null);\n" + |
2478 |
" AX a2 = new AX(null);\n" + |
2449 |
" ^^^^^^^^^^^^\n" + |
2479 |
" ^^^^^^^^^^^^\n" + |
2450 |
"Type safety: The constructor AX(AX) belongs to the raw type AX. References to generic type AX<P> should be parameterized\n" + |
2480 |
"Type safety: The constructor AX(AX) belongs to the raw type AX. References to generic type AX<P> should be parameterized\n" + |
2451 |
"----------\n" + |
2481 |
"----------\n" + |
2452 |
"8. WARNING in X.java (at line 9)\n" + |
2482 |
"11. WARNING in X.java (at line 9)\n" + |
2453 |
" AX a2 = new AX(null);\n" + |
2483 |
" AX a2 = new AX(null);\n" + |
2454 |
" ^^\n" + |
2484 |
" ^^\n" + |
2455 |
"AX is a raw type. References to generic type AX<P> should be parameterized\n" + |
2485 |
"AX is a raw type. References to generic type AX<P> should be parameterized\n" + |
2456 |
"----------\n" + |
2486 |
"----------\n" + |
2457 |
"9. WARNING in X.java (at line 10)\n" + |
2487 |
"12. WARNING in X.java (at line 10)\n" + |
2458 |
" x.foo(a);\n" + |
2488 |
" x.foo(a);\n" + |
2459 |
" ^\n" + |
2489 |
" ^\n" + |
2460 |
"Type safety: The expression of type AX needs unchecked conversion to conform to AX<String>\n" + |
2490 |
"Type safety: The expression of type AX needs unchecked conversion to conform to AX<String>\n" + |
2461 |
"----------\n" + |
2491 |
"----------\n" + |
2462 |
"10. WARNING in X.java (at line 12)\n" + |
2492 |
"13. WARNING in X.java (at line 12)\n" + |
2463 |
" a.bar(a);\n" + |
2493 |
" a.bar(a);\n" + |
2464 |
" ^^^^^^^^\n" + |
2494 |
" ^^^^^^^^\n" + |
2465 |
"Type safety: The method bar(AX) belongs to the raw type AX. References to generic type AX<P> should be parameterized\n" + |
2495 |
"Type safety: The method bar(AX) belongs to the raw type AX. References to generic type AX<P> should be parameterized\n" + |
2466 |
"----------\n" + |
2496 |
"----------\n" + |
2467 |
"11. ERROR in X.java (at line 13)\n" + |
2497 |
"14. ERROR in X.java (at line 13)\n" + |
2468 |
" AX<String> as = new AX<String>(null);\n" + |
2498 |
" AX<String> as = new AX<String>(null);\n" + |
2469 |
" ^^^^^^^^^^^^^^^^^^^^\n" + |
2499 |
" ^^^^^^^^^^^^^^^^^^^^\n" + |
2470 |
"The constructor AX<String>(AX<String>) is ambiguous\n" + |
2500 |
"The constructor AX<String>(AX<String>) is ambiguous\n" + |
2471 |
"----------\n" + |
2501 |
"----------\n" + |
2472 |
"12. ERROR in X.java (at line 14)\n" + |
2502 |
"15. ERROR in X.java (at line 14)\n" + |
2473 |
" as.print(a);\n" + |
2503 |
" as.print(a);\n" + |
2474 |
" ^^^^^\n" + |
2504 |
" ^^^^^\n" + |
2475 |
"The method print(String) in the type AX<String> is not applicable for the arguments (AX)\n" + |
2505 |
"The method print(String) in the type AX<String> is not applicable for the arguments (AX)\n" + |
2476 |
"----------\n" + |
2506 |
"----------\n" + |
2477 |
"13. WARNING in X.java (at line 15)\n" + |
2507 |
"16. WARNING in X.java (at line 15)\n" + |
2478 |
" as.bar(a);\n" + |
2508 |
" as.bar(a);\n" + |
2479 |
" ^\n" + |
2509 |
" ^\n" + |
2480 |
"Type safety: The expression of type AX needs unchecked conversion to conform to AX<String>\n" + |
2510 |
"Type safety: The expression of type AX needs unchecked conversion to conform to AX<String>\n" + |
2481 |
"----------\n" + |
2511 |
"----------\n" + |
2482 |
"14. WARNING in X.java (at line 22)\n" + |
2512 |
"17. WARNING in X.java (at line 22)\n" + |
2483 |
" void foo(AX rawAx){}\n" + |
2513 |
" void foo(AX rawAx){}\n" + |
2484 |
" ^^\n" + |
2514 |
" ^^\n" + |
2485 |
"AX is a raw type. References to generic type AX<P> should be parameterized\n" + |
2515 |
"AX is a raw type. References to generic type AX<P> should be parameterized\n" + |
Lines 2696-2705
Link Here
|
2696 |
"----------\n" + |
2726 |
"----------\n" + |
2697 |
"2. WARNING in X.java (at line 10)\n" + |
2727 |
"2. WARNING in X.java (at line 10)\n" + |
2698 |
" ((X)xs).t = this;\n" + |
2728 |
" ((X)xs).t = this;\n" + |
|
|
2729 |
" ^\n" + |
2730 |
"X is a raw type. References to generic type X<T> should be parameterized\n" + |
2731 |
"----------\n" + |
2732 |
"3. WARNING in X.java (at line 10)\n" + |
2733 |
" ((X)xs).t = this;\n" + |
2699 |
" ^\n" + |
2734 |
" ^\n" + |
2700 |
"Type safety: The field t from the raw type X is assigned a value of type X<T>. References to generic type X<T> should be parameterized\n" + |
2735 |
"Type safety: The field t from the raw type X is assigned a value of type X<T>. References to generic type X<T> should be parameterized\n" + |
2701 |
"----------\n" + |
2736 |
"----------\n" + |
2702 |
"3. ERROR in X.java (at line 12)\n" + |
2737 |
"4. ERROR in X.java (at line 12)\n" + |
2703 |
" System.out.prinln((T) this.t);\n" + |
2738 |
" System.out.prinln((T) this.t);\n" + |
2704 |
" ^^^^^^\n" + |
2739 |
" ^^^^^^\n" + |
2705 |
"The method prinln(T) is undefined for the type PrintStream\n" + |
2740 |
"The method prinln(T) is undefined for the type PrintStream\n" + |
Lines 4970-4976
Link Here
|
4970 |
" ^^^^^^^^^^^\n" + |
5005 |
" ^^^^^^^^^^^\n" + |
4971 |
"Type safety: The expression of type AX needs unchecked conversion to conform to AX<X>\n" + |
5006 |
"Type safety: The expression of type AX needs unchecked conversion to conform to AX<X>\n" + |
4972 |
"----------\n" + |
5007 |
"----------\n" + |
4973 |
"2. ERROR in X.java (at line 9)\n" + |
5008 |
"2. WARNING in X.java (at line 6)\n" + |
|
|
5009 |
" ax = (AX)bar(ax);\n" + |
5010 |
" ^^\n" + |
5011 |
"AX is a raw type. References to generic type AX<E> should be parameterized\n" + |
5012 |
"----------\n" + |
5013 |
"3. ERROR in X.java (at line 9)\n" + |
4974 |
" return a.get();\n" + |
5014 |
" return a.get();\n" + |
4975 |
" ^^^^^^^\n" + |
5015 |
" ^^^^^^^\n" + |
4976 |
"Type mismatch: cannot convert from capture#1-of ? to T\n" + |
5016 |
"Type mismatch: cannot convert from capture#1-of ? to T\n" + |
Lines 5389-5435
Link Here
|
5389 |
" ^^^^^^^^^^^^^\n" + |
5429 |
" ^^^^^^^^^^^^^\n" + |
5390 |
"Unnecessary cast from Object to Hashtable\n" + |
5430 |
"Unnecessary cast from Object to Hashtable\n" + |
5391 |
"----------\n" + |
5431 |
"----------\n" + |
5392 |
"3. ERROR in X.java (at line 12)\n" + |
5432 |
"3. WARNING in X.java (at line 10)\n" + |
|
|
5433 |
" Object a2 = (Hashtable) o;\n" + |
5434 |
" ^^^^^^^^^\n" + |
5435 |
"Hashtable is a raw type. References to generic type Hashtable<K,V> should be parameterized\n" + |
5436 |
"----------\n" + |
5437 |
"4. ERROR in X.java (at line 12)\n" + |
5393 |
" Object a3 = (Hashtable<Float, Double>) d;\n" + |
5438 |
" Object a3 = (Hashtable<Float, Double>) d;\n" + |
5394 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
5439 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
5395 |
"Cannot cast from Dictionary<String,Integer> to Hashtable<Float,Double>\n" + |
5440 |
"Cannot cast from Dictionary<String,Integer> to Hashtable<Float,Double>\n" + |
5396 |
"----------\n" + |
5441 |
"----------\n" + |
5397 |
"4. WARNING in X.java (at line 12)\n" + |
5442 |
"5. WARNING in X.java (at line 12)\n" + |
5398 |
" Object a3 = (Hashtable<Float, Double>) d;\n" + |
5443 |
" Object a3 = (Hashtable<Float, Double>) d;\n" + |
5399 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
5444 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
5400 |
"Unnecessary cast from Dictionary<String,Integer> to Hashtable<Float,Double>\n" + |
5445 |
"Unnecessary cast from Dictionary<String,Integer> to Hashtable<Float,Double>\n" + |
5401 |
"----------\n" + |
5446 |
"----------\n" + |
5402 |
"5. WARNING in X.java (at line 13)\n" + |
5447 |
"6. WARNING in X.java (at line 13)\n" + |
5403 |
" Object a4 = (Hashtable<String,Integer>) o;\n" + |
5448 |
" Object a4 = (Hashtable<String,Integer>) o;\n" + |
5404 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
5449 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
5405 |
"Type safety: The cast from Object to Hashtable<String,Integer> is actually checking against the erased type Hashtable\n" + |
5450 |
"Type safety: The cast from Object to Hashtable<String,Integer> is actually checking against the erased type Hashtable\n" + |
5406 |
"----------\n" + |
5451 |
"----------\n" + |
5407 |
"6. WARNING in X.java (at line 13)\n" + |
5452 |
"7. WARNING in X.java (at line 13)\n" + |
5408 |
" Object a4 = (Hashtable<String,Integer>) o;\n" + |
5453 |
" Object a4 = (Hashtable<String,Integer>) o;\n" + |
5409 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
5454 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
5410 |
"Unnecessary cast from Object to Hashtable<String,Integer>\n" + |
5455 |
"Unnecessary cast from Object to Hashtable<String,Integer>\n" + |
5411 |
"----------\n" + |
5456 |
"----------\n" + |
5412 |
"7. WARNING in X.java (at line 18)\n" + |
5457 |
"8. WARNING in X.java (at line 18)\n" + |
5413 |
" Object a5 = (Hashtable<String,Integer>) z1;\n" + |
5458 |
" Object a5 = (Hashtable<String,Integer>) z1;\n" + |
5414 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
5459 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
5415 |
"Unnecessary cast from Z1 to Hashtable<String,Integer>\n" + |
5460 |
"Unnecessary cast from Z1 to Hashtable<String,Integer>\n" + |
5416 |
"----------\n" + |
5461 |
"----------\n" + |
5417 |
"8. WARNING in X.java (at line 22)\n" + |
5462 |
"9. WARNING in X.java (at line 22)\n" + |
5418 |
" Object a6 = (Z2) z1;\n" + |
5463 |
" Object a6 = (Z2) z1;\n" + |
5419 |
" ^^^^^^^\n" + |
5464 |
" ^^^^^^^\n" + |
5420 |
"Unnecessary cast from Z1 to Z2\n" + |
5465 |
"Unnecessary cast from Z1 to Z2\n" + |
5421 |
"----------\n" + |
5466 |
"----------\n" + |
5422 |
"9. WARNING in X.java (at line 24)\n" + |
5467 |
"10. WARNING in X.java (at line 24)\n" + |
5423 |
" abstract class Z3 extends Hashtable {\n" + |
5468 |
" abstract class Z3 extends Hashtable {\n" + |
5424 |
" ^^^^^^^^^\n" + |
5469 |
" ^^^^^^^^^\n" + |
5425 |
"Hashtable is a raw type. References to generic type Hashtable<K,V> should be parameterized\n" + |
5470 |
"Hashtable is a raw type. References to generic type Hashtable<K,V> should be parameterized\n" + |
5426 |
"----------\n" + |
5471 |
"----------\n" + |
5427 |
"10. WARNING in X.java (at line 27)\n" + |
5472 |
"11. WARNING in X.java (at line 27)\n" + |
5428 |
" Object a7 = (Hashtable<String,Integer>) z3;\n" + |
5473 |
" Object a7 = (Hashtable<String,Integer>) z3;\n" + |
5429 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
5474 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
5430 |
"Type safety: The cast from Z3 to Hashtable<String,Integer> is actually checking against the erased type Hashtable\n" + |
5475 |
"Type safety: The cast from Z3 to Hashtable<String,Integer> is actually checking against the erased type Hashtable\n" + |
5431 |
"----------\n" + |
5476 |
"----------\n" + |
5432 |
"11. WARNING in X.java (at line 27)\n" + |
5477 |
"12. WARNING in X.java (at line 27)\n" + |
5433 |
" Object a7 = (Hashtable<String,Integer>) z3;\n" + |
5478 |
" Object a7 = (Hashtable<String,Integer>) z3;\n" + |
5434 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
5479 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
5435 |
"Unnecessary cast from Z3 to Hashtable<String,Integer>\n" + |
5480 |
"Unnecessary cast from Z3 to Hashtable<String,Integer>\n" + |
Lines 8829-8834
Link Here
|
8829 |
" this.foo((List)null);\n" + |
8874 |
" this.foo((List)null);\n" + |
8830 |
" ^^^\n" + |
8875 |
" ^^^\n" + |
8831 |
"The method foo(List<X>) is ambiguous for the type X\n" + |
8876 |
"The method foo(List<X>) is ambiguous for the type X\n" + |
|
|
8877 |
"----------\n" + |
8878 |
"3. WARNING in X.java (at line 5)\n" + |
8879 |
" this.foo((List)null);\n" + |
8880 |
" ^^^^\n" + |
8881 |
"List is a raw type. References to generic type List<E> should be parameterized\n" + |
8832 |
"----------\n"); |
8882 |
"----------\n"); |
8833 |
} |
8883 |
} |
8834 |
// 75156 variation - should report name clash instead of final method override |
8884 |
// 75156 variation - should report name clash instead of final method override |
Lines 21768-21789
Link Here
|
21768 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
21818 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
21769 |
"Type safety: The method setValue(Object) belongs to the raw type Map.Entry. References to generic type Map<K,V>.Entry<K,V> should be parameterized\n" + |
21819 |
"Type safety: The method setValue(Object) belongs to the raw type Map.Entry. References to generic type Map<K,V>.Entry<K,V> should be parameterized\n" + |
21770 |
"----------\n" + |
21820 |
"----------\n" + |
21771 |
"2. WARNING in X.java (at line 7)\n" + |
21821 |
"2. WARNING in X.java (at line 5)\n" + |
|
|
21822 |
" ((Map.Entry)o).setValue(\"bug\");\n" + |
21823 |
" ^^^^^^^^^\n" + |
21824 |
"Map.Entry is a raw type. References to generic type Map<K,V>.Entry<K,V> should be parameterized\n" + |
21825 |
"----------\n" + |
21826 |
"3. WARNING in X.java (at line 7)\n" + |
21772 |
" Map.Entry me= (Map.Entry)o; \n" + |
21827 |
" Map.Entry me= (Map.Entry)o; \n" + |
21773 |
" ^^^^^^^^^\n" + |
21828 |
" ^^^^^^^^^\n" + |
21774 |
"Map.Entry is a raw type. References to generic type Map<K,V>.Entry<K,V> should be parameterized\n" + |
21829 |
"Map.Entry is a raw type. References to generic type Map<K,V>.Entry<K,V> should be parameterized\n" + |
21775 |
"----------\n" + |
21830 |
"----------\n" + |
21776 |
"3. WARNING in X.java (at line 8)\n" + |
21831 |
"4. WARNING in X.java (at line 7)\n" + |
|
|
21832 |
" Map.Entry me= (Map.Entry)o; \n" + |
21833 |
" ^^^^^^^^^\n" + |
21834 |
"Map.Entry is a raw type. References to generic type Map<K,V>.Entry<K,V> should be parameterized\n" + |
21835 |
"----------\n" + |
21836 |
"5. WARNING in X.java (at line 8)\n" + |
21777 |
" me.setValue(\"ok\");\n" + |
21837 |
" me.setValue(\"ok\");\n" + |
21778 |
" ^^^^^^^^^^^^^^^^^\n" + |
21838 |
" ^^^^^^^^^^^^^^^^^\n" + |
21779 |
"Type safety: The method setValue(Object) belongs to the raw type Map.Entry. References to generic type Map<K,V>.Entry<K,V> should be parameterized\n" + |
21839 |
"Type safety: The method setValue(Object) belongs to the raw type Map.Entry. References to generic type Map<K,V>.Entry<K,V> should be parameterized\n" + |
21780 |
"----------\n" + |
21840 |
"----------\n" + |
21781 |
"4. WARNING in X.java (at line 10)\n" + |
21841 |
"6. WARNING in X.java (at line 10)\n" + |
21782 |
" ((Vector)o).add(\"ok\");\n" + |
21842 |
" ((Vector)o).add(\"ok\");\n" + |
21783 |
" ^^^^^^^^^^^^^^^^^^^^^\n" + |
21843 |
" ^^^^^^^^^^^^^^^^^^^^^\n" + |
21784 |
"Type safety: The method add(Object) belongs to the raw type Vector. References to generic type Vector<E> should be parameterized\n" + |
21844 |
"Type safety: The method add(Object) belongs to the raw type Vector. References to generic type Vector<E> should be parameterized\n" + |
21785 |
"----------\n" + |
21845 |
"----------\n" + |
21786 |
"5. ERROR in X.java (at line 12)\n" + |
21846 |
"7. WARNING in X.java (at line 10)\n" + |
|
|
21847 |
" ((Vector)o).add(\"ok\");\n" + |
21848 |
" ^^^^^^\n" + |
21849 |
"Vector is a raw type. References to generic type Vector<E> should be parameterized\n" + |
21850 |
"----------\n" + |
21851 |
"8. ERROR in X.java (at line 12)\n" + |
21787 |
" Zork z;\n" + |
21852 |
" Zork z;\n" + |
21788 |
" ^^^^\n" + |
21853 |
" ^^^^\n" + |
21789 |
"Zork cannot be resolved to a type\n" + |
21854 |
"Zork cannot be resolved to a type\n" + |
Lines 22142-22147
Link Here
|
22142 |
" Comparable<String> c = (java.util.List)bar(5, 5.0);\n" + |
22207 |
" Comparable<String> c = (java.util.List)bar(5, 5.0);\n" + |
22143 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
22208 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
22144 |
"Type mismatch: cannot convert from List to Comparable<String>\n" + |
22209 |
"Type mismatch: cannot convert from List to Comparable<String>\n" + |
|
|
22210 |
"----------\n" + |
22211 |
"2. WARNING in X.java (at line 3)\n" + |
22212 |
" Comparable<String> c = (java.util.List)bar(5, 5.0);\n" + |
22213 |
" ^^^^^^^^^^^^^^\n" + |
22214 |
"List is a raw type. References to generic type List<E> should be parameterized\n" + |
22145 |
"----------\n"); |
22215 |
"----------\n"); |
22146 |
} |
22216 |
} |
22147 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=98396 |
22217 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=98396 |
Lines 23312-23318
Link Here
|
23312 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
23382 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
23313 |
"Type safety: The expression of type X.EntryMap.Entry needs unchecked conversion to conform to X.EntryMap<K,V>.Entry\n" + |
23383 |
"Type safety: The expression of type X.EntryMap.Entry needs unchecked conversion to conform to X.EntryMap<K,V>.Entry\n" + |
23314 |
"----------\n" + |
23384 |
"----------\n" + |
23315 |
"4. ERROR in X.java (at line 14)\n" + |
23385 |
"4. WARNING in X.java (at line 12)\n" + |
|
|
23386 |
" EntryMap<K,V>.Entry entry = (EntryMap.Entry) internalGet(key);\n" + |
23387 |
" ^^^^^^^^^^^^^^\n" + |
23388 |
"X.EntryMap.Entry is a raw type. References to generic type X<K,V>.EntryMap<K,V>.Entry should be parameterized\n" + |
23389 |
"----------\n" + |
23390 |
"5. ERROR in X.java (at line 14)\n" + |
23316 |
" Zork z;\n" + |
23391 |
" Zork z;\n" + |
23317 |
" ^^^^\n" + |
23392 |
" ^^^^\n" + |
23318 |
"Zork cannot be resolved to a type\n" + |
23393 |
"Zork cannot be resolved to a type\n" + |
Lines 25898-25922
Link Here
|
25898 |
" ^\n" + |
25973 |
" ^\n" + |
25899 |
"X is a raw type. References to generic type X<T> should be parameterized\n" + |
25974 |
"X is a raw type. References to generic type X<T> should be parameterized\n" + |
25900 |
"----------\n" + |
25975 |
"----------\n" + |
25901 |
"2. WARNING in X.java (at line 6)\n" + |
25976 |
"2. WARNING in X.java (at line 5)\n" + |
|
|
25977 |
" X x = (X) o;\n" + |
25978 |
" ^\n" + |
25979 |
"X is a raw type. References to generic type X<T> should be parameterized\n" + |
25980 |
"----------\n" + |
25981 |
"3. WARNING in X.java (at line 6)\n" + |
25902 |
" X<String> xs = (X<String>)o;\n" + |
25982 |
" X<String> xs = (X<String>)o;\n" + |
25903 |
" ^^^^^^^^^^^^\n" + |
25983 |
" ^^^^^^^^^^^^\n" + |
25904 |
"Type safety: The cast from Object to X<String> is actually checking against the erased type X\n" + |
25984 |
"Type safety: The cast from Object to X<String> is actually checking against the erased type X\n" + |
25905 |
"----------\n" + |
25985 |
"----------\n" + |
25906 |
"3. ERROR in X.java (at line 7)\n" + |
25986 |
"4. ERROR in X.java (at line 7)\n" + |
25907 |
" Zork z;\n" + |
25987 |
" Zork z;\n" + |
25908 |
" ^^^^\n" + |
25988 |
" ^^^^\n" + |
25909 |
"Zork cannot be resolved to a type\n" + |
25989 |
"Zork cannot be resolved to a type\n" + |
25910 |
"----------\n" + |
25990 |
"----------\n" + |
25911 |
"4. WARNING in X.java (at line 10)\n" + |
25991 |
"5. WARNING in X.java (at line 10)\n" + |
25912 |
" List l = (List) al;\n" + |
25992 |
" List l = (List) al;\n" + |
25913 |
" ^^^^\n" + |
25993 |
" ^^^^\n" + |
25914 |
"List is a raw type. References to generic type List<E> should be parameterized\n" + |
25994 |
"List is a raw type. References to generic type List<E> should be parameterized\n" + |
25915 |
"----------\n" + |
25995 |
"----------\n" + |
25916 |
"5. WARNING in X.java (at line 10)\n" + |
25996 |
"6. WARNING in X.java (at line 10)\n" + |
25917 |
" List l = (List) al;\n" + |
25997 |
" List l = (List) al;\n" + |
25918 |
" ^^^^^^^^^\n" + |
25998 |
" ^^^^^^^^^\n" + |
25919 |
"Unnecessary cast from ArrayList<String> to List\n" + |
25999 |
"Unnecessary cast from ArrayList<String> to List\n" + |
|
|
26000 |
"----------\n" + |
26001 |
"7. WARNING in X.java (at line 10)\n" + |
26002 |
" List l = (List) al;\n" + |
26003 |
" ^^^^\n" + |
26004 |
"List is a raw type. References to generic type List<E> should be parameterized\n" + |
25920 |
"----------\n"); |
26005 |
"----------\n"); |
25921 |
} |
26006 |
} |
25922 |
//unnecessary cast may be combined with unchecked cast warning |
26007 |
//unnecessary cast may be combined with unchecked cast warning |
Lines 26030-26036
Link Here
|
26030 |
" ^^^^^^^^^^^^^^^^\n" + |
26115 |
" ^^^^^^^^^^^^^^^^\n" + |
26031 |
"Type safety: The expression of type Collection needs unchecked conversion to conform to Collection<Number>\n" + |
26116 |
"Type safety: The expression of type Collection needs unchecked conversion to conform to Collection<Number>\n" + |
26032 |
"----------\n" + |
26117 |
"----------\n" + |
26033 |
"2. ERROR in X.java (at line 9)\n" + |
26118 |
"2. WARNING in X.java (at line 7)\n" + |
|
|
26119 |
" collection = (Collection) set;\n" + |
26120 |
" ^^^^^^^^^^\n" + |
26121 |
"Collection is a raw type. References to generic type Collection<E> should be parameterized\n" + |
26122 |
"----------\n" + |
26123 |
"3. ERROR in X.java (at line 9)\n" + |
26034 |
" Zork z;\n" + |
26124 |
" Zork z;\n" + |
26035 |
" ^^^^\n" + |
26125 |
" ^^^^\n" + |
26036 |
"Zork cannot be resolved to a type\n" + |
26126 |
"Zork cannot be resolved to a type\n" + |
Lines 26050-26056
Link Here
|
26050 |
"}\n", |
26140 |
"}\n", |
26051 |
}, |
26141 |
}, |
26052 |
"----------\n" + |
26142 |
"----------\n" + |
26053 |
"1. ERROR in X.java (at line 6)\n" + |
26143 |
"1. WARNING in X.java (at line 4)\n" + |
|
|
26144 |
" ArrayList<?> als = (ArrayList) ls;\n" + |
26145 |
" ^^^^^^^^^\n" + |
26146 |
"ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized\n" + |
26147 |
"----------\n" + |
26148 |
"2. ERROR in X.java (at line 6)\n" + |
26054 |
" Zork z;\n" + |
26149 |
" Zork z;\n" + |
26055 |
" ^^^^\n" + |
26150 |
" ^^^^\n" + |
26056 |
"Zork cannot be resolved to a type\n" + |
26151 |
"Zork cannot be resolved to a type\n" + |
Lines 28135-28141
Link Here
|
28135 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
28230 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
28136 |
"Type safety: The cast from X.Implements to Comparable<R> is actually checking against the erased type Comparable\n" + |
28231 |
"Type safety: The cast from X.Implements to Comparable<R> is actually checking against the erased type Comparable\n" + |
28137 |
"----------\n" + |
28232 |
"----------\n" + |
28138 |
"2. ERROR in X.java (at line 16)\n" + |
28233 |
"2. WARNING in X.java (at line 12)\n" + |
|
|
28234 |
" ((Comparable) new Implements()).toString();\n" + |
28235 |
" ^^^^^^^^^^\n" + |
28236 |
"Comparable is a raw type. References to generic type Comparable<T> should be parameterized\n" + |
28237 |
"----------\n" + |
28238 |
"3. ERROR in X.java (at line 16)\n" + |
28139 |
" Zork z;\n" + |
28239 |
" Zork z;\n" + |
28140 |
" ^^^^\n" + |
28240 |
" ^^^^\n" + |
28141 |
"Zork cannot be resolved to a type\n" + |
28241 |
"Zork cannot be resolved to a type\n" + |
Lines 35334-35375
Link Here
|
35334 |
" ^^^^\n" + |
35434 |
" ^^^^\n" + |
35335 |
"List is a raw type. References to generic type List<E> should be parameterized\n" + |
35435 |
"List is a raw type. References to generic type List<E> should be parameterized\n" + |
35336 |
"----------\n" + |
35436 |
"----------\n" + |
35337 |
"2. WARNING in X.java (at line 14)\n" + |
35437 |
"2. WARNING in X.java (at line 10)\n" + |
|
|
35438 |
" List list = (List)object;//[1]\n" + |
35439 |
" ^^^^\n" + |
35440 |
"List is a raw type. References to generic type List<E> should be parameterized\n" + |
35441 |
"----------\n" + |
35442 |
"3. WARNING in X.java (at line 12)\n" + |
35443 |
" foo((List)object);//[2]\n" + |
35444 |
" ^^^^\n" + |
35445 |
"List is a raw type. References to generic type List<E> should be parameterized\n" + |
35446 |
"----------\n" + |
35447 |
"4. WARNING in X.java (at line 14)\n" + |
35338 |
" foo((List<Object>)object);//[4]unchecked cast\n" + |
35448 |
" foo((List<Object>)object);//[4]unchecked cast\n" + |
35339 |
" ^^^^^^^^^^^^^^^^^^^^\n" + |
35449 |
" ^^^^^^^^^^^^^^^^^^^^\n" + |
35340 |
"Type safety: The cast from Object to List<Object> is actually checking against the erased type List\n" + |
35450 |
"Type safety: The cast from Object to List<Object> is actually checking against the erased type List\n" + |
35341 |
"----------\n" + |
35451 |
"----------\n" + |
35342 |
"3. WARNING in X.java (at line 15)\n" + |
35452 |
"5. WARNING in X.java (at line 15)\n" + |
35343 |
" foo((List<? extends Object>)object);//[5]\n" + |
35453 |
" foo((List<? extends Object>)object);//[5]\n" + |
35344 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
35454 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
35345 |
"Type safety: The cast from Object to List<? extends Object> is actually checking against the erased type List\n" + |
35455 |
"Type safety: The cast from Object to List<? extends Object> is actually checking against the erased type List\n" + |
35346 |
"----------\n" + |
35456 |
"----------\n" + |
35347 |
"4. WARNING in X.java (at line 19)\n" + |
35457 |
"6. WARNING in X.java (at line 17)\n" + |
|
|
35458 |
" foo((Map)object);//[6]\n" + |
35459 |
" ^^^\n" + |
35460 |
"Map is a raw type. References to generic type Map<K,V> should be parameterized\n" + |
35461 |
"----------\n" + |
35462 |
"7. WARNING in X.java (at line 19)\n" + |
35348 |
" foo((Map<Object, ?>)object);//[8]unchecked cast\n" + |
35463 |
" foo((Map<Object, ?>)object);//[8]unchecked cast\n" + |
35349 |
" ^^^^^^^^^^^^^^^^^^^^^^\n" + |
35464 |
" ^^^^^^^^^^^^^^^^^^^^^^\n" + |
35350 |
"Type safety: The cast from Object to Map<Object,?> is actually checking against the erased type Map\n" + |
35465 |
"Type safety: The cast from Object to Map<Object,?> is actually checking against the erased type Map\n" + |
35351 |
"----------\n" + |
35466 |
"----------\n" + |
35352 |
"5. WARNING in X.java (at line 20)\n" + |
35467 |
"8. WARNING in X.java (at line 20)\n" + |
35353 |
" foo((Map<?, Object>)object);//[9]unchecked cast\n" + |
35468 |
" foo((Map<?, Object>)object);//[9]unchecked cast\n" + |
35354 |
" ^^^^^^^^^^^^^^^^^^^^^^\n" + |
35469 |
" ^^^^^^^^^^^^^^^^^^^^^^\n" + |
35355 |
"Type safety: The cast from Object to Map<?,Object> is actually checking against the erased type Map\n" + |
35470 |
"Type safety: The cast from Object to Map<?,Object> is actually checking against the erased type Map\n" + |
35356 |
"----------\n" + |
35471 |
"----------\n" + |
35357 |
"6. WARNING in X.java (at line 21)\n" + |
35472 |
"9. WARNING in X.java (at line 21)\n" + |
35358 |
" foo((Map<Object, Object>)object);//[10]unchecked cast\n" + |
35473 |
" foo((Map<Object, Object>)object);//[10]unchecked cast\n" + |
35359 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
35474 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
35360 |
"Type safety: The cast from Object to Map<Object,Object> is actually checking against the erased type Map\n" + |
35475 |
"Type safety: The cast from Object to Map<Object,Object> is actually checking against the erased type Map\n" + |
35361 |
"----------\n" + |
35476 |
"----------\n" + |
35362 |
"7. WARNING in X.java (at line 22)\n" + |
35477 |
"10. WARNING in X.java (at line 22)\n" + |
35363 |
" foo((Map<? extends Object, Object>)object);//[11]unchecked cast\n" + |
35478 |
" foo((Map<? extends Object, Object>)object);//[11]unchecked cast\n" + |
35364 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
35479 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
35365 |
"Type safety: The cast from Object to Map<? extends Object,Object> is actually checking against the erased type Map\n" + |
35480 |
"Type safety: The cast from Object to Map<? extends Object,Object> is actually checking against the erased type Map\n" + |
35366 |
"----------\n" + |
35481 |
"----------\n" + |
35367 |
"8. WARNING in X.java (at line 23)\n" + |
35482 |
"11. WARNING in X.java (at line 23)\n" + |
35368 |
" foo((Map<? extends Object, ? extends Object>)object);//[12]\n" + |
35483 |
" foo((Map<? extends Object, ? extends Object>)object);//[12]\n" + |
35369 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
35484 |
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + |
35370 |
"Type safety: The cast from Object to Map<? extends Object,? extends Object> is actually checking against the erased type Map\n" + |
35485 |
"Type safety: The cast from Object to Map<? extends Object,? extends Object> is actually checking against the erased type Map\n" + |
35371 |
"----------\n" + |
35486 |
"----------\n" + |
35372 |
"9. ERROR in X.java (at line 24)\n" + |
35487 |
"12. ERROR in X.java (at line 24)\n" + |
35373 |
" Zork z;\n" + |
35488 |
" Zork z;\n" + |
35374 |
" ^^^^\n" + |
35489 |
" ^^^^\n" + |
35375 |
"Zork cannot be resolved to a type\n" + |
35490 |
"Zork cannot be resolved to a type\n" + |