Lines 30-35
Link Here
|
30 |
protected Map getCompilerOptions() { |
30 |
protected Map getCompilerOptions() { |
31 |
Map options = super.getCompilerOptions(); |
31 |
Map options = super.getCompilerOptions(); |
32 |
options.put(CompilerOptions.OPTION_ReportRawTypeReference, CompilerOptions.IGNORE); |
32 |
options.put(CompilerOptions.OPTION_ReportRawTypeReference, CompilerOptions.IGNORE); |
|
|
33 |
options.put(CompilerOptions.OPTION_ReportUnusedLocal, CompilerOptions.IGNORE); |
34 |
options.put(CompilerOptions.OPTION_ReportUnusedParameter, CompilerOptions.IGNORE); |
35 |
options.put(CompilerOptions.OPTION_ReportUnusedPrivateMember, CompilerOptions.IGNORE); |
33 |
return options; |
36 |
return options; |
34 |
} |
37 |
} |
35 |
/** |
38 |
/** |
Lines 1894-1905
Link Here
|
1894 |
"}", |
1897 |
"}", |
1895 |
}, |
1898 |
}, |
1896 |
"----------\n" + |
1899 |
"----------\n" + |
1897 |
"1. WARNING in p\\X.java (at line 6)\n" + |
1900 |
"1. ERROR in p\\X.java (at line 6)\n" + |
1898 |
" int j = i; \n" + |
|
|
1899 |
" ^\n" + |
1900 |
"The field Local.j is never read locally\n" + |
1901 |
"----------\n" + |
1902 |
"2. ERROR in p\\X.java (at line 6)\n" + |
1903 |
" int j = i; \n" + |
1901 |
" int j = i; \n" + |
1904 |
" ^\n" + |
1902 |
" ^\n" + |
1905 |
"The local variable i may not have been initialized\n" + |
1903 |
"The local variable i may not have been initialized\n" + |
Lines 2306-2317
Link Here
|
2306 |
"}", |
2304 |
"}", |
2307 |
}, |
2305 |
}, |
2308 |
"----------\n" + |
2306 |
"----------\n" + |
2309 |
"1. WARNING in p\\Init2.java (at line 6)\n" + |
2307 |
"1. ERROR in p\\Init2.java (at line 6)\n" + |
2310 |
" int j = i; // Javac complains here (Jikes does not)\n" + |
|
|
2311 |
" ^\n" + |
2312 |
"The field Local.j is never read locally\n" + |
2313 |
"----------\n" + |
2314 |
"2. ERROR in p\\Init2.java (at line 6)\n" + |
2315 |
" int j = i; // Javac complains here (Jikes does not)\n" + |
2308 |
" int j = i; // Javac complains here (Jikes does not)\n" + |
2316 |
" ^\n" + |
2309 |
" ^\n" + |
2317 |
"The local variable i may not have been initialized\n" + |
2310 |
"The local variable i may not have been initialized\n" + |
Lines 2632-2643
Link Here
|
2632 |
"}", |
2625 |
"}", |
2633 |
}, |
2626 |
}, |
2634 |
"----------\n" + |
2627 |
"----------\n" + |
2635 |
"1. WARNING in p\\X.java (at line 5)\n" + |
2628 |
"1. ERROR in p\\X.java (at line 5)\n" + |
2636 |
" Object obj = X.this;\n" + |
|
|
2637 |
" ^^^\n" + |
2638 |
"The field new Object(){}.obj is never read locally\n" + |
2639 |
"----------\n" + |
2640 |
"2. ERROR in p\\X.java (at line 5)\n" + |
2641 |
" Object obj = X.this;\n" + |
2629 |
" Object obj = X.this;\n" + |
2642 |
" ^^^^^^\n" + |
2630 |
" ^^^^^^\n" + |
2643 |
"No enclosing instance of the type X is accessible in scope\n" + |
2631 |
"No enclosing instance of the type X is accessible in scope\n" + |
Lines 3121-3155
Link Here
|
3121 |
" ^^^^^^^\n" + |
3109 |
" ^^^^^^^\n" + |
3122 |
"The blank final field a may not have been initialized\n" + |
3110 |
"The blank final field a may not have been initialized\n" + |
3123 |
"----------\n" + |
3111 |
"----------\n" + |
3124 |
"2. WARNING in p\\CheckBlankFinals.java (at line 13)\n" + |
3112 |
"2. ERROR in p\\CheckBlankFinals.java (at line 13)\n" + |
3125 |
" class LocA {\n" + |
|
|
3126 |
" ^^^^\n" + |
3127 |
"The type LocA is never used locally\n" + |
3128 |
"----------\n" + |
3129 |
"3. ERROR in p\\CheckBlankFinals.java (at line 13)\n" + |
3130 |
" class LocA {\n" + |
3113 |
" class LocA {\n" + |
3131 |
" ^^^^\n" + |
3114 |
" ^^^^\n" + |
3132 |
"The blank final field a may not have been initialized\n" + |
3115 |
"The blank final field a may not have been initialized\n" + |
3133 |
"----------\n" + |
3116 |
"----------\n" + |
3134 |
"4. WARNING in p\\CheckBlankFinals.java (at line 14)\n" + |
3117 |
"3. ERROR in p\\CheckBlankFinals.java (at line 15)\n" + |
3135 |
" final int a; // never initialized\n" + |
|
|
3136 |
" ^\n" + |
3137 |
"The field LocA.a is never read locally\n" + |
3138 |
"----------\n" + |
3139 |
"5. WARNING in p\\CheckBlankFinals.java (at line 15)\n" + |
3140 |
" class LocB {\n" + |
3141 |
" ^^^^\n" + |
3142 |
"The type LocA.LocB is never used locally\n" + |
3143 |
"----------\n" + |
3144 |
"6. ERROR in p\\CheckBlankFinals.java (at line 15)\n" + |
3145 |
" class LocB {\n" + |
3118 |
" class LocB {\n" + |
3146 |
" ^^^^\n" + |
3119 |
" ^^^^\n" + |
3147 |
"The blank final field b may not have been initialized\n" + |
3120 |
"The blank final field b may not have been initialized\n" + |
3148 |
"----------\n" + |
|
|
3149 |
"7. WARNING in p\\CheckBlankFinals.java (at line 16)\n" + |
3150 |
" final int b; \n" + |
3151 |
" ^\n" + |
3152 |
"The field LocA.LocB.b is never read locally\n" + |
3153 |
"----------\n" |
3121 |
"----------\n" |
3154 |
); |
3122 |
); |
3155 |
} |
3123 |
} |
Lines 3895-3930
Link Here
|
3895 |
" class SubLocal extends SuperLokcal {}\n" + |
3863 |
" class SubLocal extends SuperLokcal {}\n" + |
3896 |
" ^^^^^^^^^^^\n" + |
3864 |
" ^^^^^^^^^^^\n" + |
3897 |
"SuperLokcal cannot be resolved to a type\n" + |
3865 |
"SuperLokcal cannot be resolved to a type\n" + |
3898 |
"----------\n" + |
|
|
3899 |
"3. WARNING in p\\TheSub.java (at line 12)\n" + |
3900 |
" class SubLocal extends MidLocal {}\n" + |
3901 |
" ^^^^^^^^\n" + |
3902 |
"The type SubLocal is never used locally\n" + |
3903 |
"----------\n" + |
3904 |
"4. WARNING in p\\TheSub.java (at line 16)\n" + |
3905 |
" int y = x; }\n" + |
3906 |
" ^\n" + |
3907 |
"The field SuperLocal.y is never read locally\n" + |
3908 |
"----------\n" + |
3909 |
"5. WARNING in p\\TheSub.java (at line 18)\n" + |
3910 |
" class SubLocal extends MidLocal {}\n" + |
3911 |
" ^^^^^^^^\n" + |
3912 |
"The type SubLocal is never used locally\n" + |
3913 |
"----------\n" + |
3914 |
"6. WARNING in p\\TheSub.java (at line 22)\n" + |
3915 |
" Object o = TheSub.this; }\n" + |
3916 |
" ^\n" + |
3917 |
"The field SuperLocal.o is never read locally\n" + |
3918 |
"----------\n" + |
3919 |
"7. WARNING in p\\TheSub.java (at line 24)\n" + |
3920 |
" class SubLocal extends MidLocal {}\n" + |
3921 |
" ^^^^^^^^\n" + |
3922 |
"The type SubLocal is never used locally\n" + |
3923 |
"----------\n" + |
3924 |
"8. WARNING in p\\TheSub.java (at line 29)\n" + |
3925 |
" class SubLocal extends MidLocal {}\n" + |
3926 |
" ^^^^^^^^\n" + |
3927 |
"The type SubLocal is never used locally\n" + |
3928 |
"----------\n" |
3866 |
"----------\n" |
3929 |
); |
3867 |
); |
3930 |
} |
3868 |
} |
Lines 3956-3985
Link Here
|
3956 |
"}", |
3894 |
"}", |
3957 |
}, |
3895 |
}, |
3958 |
"----------\n" + |
3896 |
"----------\n" + |
3959 |
"1. WARNING in p\\CheckBlankFinals1.java (at line 11)\n" + |
3897 |
"1. ERROR in p\\CheckBlankFinals1.java (at line 11)\n" + |
3960 |
" class LocA {\n" + |
|
|
3961 |
" ^^^^\n" + |
3962 |
"The type LocA is never used locally\n" + |
3963 |
"----------\n" + |
3964 |
"2. ERROR in p\\CheckBlankFinals1.java (at line 11)\n" + |
3965 |
" class LocA {\n" + |
3898 |
" class LocA {\n" + |
3966 |
" ^^^^\n" + |
3899 |
" ^^^^\n" + |
3967 |
"The blank final field a may not have been initialized\n" + |
3900 |
"The blank final field a may not have been initialized\n" + |
3968 |
"----------\n" + |
|
|
3969 |
"3. WARNING in p\\CheckBlankFinals1.java (at line 12)\n" + |
3970 |
" final int a; // never initialized\n" + |
3971 |
" ^\n" + |
3972 |
"The field LocA.a is never read locally\n" + |
3973 |
"----------\n" + |
3974 |
"4. WARNING in p\\CheckBlankFinals1.java (at line 13)\n" + |
3975 |
" class LocB {\n" + |
3976 |
" ^^^^\n" + |
3977 |
"The type LocA.LocB is never used locally\n" + |
3978 |
"----------\n" + |
3979 |
"5. WARNING in p\\CheckBlankFinals1.java (at line 14)\n" + |
3980 |
" final int b; \n" + |
3981 |
" ^\n" + |
3982 |
"The field LocA.LocB.b is never read locally\n" + |
3983 |
"----------\n"); |
3901 |
"----------\n"); |
3984 |
} |
3902 |
} |
3985 |
public void test098() { |
3903 |
public void test098() { |
Lines 4001-4035
Link Here
|
4001 |
"} ", |
3919 |
"} ", |
4002 |
}, |
3920 |
}, |
4003 |
"----------\n" + |
3921 |
"----------\n" + |
4004 |
"1. WARNING in p\\CheckBlankFinals2.java (at line 6)\n" + |
3922 |
"1. ERROR in p\\CheckBlankFinals2.java (at line 6)\n" + |
4005 |
" class LocA {\n" + |
|
|
4006 |
" ^^^^\n" + |
4007 |
"The type LocA is never used locally\n" + |
4008 |
"----------\n" + |
4009 |
"2. ERROR in p\\CheckBlankFinals2.java (at line 6)\n" + |
4010 |
" class LocA {\n" + |
3923 |
" class LocA {\n" + |
4011 |
" ^^^^\n" + |
3924 |
" ^^^^\n" + |
4012 |
"The blank final field a may not have been initialized\n" + |
3925 |
"The blank final field a may not have been initialized\n" + |
4013 |
"----------\n" + |
3926 |
"----------\n" + |
4014 |
"3. WARNING in p\\CheckBlankFinals2.java (at line 7)\n" + |
3927 |
"2. ERROR in p\\CheckBlankFinals2.java (at line 8)\n" + |
4015 |
" final int a; // never initialized\n" + |
|
|
4016 |
" ^\n" + |
4017 |
"The field LocA.a is never read locally\n" + |
4018 |
"----------\n" + |
4019 |
"4. WARNING in p\\CheckBlankFinals2.java (at line 8)\n" + |
4020 |
" class LocB {\n" + |
4021 |
" ^^^^\n" + |
4022 |
"The type LocA.LocB is never used locally\n" + |
4023 |
"----------\n" + |
4024 |
"5. ERROR in p\\CheckBlankFinals2.java (at line 8)\n" + |
4025 |
" class LocB {\n" + |
3928 |
" class LocB {\n" + |
4026 |
" ^^^^\n" + |
3929 |
" ^^^^\n" + |
4027 |
"The blank final field b may not have been initialized\n" + |
3930 |
"The blank final field b may not have been initialized\n" + |
4028 |
"----------\n" + |
|
|
4029 |
"6. WARNING in p\\CheckBlankFinals2.java (at line 9)\n" + |
4030 |
" final int b; // never initialized\n" + |
4031 |
" ^\n" + |
4032 |
"The field LocA.LocB.b is never read locally\n" + |
4033 |
"----------\n" |
3931 |
"----------\n" |
4034 |
); |
3932 |
); |
4035 |
} |
3933 |
} |
Lines 4055-4070
Link Here
|
4055 |
" class MemberA {\n" + |
3953 |
" class MemberA {\n" + |
4056 |
" ^^^^^^^\n" + |
3954 |
" ^^^^^^^\n" + |
4057 |
"The blank final field a may not have been initialized\n" + |
3955 |
"The blank final field a may not have been initialized\n" + |
4058 |
"----------\n" + |
|
|
4059 |
"2. WARNING in p\\CheckBlankFinals3.java (at line 6)\n" + |
4060 |
" class MemberB {\n" + |
4061 |
" ^^^^^^^\n" + |
4062 |
"The type MemberB is never used locally\n" + |
4063 |
"----------\n" + |
4064 |
"3. WARNING in p\\CheckBlankFinals3.java (at line 7)\n" + |
4065 |
" final int b; \n" + |
4066 |
" ^\n" + |
4067 |
"The field MemberB.b is never read locally\n" + |
4068 |
"----------\n" |
3956 |
"----------\n" |
4069 |
); |
3957 |
); |
4070 |
} |
3958 |
} |
Lines 4568-4594
Link Here
|
4568 |
"}", |
4456 |
"}", |
4569 |
}, |
4457 |
}, |
4570 |
"----------\n" + |
4458 |
"----------\n" + |
4571 |
"1. WARNING in p\\Outer12.java (at line 7)\n" + |
4459 |
"1. ERROR in p\\Outer12.java (at line 9)\n" + |
4572 |
" void g() {\n" + |
|
|
4573 |
" ^^^\n" + |
4574 |
"The method g() from the type Local is never used locally\n" + |
4575 |
"----------\n" + |
4576 |
"2. WARNING in p\\Outer12.java (at line 8)\n" + |
4577 |
" class Local2 {\n" + |
4578 |
" ^^^^^^\n" + |
4579 |
"The type Local2 is never used locally\n" + |
4580 |
"----------\n" + |
4581 |
"3. WARNING in p\\Outer12.java (at line 9)\n" + |
4582 |
" int n = count + count; // another compiler rejects\n" + |
4583 |
" ^\n" + |
4584 |
"The field Local2.n is never read locally\n" + |
4585 |
"----------\n" + |
4586 |
"4. ERROR in p\\Outer12.java (at line 9)\n" + |
4587 |
" int n = count + count; // another compiler rejects\n" + |
4460 |
" int n = count + count; // another compiler rejects\n" + |
4588 |
" ^^^^^\n" + |
4461 |
" ^^^^^\n" + |
4589 |
"The local variable count may not have been initialized\n" + |
4462 |
"The local variable count may not have been initialized\n" + |
4590 |
"----------\n" + |
4463 |
"----------\n" + |
4591 |
"5. ERROR in p\\Outer12.java (at line 9)\n" + |
4464 |
"2. ERROR in p\\Outer12.java (at line 9)\n" + |
4592 |
" int n = count + count; // another compiler rejects\n" + |
4465 |
" int n = count + count; // another compiler rejects\n" + |
4593 |
" ^^^^^\n" + |
4466 |
" ^^^^^\n" + |
4594 |
"The local variable count may not have been initialized\n" + |
4467 |
"The local variable count may not have been initialized\n" + |
Lines 6082-6103
Link Here
|
6082 |
" ^\n" + |
5955 |
" ^\n" + |
6083 |
"Cannot define static initializer in inner type B\n" + |
5956 |
"Cannot define static initializer in inner type B\n" + |
6084 |
"----------\n" + |
5957 |
"----------\n" + |
6085 |
"2. WARNING in p\\A11.java (at line 10)\n" + |
5958 |
"2. ERROR in p\\A11.java (at line 13)\n" + |
6086 |
" class A {\n" + |
|
|
6087 |
" ^\n" + |
6088 |
"The type A is never used locally\n" + |
6089 |
"----------\n" + |
6090 |
"3. WARNING in p\\A11.java (at line 11)\n" + |
6091 |
" void f()\n" + |
6092 |
" ^^^\n" + |
6093 |
"The method f() from the type A is never used locally\n" + |
6094 |
"----------\n" + |
6095 |
"4. ERROR in p\\A11.java (at line 13)\n" + |
6096 |
" b=3; // B has not been definitely assigned!\n" + |
5959 |
" b=3; // B has not been definitely assigned!\n" + |
6097 |
" ^\n" + |
5960 |
" ^\n" + |
6098 |
"The final local variable b cannot be assigned, since it is defined in an enclosing type\n" + |
5961 |
"The final local variable b cannot be assigned, since it is defined in an enclosing type\n" + |
6099 |
"----------\n" + |
5962 |
"----------\n" + |
6100 |
"5. ERROR in p\\A11.java (at line 17)\n" + |
5963 |
"3. ERROR in p\\A11.java (at line 17)\n" + |
6101 |
" System.out.println(b);\n" + |
5964 |
" System.out.println(b);\n" + |
6102 |
" ^\n" + |
5965 |
" ^\n" + |
6103 |
"The local variable b may not have been initialized\n" + |
5966 |
"The local variable b may not have been initialized\n" + |
Lines 6795-6811
Link Here
|
6795 |
"}", |
6658 |
"}", |
6796 |
}, |
6659 |
}, |
6797 |
"----------\n" + |
6660 |
"----------\n" + |
6798 |
"1. WARNING in p\\ASB.java (at line 8)\n" + |
6661 |
"1. ERROR in p\\ASB.java (at line 9)\n" + |
6799 |
" class L {\n" + |
|
|
6800 |
" ^\n" + |
6801 |
"The type L is never used locally\n" + |
6802 |
"----------\n" + |
6803 |
"2. WARNING in p\\ASB.java (at line 9)\n" + |
6804 |
" int l = ASB.this.x; // no enclosing instance of type X is available\n" + |
6805 |
" ^\n" + |
6806 |
"The field L.l is never read locally\n" + |
6807 |
"----------\n" + |
6808 |
"3. ERROR in p\\ASB.java (at line 9)\n" + |
6809 |
" int l = ASB.this.x; // no enclosing instance of type X is available\n" + |
6662 |
" int l = ASB.this.x; // no enclosing instance of type X is available\n" + |
6810 |
" ^^^^^^^^\n" + |
6663 |
" ^^^^^^^^\n" + |
6811 |
"No enclosing instance of the type ASB is accessible in scope\n" + |
6664 |
"No enclosing instance of the type ASB is accessible in scope\n" + |
Lines 7370-7431
Link Here
|
7370 |
" ^^^^^^^^^^^^^^^^^^^\n" + |
7223 |
" ^^^^^^^^^^^^^^^^^^^\n" + |
7371 |
"Unreachable catch block for IOException. This exception is never thrown from the try statement body\n" + |
7224 |
"Unreachable catch block for IOException. This exception is never thrown from the try statement body\n" + |
7372 |
"----------\n" + |
7225 |
"----------\n" + |
7373 |
"3. WARNING in p\\DCBug.java (at line 15)\n" + |
7226 |
"3. WARNING in p\\DCBug.java (at line 20)\n" + |
7374 |
" private static void check_break ()\n" + |
|
|
7375 |
" ^^^^^^^^^^^^^^\n" + |
7376 |
"The method check_break() from the type DCBug is never used locally\n" + |
7377 |
"----------\n" + |
7378 |
"4. WARNING in p\\DCBug.java (at line 20)\n" + |
7379 |
" outer:\n" + |
7227 |
" outer:\n" + |
7380 |
" ^^^^^\n" + |
7228 |
" ^^^^^\n" + |
7381 |
"The label outer is never explicitly referenced\n" + |
7229 |
"The label outer is never explicitly referenced\n" + |
7382 |
"----------\n" + |
7230 |
"----------\n" + |
7383 |
"5. WARNING in p\\DCBug.java (at line 23)\n" + |
7231 |
"4. WARNING in p\\DCBug.java (at line 23)\n" + |
7384 |
" middle:\n" + |
7232 |
" middle:\n" + |
7385 |
" ^^^^^^\n" + |
7233 |
" ^^^^^^\n" + |
7386 |
"The label middle is never explicitly referenced\n" + |
7234 |
"The label middle is never explicitly referenced\n" + |
7387 |
"----------\n" + |
7235 |
"----------\n" + |
7388 |
"6. WARNING in p\\DCBug.java (at line 41)\n" + |
7236 |
"5. WARNING in p\\DCBug.java (at line 41)\n" + |
7389 |
" outer:\n" + |
7237 |
" outer:\n" + |
7390 |
" ^^^^^\n" + |
7238 |
" ^^^^^\n" + |
7391 |
"The label outer is never explicitly referenced\n" + |
7239 |
"The label outer is never explicitly referenced\n" + |
7392 |
"----------\n" + |
7240 |
"----------\n" + |
7393 |
"7. WARNING in p\\DCBug.java (at line 42)\n" + |
7241 |
"6. WARNING in p\\DCBug.java (at line 42)\n" + |
7394 |
" for (int i = 0; i < 1000; i++)\n" + |
7242 |
" for (int i = 0; i < 1000; i++)\n" + |
7395 |
" ^^^\n" + |
7243 |
" ^^^\n" + |
7396 |
"Dead code\n" + |
7244 |
"Dead code\n" + |
7397 |
"----------\n" + |
7245 |
"----------\n" + |
7398 |
"8. WARNING in p\\DCBug.java (at line 45)\n" + |
7246 |
"7. WARNING in p\\DCBug.java (at line 45)\n" + |
7399 |
" for (int j = 0; j < 1000; j++)\n" + |
7247 |
" for (int j = 0; j < 1000; j++)\n" + |
7400 |
" ^^^\n" + |
7248 |
" ^^^\n" + |
7401 |
"Dead code\n" + |
7249 |
"Dead code\n" + |
7402 |
"----------\n" + |
7250 |
"----------\n" + |
7403 |
"9. WARNING in p\\DCBug.java (at line 47)\n" + |
7251 |
"8. WARNING in p\\DCBug.java (at line 47)\n" + |
7404 |
" inner:\n" + |
7252 |
" inner:\n" + |
7405 |
" ^^^^^\n" + |
7253 |
" ^^^^^\n" + |
7406 |
"The label inner is never explicitly referenced\n" + |
7254 |
"The label inner is never explicitly referenced\n" + |
7407 |
"----------\n" + |
7255 |
"----------\n" + |
7408 |
"10. WARNING in p\\DCBug.java (at line 48)\n" + |
7256 |
"9. WARNING in p\\DCBug.java (at line 48)\n" + |
7409 |
" for (int k = 0; k < 1000; k++)\n" + |
7257 |
" for (int k = 0; k < 1000; k++)\n" + |
7410 |
" ^^^\n" + |
7258 |
" ^^^\n" + |
7411 |
"Dead code\n" + |
7259 |
"Dead code\n" + |
7412 |
"----------\n" + |
7260 |
"----------\n" + |
7413 |
"11. WARNING in p\\DCBug.java (at line 63)\n" + |
7261 |
"10. WARNING in p\\DCBug.java (at line 63)\n" + |
7414 |
" middle:\n" + |
7262 |
" middle:\n" + |
7415 |
" ^^^^^^\n" + |
7263 |
" ^^^^^^\n" + |
7416 |
"The label middle is never explicitly referenced\n" + |
7264 |
"The label middle is never explicitly referenced\n" + |
7417 |
"----------\n" + |
7265 |
"----------\n" + |
7418 |
"12. WARNING in p\\DCBug.java (at line 66)\n" + |
7266 |
"11. WARNING in p\\DCBug.java (at line 66)\n" + |
7419 |
" inner:\n" + |
7267 |
" inner:\n" + |
7420 |
" ^^^^^\n" + |
7268 |
" ^^^^^\n" + |
7421 |
"The label inner is never explicitly referenced\n" + |
7269 |
"The label inner is never explicitly referenced\n" + |
7422 |
"----------\n" + |
7270 |
"----------\n" + |
7423 |
"13. WARNING in p\\DCBug.java (at line 67)\n" + |
7271 |
"12. WARNING in p\\DCBug.java (at line 67)\n" + |
7424 |
" for (int k = 0; k < 1000; k++)\n" + |
7272 |
" for (int k = 0; k < 1000; k++)\n" + |
7425 |
" ^^^\n" + |
7273 |
" ^^^\n" + |
7426 |
"Dead code\n" + |
7274 |
"Dead code\n" + |
7427 |
"----------\n" + |
7275 |
"----------\n" + |
7428 |
"14. WARNING in p\\DCBug.java (at line 90)\n" + |
7276 |
"13. WARNING in p\\DCBug.java (at line 90)\n" + |
7429 |
" {\n" + |
7277 |
" {\n" + |
7430 |
" i = 20;\n" + |
7278 |
" i = 20;\n" + |
7431 |
" continue;\n" + |
7279 |
" continue;\n" + |
Lines 7625-7636
Link Here
|
7625 |
"}", |
7473 |
"}", |
7626 |
}, |
7474 |
}, |
7627 |
"----------\n" + |
7475 |
"----------\n" + |
7628 |
"1. WARNING in p\\Outer.java (at line 7)\n" + |
7476 |
"1. ERROR in p\\Outer.java (at line 7)\n" + |
7629 |
" int n = count; // another compiler rejects\n" + |
|
|
7630 |
" ^\n" + |
7631 |
"The field Local.n is never read locally\n" + |
7632 |
"----------\n" + |
7633 |
"2. ERROR in p\\Outer.java (at line 7)\n" + |
7634 |
" int n = count; // another compiler rejects\n" + |
7477 |
" int n = count; // another compiler rejects\n" + |
7635 |
" ^^^^^\n" + |
7478 |
" ^^^^^\n" + |
7636 |
"The local variable count may not have been initialized\n" + |
7479 |
"The local variable count may not have been initialized\n" + |
Lines 7738-7760
Link Here
|
7738 |
|
7581 |
|
7739 |
}, |
7582 |
}, |
7740 |
"----------\n" + |
7583 |
"----------\n" + |
7741 |
"1. WARNING in p\\a\\Init.java (at line 9)\n" + |
7584 |
"1. ERROR in p\\a\\Init.java (at line 9)\n" + |
7742 |
" int j = i; // Javac complains here (Jikes does not)\n" + |
|
|
7743 |
" ^\n" + |
7744 |
"The field Local.j is never read locally\n" + |
7745 |
"----------\n" + |
7746 |
"2. ERROR in p\\a\\Init.java (at line 9)\n" + |
7747 |
" int j = i; // Javac complains here (Jikes does not)\n" + |
7585 |
" int j = i; // Javac complains here (Jikes does not)\n" + |
7748 |
" ^\n" + |
7586 |
" ^\n" + |
7749 |
"The local variable i may not have been initialized\n" + |
7587 |
"The local variable i may not have been initialized\n" + |
7750 |
"----------\n" + |
7588 |
"----------\n" + |
7751 |
"----------\n" + |
7589 |
"----------\n" + |
7752 |
"1. WARNING in p\\a\\Outer.java (at line 9)\n" + |
7590 |
"1. ERROR in p\\a\\Outer.java (at line 9)\n" + |
7753 |
" int n = count; // another compiler rejects\n" + |
|
|
7754 |
" ^\n" + |
7755 |
"The field Local.n is never read locally\n" + |
7756 |
"----------\n" + |
7757 |
"2. ERROR in p\\a\\Outer.java (at line 9)\n" + |
7758 |
" int n = count; // another compiler rejects\n" + |
7591 |
" int n = count; // another compiler rejects\n" + |
7759 |
" ^^^^^\n" + |
7592 |
" ^^^^^\n" + |
7760 |
"The local variable count may not have been initialized\n" + |
7593 |
"The local variable count may not have been initialized\n" + |
Lines 7817-7848
Link Here
|
7817 |
|
7650 |
|
7818 |
}, //TODO should improve error message to suggest addition of explicit constructor instead |
7651 |
}, //TODO should improve error message to suggest addition of explicit constructor instead |
7819 |
"----------\n" + |
7652 |
"----------\n" + |
7820 |
"1. WARNING in p\\z\\AClass.java (at line 13)\n" + |
|
|
7821 |
" static private class Inner3 {\n" + |
7822 |
" ^^^^^^\n" + |
7823 |
"The type AClass.Inner3 is never used locally\n" + |
7824 |
"----------\n" + |
7825 |
"2. WARNING in p\\z\\AClass.java (at line 14)\n" + |
7826 |
" String test() {\n" + |
7827 |
" ^^^^^^\n" + |
7828 |
"The method test() from the type AClass.Inner3 is never used locally\n" + |
7829 |
"----------\n" + |
7830 |
"3. WARNING in p\\z\\AClass.java (at line 18)\n" + |
7831 |
" private class Inner4 {\n" + |
7832 |
" ^^^^^^\n" + |
7833 |
"The type AClass.Inner4 is never used locally\n" + |
7834 |
"----------\n" + |
7835 |
"4. WARNING in p\\z\\AClass.java (at line 19)\n" + |
7836 |
" String test() {\n" + |
7837 |
" ^^^^^^\n" + |
7838 |
"The method test() from the type AClass.Inner4 is never used locally\n" + |
7839 |
"----------\n" + |
7840 |
"5. WARNING in p\\z\\AClass.java (at line 31)\n" + |
7841 |
" public String test() {\n" + |
7842 |
" ^^^^^^\n" + |
7843 |
"The method test() from the type new Object(){} is never used locally\n" + |
7844 |
"----------\n" + |
7845 |
"----------\n" + |
7846 |
"1. ERROR in p\\z\\AClassExtension.java (at line 2)\n" + |
7653 |
"1. ERROR in p\\z\\AClassExtension.java (at line 2)\n" + |
7847 |
" public class AClassExtension extends AClass.Inner1 {}\n" + |
7654 |
" public class AClassExtension extends AClass.Inner1 {}\n" + |
7848 |
" ^^^^^^^^^^^^^^^\n" + |
7655 |
" ^^^^^^^^^^^^^^^\n" + |
Lines 8603-8613
Link Here
|
8603 |
"----------\n" + |
8410 |
"----------\n" + |
8604 |
"3. WARNING in p\\r2\\helper\\SubA.java (at line 11)\n" + |
8411 |
"3. WARNING in p\\r2\\helper\\SubA.java (at line 11)\n" + |
8605 |
" int x = i; }; // bad since from inside inner\n" + |
8412 |
" int x = i; }; // bad since from inside inner\n" + |
8606 |
" ^\n" + |
|
|
8607 |
"The field new Object(){}.x is never read locally\n" + |
8608 |
"----------\n" + |
8609 |
"4. WARNING in p\\r2\\helper\\SubA.java (at line 11)\n" + |
8610 |
" int x = i; }; // bad since from inside inner\n" + |
8611 |
" ^\n" + |
8413 |
" ^\n" + |
8612 |
"Read access to enclosing field A.i is emulated by a synthetic accessor method\n" + |
8414 |
"Read access to enclosing field A.i is emulated by a synthetic accessor method\n" + |
8613 |
"----------\n" + |
8415 |
"----------\n" + |
Lines 9027-9038
Link Here
|
9027 |
" int i = new AA().new Inner().i; // THIS LINE SHOULD CAUSE AN ERROR\n" + |
8829 |
" int i = new AA().new Inner().i; // THIS LINE SHOULD CAUSE AN ERROR\n" + |
9028 |
" ^^^^^\n" + |
8830 |
" ^^^^^\n" + |
9029 |
"The type AA.Inner is not visible\n" + |
8831 |
"The type AA.Inner is not visible\n" + |
9030 |
"----------\n" + |
|
|
9031 |
"----------\n" + |
9032 |
"1. WARNING in p\\k\\AA.java (at line 4)\n" + |
9033 |
" int i = 10;\n" + |
9034 |
" ^\n" + |
9035 |
"The field AA.Inner.i is never read locally\n" + |
9036 |
"----------\n"); |
8832 |
"----------\n"); |
9037 |
} |
8833 |
} |
9038 |
public void test227() { |
8834 |
public void test227() { |
Lines 9228-9243
Link Here
|
9228 |
" ^\n" + |
9024 |
" ^\n" + |
9229 |
"X cannot be resolved to a type\n" + |
9025 |
"X cannot be resolved to a type\n" + |
9230 |
"----------\n" + |
9026 |
"----------\n" + |
9231 |
"9. WARNING in p\\h\\X1.java (at line 29)\n" + |
|
|
9232 |
" class Local {\n" + |
9233 |
" ^^^^^\n" + |
9234 |
"The type Local is never used locally\n" + |
9235 |
"----------\n" + |
9236 |
"10. WARNING in p\\h\\X1.java (at line 30)\n" + |
9237 |
" void foo() {\n" + |
9238 |
" ^^^^^\n" + |
9239 |
"The method foo() from the type Local is never used locally\n" + |
9240 |
"----------\n" + |
9241 |
"----------\n" + |
9027 |
"----------\n" + |
9242 |
"1. WARNING in p\\h\\B.java (at line 2)\n" + |
9028 |
"1. WARNING in p\\h\\B.java (at line 2)\n" + |
9243 |
" class B extends Exception {\n" + |
9029 |
" class B extends Exception {\n" + |
Lines 9513-9524
Link Here
|
9513 |
|
9299 |
|
9514 |
}, |
9300 |
}, |
9515 |
"----------\n" + |
9301 |
"----------\n" + |
9516 |
"1. WARNING in p\\d\\One1.java (at line 7)\n" + |
9302 |
"1. WARNING in p\\d\\One1.java (at line 8)\n" + |
9517 |
" public void problem2() {\n" + |
|
|
9518 |
" ^^^^^^^^^^\n" + |
9519 |
"The method problem2() from the type new Object(){} is never used locally\n" + |
9520 |
"----------\n" + |
9521 |
"2. WARNING in p\\d\\One1.java (at line 8)\n" + |
9522 |
" if(dialog == 3) return;\n" + |
9303 |
" if(dialog == 3) return;\n" + |
9523 |
" ^^^^^^^\n" + |
9304 |
" ^^^^^^^\n" + |
9524 |
"Dead code\n" + |
9305 |
"Dead code\n" + |
Lines 9529-9606
Link Here
|
9529 |
" ^^^^^^^^\n" + |
9310 |
" ^^^^^^^^\n" + |
9530 |
"The serializable class JE_5_AWT does not declare a static final serialVersionUID field of type long\n" + |
9311 |
"The serializable class JE_5_AWT does not declare a static final serialVersionUID field of type long\n" + |
9531 |
"----------\n" + |
9312 |
"----------\n" + |
9532 |
"2. WARNING in p\\d\\JE_5_AWT.java (at line 21)\n" + |
9313 |
"2. ERROR in p\\d\\JE_5_AWT.java (at line 26)\n" + |
9533 |
" Object obj = JE_5_AWT.this; //<---------OK\n" + |
|
|
9534 |
" ^^^\n" + |
9535 |
"The field new Object(){}.obj is never read locally\n" + |
9536 |
"----------\n" + |
9537 |
"3. WARNING in p\\d\\JE_5_AWT.java (at line 26)\n" + |
9538 |
" Object obj = JE_5_AWT.this; //<---------KO \n" + |
9539 |
" ^^^\n" + |
9540 |
"The field new Object(){}.obj is never read locally\n" + |
9541 |
"----------\n" + |
9542 |
"4. ERROR in p\\d\\JE_5_AWT.java (at line 26)\n" + |
9543 |
" Object obj = JE_5_AWT.this; //<---------KO \n" + |
9314 |
" Object obj = JE_5_AWT.this; //<---------KO \n" + |
9544 |
" ^^^^^^^^^^^^^\n" + |
9315 |
" ^^^^^^^^^^^^^\n" + |
9545 |
"No enclosing instance of the type JE_5_AWT is accessible in scope\n" + |
9316 |
"No enclosing instance of the type JE_5_AWT is accessible in scope\n" + |
9546 |
"----------\n" + |
9317 |
"----------\n" + |
9547 |
"5. ERROR in p\\d\\JE_5_AWT.java (at line 32)\n" + |
9318 |
"3. ERROR in p\\d\\JE_5_AWT.java (at line 32)\n" + |
9548 |
" Object obj2 = d; // KO\n" + |
9319 |
" Object obj2 = d; // KO\n" + |
9549 |
" ^\n" + |
9320 |
" ^\n" + |
9550 |
"Cannot refer to an instance field d while explicitly invoking a constructor\n" + |
9321 |
"Cannot refer to an instance field d while explicitly invoking a constructor\n" + |
9551 |
"----------\n" + |
9322 |
"----------\n" + |
9552 |
"6. WARNING in p\\d\\JE_5_AWT.java (at line 37)\n" + |
9323 |
"4. ERROR in p\\d\\JE_5_AWT.java (at line 50)\n" + |
9553 |
" Object myself() {\n" + |
|
|
9554 |
" ^^^^^^^^\n" + |
9555 |
"The method myself() from the type new Object(){} is never used locally\n" + |
9556 |
"----------\n" + |
9557 |
"7. WARNING in p\\d\\JE_5_AWT.java (at line 43)\n" + |
9558 |
" class Local {\n" + |
9559 |
" ^^^^^\n" + |
9560 |
"The type Local is never used locally\n" + |
9561 |
"----------\n" + |
9562 |
"8. WARNING in p\\d\\JE_5_AWT.java (at line 44)\n" + |
9563 |
" JE_5_AWT obj = JE_5_AWT.this;\n" + |
9564 |
" ^^^\n" + |
9565 |
"The field Local.obj is never read locally\n" + |
9566 |
"----------\n" + |
9567 |
"9. WARNING in p\\d\\JE_5_AWT.java (at line 49)\n" + |
9568 |
" Object outer() {\n" + |
9569 |
" ^^^^^^^\n" + |
9570 |
"The method outer() from the type new Object(){} is never used locally\n" + |
9571 |
"----------\n" + |
9572 |
"10. ERROR in p\\d\\JE_5_AWT.java (at line 50)\n" + |
9573 |
" return JE_5_AWT.this; //<---- KO\n" + |
9324 |
" return JE_5_AWT.this; //<---- KO\n" + |
9574 |
" ^^^^^^^^^^^^^\n" + |
9325 |
" ^^^^^^^^^^^^^\n" + |
9575 |
"No enclosing instance of the type JE_5_AWT is accessible in scope\n" + |
9326 |
"No enclosing instance of the type JE_5_AWT is accessible in scope\n" + |
9576 |
"----------\n" + |
9327 |
"----------\n" + |
9577 |
"11. WARNING in p\\d\\JE_5_AWT.java (at line 55)\n" + |
|
|
9578 |
" class Local extends Thread {\n" + |
9579 |
" ^^^^^\n" + |
9580 |
"The type Local is never used locally\n" + |
9581 |
"----------\n" + |
9328 |
"----------\n" + |
9582 |
"12. WARNING in p\\d\\JE_5_AWT.java (at line 56)\n" + |
9329 |
"1. WARNING in p\\d\\One.java (at line 14)\n" + |
9583 |
" Local() {\n" + |
|
|
9584 |
" ^^^^^^^\n" + |
9585 |
"The constructor Local() is never used locally\n" + |
9586 |
"----------\n" + |
9587 |
"----------\n" + |
9588 |
"1. WARNING in p\\d\\One.java (at line 13)\n" + |
9589 |
" public void problem2() {\n" + |
9590 |
" ^^^^^^^^^^\n" + |
9591 |
"The method problem2() from the type new Object(){} is never used locally\n" + |
9592 |
"----------\n" + |
9593 |
"2. WARNING in p\\d\\One.java (at line 14)\n" + |
9594 |
" if(dialog == 3) return;\n" + |
9330 |
" if(dialog == 3) return;\n" + |
9595 |
" ^^^^^^^\n" + |
9331 |
" ^^^^^^^\n" + |
9596 |
"Dead code\n" + |
9332 |
"Dead code\n" + |
9597 |
"----------\n" + |
9333 |
"----------\n" + |
9598 |
"3. ERROR in p\\d\\One.java (at line 24)\n" + |
9334 |
"2. ERROR in p\\d\\One.java (at line 24)\n" + |
9599 |
" fireTableCellUpdated();\n" + |
9335 |
" fireTableCellUpdated();\n" + |
9600 |
" ^^^^^^^^^^^^^^^^^^^^\n" + |
9336 |
" ^^^^^^^^^^^^^^^^^^^^\n" + |
9601 |
"Cannot refer to an instance method while explicitly invoking a constructor\n" + |
9337 |
"Cannot refer to an instance method while explicitly invoking a constructor\n" + |
9602 |
"----------\n" + |
9338 |
"----------\n" + |
9603 |
"4. WARNING in p\\d\\One.java (at line 40)\n" + |
9339 |
"3. WARNING in p\\d\\One.java (at line 40)\n" + |
9604 |
" if (m == null) return;\n" + |
9340 |
" if (m == null) return;\n" + |
9605 |
" ^^^^^^^\n" + |
9341 |
" ^^^^^^^\n" + |
9606 |
"Dead code\n" + |
9342 |
"Dead code\n" + |
Lines 10339-10349
Link Here
|
10339 |
" super.init(); \n" + |
10075 |
" super.init(); \n" + |
10340 |
" ^^^^^^^^^^^^\n" + |
10076 |
" ^^^^^^^^^^^^\n" + |
10341 |
"Cannot directly invoke the abstract method init() for the type I\n" + |
10077 |
"Cannot directly invoke the abstract method init() for the type I\n" + |
10342 |
"----------\n" + |
|
|
10343 |
"2. WARNING in p1\\X.java (at line 10)\n" + |
10344 |
" private void init(){} \n" + |
10345 |
" ^^^^^^\n" + |
10346 |
"The method init() from the type AbstractZ is never used locally\n" + |
10347 |
"----------\n" |
10078 |
"----------\n" |
10348 |
); |
10079 |
); |
10349 |
} |
10080 |
} |
Lines 10565-10601
Link Here
|
10565 |
"} \n" |
10296 |
"} \n" |
10566 |
}, |
10297 |
}, |
10567 |
"----------\n" + |
10298 |
"----------\n" + |
10568 |
"1. WARNING in p1\\X.java (at line 5)\n" + |
10299 |
"1. WARNING in p1\\X.java (at line 8)\n" + |
10569 |
" class Local extends C { \n" + |
|
|
10570 |
" ^^^^^\n" + |
10571 |
"The type Local is never used locally\n" + |
10572 |
"----------\n" + |
10573 |
"2. WARNING in p1\\X.java (at line 8)\n" + |
10574 |
" public final int CST2 = 12; \n" + |
10300 |
" public final int CST2 = 12; \n" + |
10575 |
" ^^^^\n" + |
10301 |
" ^^^^\n" + |
10576 |
"The field Local.CST2 is hiding a field from type C\n" + |
10302 |
"The field Local.CST2 is hiding a field from type C\n" + |
10577 |
"----------\n" + |
10303 |
"----------\n" + |
10578 |
"3. WARNING in p1\\X.java (at line 8)\n" + |
10304 |
"2. ERROR in p1\\X.java (at line 11)\n" + |
10579 |
" public final int CST2 = 12; \n" + |
|
|
10580 |
" ^^^^\n" + |
10581 |
"The field Local.CST2 is never read locally\n" + |
10582 |
"----------\n" + |
10583 |
"4. WARNING in p1\\X.java (at line 9)\n" + |
10584 |
" void foo(int i){ \n" + |
10585 |
" ^^^^^^^^^^\n" + |
10586 |
"The method foo(int) from the type Local is never used locally\n" + |
10587 |
"----------\n" + |
10588 |
"5. ERROR in p1\\X.java (at line 11)\n" + |
10589 |
" case this.CST : \n" + |
10305 |
" case this.CST : \n" + |
10590 |
" ^^^^^^^^\n" + |
10306 |
" ^^^^^^^^\n" + |
10591 |
"case expressions must be constant expressions\n" + |
10307 |
"case expressions must be constant expressions\n" + |
10592 |
"----------\n" + |
10308 |
"----------\n" + |
10593 |
"6. ERROR in p1\\X.java (at line 15)\n" + |
10309 |
"3. ERROR in p1\\X.java (at line 15)\n" + |
10594 |
" case super.CST2 : \n" + |
10310 |
" case super.CST2 : \n" + |
10595 |
" ^^^^^^^^^^\n" + |
10311 |
" ^^^^^^^^^^\n" + |
10596 |
"case expressions must be constant expressions\n" + |
10312 |
"case expressions must be constant expressions\n" + |
10597 |
"----------\n" + |
10313 |
"----------\n" + |
10598 |
"7. ERROR in p1\\X.java (at line 17)\n" + |
10314 |
"4. ERROR in p1\\X.java (at line 17)\n" + |
10599 |
" case X.this.CST3 : \n" + |
10315 |
" case X.this.CST3 : \n" + |
10600 |
" ^^^^^^^^^^^\n" + |
10316 |
" ^^^^^^^^^^^\n" + |
10601 |
"case expressions must be constant expressions\n" + |
10317 |
"case expressions must be constant expressions\n" + |
Lines 11685-11696
Link Here
|
11685 |
}, |
11401 |
}, |
11686 |
null, customOptions, |
11402 |
null, customOptions, |
11687 |
"----------\n" + |
11403 |
"----------\n" + |
11688 |
"1. WARNING in Test.java (at line 3)\n" + |
11404 |
"1. WARNING in Test.java (at line 12)\n" + |
11689 |
" private void doTest() { \n" + |
|
|
11690 |
" ^^^^^^^^\n" + |
11691 |
"The method doTest() from the type Test is never used locally\n" + |
11692 |
"----------\n" + |
11693 |
"2. WARNING in Test.java (at line 12)\n" + |
11694 |
" int i = 0; \n" + |
11405 |
" int i = 0; \n" + |
11695 |
" ^\n" + |
11406 |
" ^\n" + |
11696 |
"The local variable i is never read\n" + |
11407 |
"The local variable i is never read\n" + |
Lines 12271-12287
Link Here
|
12271 |
"} \n", |
11982 |
"} \n", |
12272 |
}, |
11983 |
}, |
12273 |
"----------\n" + |
11984 |
"----------\n" + |
12274 |
"1. WARNING in TestEclipseBug.java (at line 2)\n" + |
11985 |
"1. ERROR in TestEclipseBug.java (at line 12)\n" + |
12275 |
" private Object root; \n" + |
|
|
12276 |
" ^^^^\n" + |
12277 |
"The field TestEclipseBug.root is never read locally\n" + |
12278 |
"----------\n" + |
12279 |
"2. WARNING in TestEclipseBug.java (at line 3)\n" + |
12280 |
" private Number count; \n" + |
12281 |
" ^^^^^\n" + |
12282 |
"The field TestEclipseBug.count is never read locally\n" + |
12283 |
"----------\n" + |
12284 |
"3. ERROR in TestEclipseBug.java (at line 12)\n" + |
12285 |
" this(objEntityName); // recursive constructor call \n" + |
11986 |
" this(objEntityName); // recursive constructor call \n" + |
12286 |
" ^^^^^^^^^^^^^^^^^^^^\n" + |
11987 |
" ^^^^^^^^^^^^^^^^^^^^\n" + |
12287 |
"Recursive constructor invocation TestEclipseBug(String)\n" + |
11988 |
"Recursive constructor invocation TestEclipseBug(String)\n" + |
Lines 12307-12323
Link Here
|
12307 |
"} \n", |
12008 |
"} \n", |
12308 |
}, |
12009 |
}, |
12309 |
"----------\n" + |
12010 |
"----------\n" + |
12310 |
"1. WARNING in p\\X.java (at line 3)\n" + |
|
|
12311 |
" private class Y { \n" + |
12312 |
" ^\n" + |
12313 |
"The type X.Y is never used locally\n" + |
12314 |
"----------\n" + |
12315 |
"2. WARNING in p\\X.java (at line 4)\n" + |
12316 |
" public class Z { \n" + |
12317 |
" ^\n" + |
12318 |
"The type X.Y.Z is never used locally\n" + |
12319 |
"----------\n" + |
12320 |
"----------\n" + |
12321 |
"1. ERROR in q\\Y.java (at line 2)\n" + |
12011 |
"1. ERROR in q\\Y.java (at line 2)\n" + |
12322 |
" import p.X.Y.Z; \n" + |
12012 |
" import p.X.Y.Z; \n" + |
12323 |
" ^^^^^\n" + |
12013 |
" ^^^^^\n" + |
Lines 12422-12433
Link Here
|
12422 |
" } \n"+ |
12112 |
" } \n"+ |
12423 |
"} \n" |
12113 |
"} \n" |
12424 |
}, |
12114 |
}, |
12425 |
"----------\n" + |
12115 |
"", |
12426 |
"1. WARNING in X.java (at line 2)\n" + |
|
|
12427 |
" private int foo() { \n" + |
12428 |
" ^^^^^\n" + |
12429 |
"The method foo() from the type X is never used locally\n" + |
12430 |
"----------\n", |
12431 |
null, null, JavacTestOptions.Excuse.EclipseHasSomeMoreWarnings); |
12116 |
null, null, JavacTestOptions.Excuse.EclipseHasSomeMoreWarnings); |
12432 |
} |
12117 |
} |
12433 |
// no private unused if syntax error |
12118 |
// no private unused if syntax error |
Lines 12473-12484
Link Here
|
12473 |
"} \n", |
12158 |
"} \n", |
12474 |
}, |
12159 |
}, |
12475 |
"----------\n" + |
12160 |
"----------\n" + |
12476 |
"1. WARNING in X.java (at line 2)\n" + |
|
|
12477 |
" private int foo() { \n" + |
12478 |
" ^^^^^\n" + |
12479 |
"The method foo() from the type X is never used locally\n" + |
12480 |
"----------\n" + |
12481 |
"----------\n" + |
12482 |
"1. ERROR in Y.java (at line 1)\n" + |
12161 |
"1. ERROR in Y.java (at line 1)\n" + |
12483 |
" public class Y extends X { \n" + |
12162 |
" public class Y extends X { \n" + |
12484 |
" ^\n" + |
12163 |
" ^\n" + |
Lines 12971-12987
Link Here
|
12971 |
"} \n", |
12650 |
"} \n", |
12972 |
}, |
12651 |
}, |
12973 |
"----------\n" + |
12652 |
"----------\n" + |
12974 |
"1. WARNING in X.java (at line 2)\n" + |
12653 |
"1. WARNING in X.java (at line 6)\n" + |
12975 |
" private void foo(int i) { \n" + |
|
|
12976 |
" ^^^^^^^^^^\n" + |
12977 |
"The method foo(int) from the type X is never used locally\n" + |
12978 |
"----------\n" + |
12979 |
"2. WARNING in X.java (at line 5)\n" + |
12980 |
" void bar() { \n" + |
12981 |
" ^^^^^\n" + |
12982 |
"The method bar() from the type new Object(){} is never used locally\n" + |
12983 |
"----------\n" + |
12984 |
"3. WARNING in X.java (at line 6)\n" + |
12985 |
" foo(2); \n" + |
12654 |
" foo(2); \n" + |
12986 |
" ^^^^^^\n" + |
12655 |
" ^^^^^^\n" + |
12987 |
"Access to enclosing method foo(int) from the type X is emulated by a synthetic accessor method\n" + |
12656 |
"Access to enclosing method foo(int) from the type X is emulated by a synthetic accessor method\n" + |
Lines 13010-13026
Link Here
|
13010 |
"} \n", |
12679 |
"} \n", |
13011 |
}, |
12680 |
}, |
13012 |
"----------\n" + |
12681 |
"----------\n" + |
13013 |
"1. WARNING in X.java (at line 2)\n" + |
12682 |
"1. WARNING in X.java (at line 7)\n" + |
13014 |
" private class Member { \n" + |
|
|
13015 |
" ^^^^^^\n" + |
13016 |
"The type X.Member is never used locally\n" + |
13017 |
"----------\n" + |
13018 |
"2. WARNING in X.java (at line 3)\n" + |
13019 |
" private Member foo(int i) { \n" + |
13020 |
" ^^^^^^^^^^\n" + |
13021 |
"The method foo(int) from the type X.Member is never used locally\n" + |
13022 |
"----------\n" + |
13023 |
"3. WARNING in X.java (at line 7)\n" + |
13024 |
" return foo(2); \n" + |
12683 |
" return foo(2); \n" + |
13025 |
" ^^^^^^\n" + |
12684 |
" ^^^^^^\n" + |
13026 |
"Access to enclosing method foo(int) from the type X.Member is emulated by a synthetic accessor method\n" + |
12685 |
"Access to enclosing method foo(int) from the type X.Member is emulated by a synthetic accessor method\n" + |
Lines 13046-13062
Link Here
|
13046 |
"} \n", |
12705 |
"} \n", |
13047 |
}, |
12706 |
}, |
13048 |
"----------\n" + |
12707 |
"----------\n" + |
13049 |
"1. WARNING in X.java (at line 2)\n" + |
12708 |
"1. WARNING in X.java (at line 5)\n" + |
13050 |
" private int field = \n" + |
|
|
13051 |
" ^^^^^\n" + |
13052 |
"The field X.field is never read locally\n" + |
13053 |
"----------\n" + |
13054 |
"2. WARNING in X.java (at line 5)\n" + |
13055 |
" field = 0; \n" + |
12709 |
" field = 0; \n" + |
13056 |
" ^^^^^\n" + |
12710 |
" ^^^^^\n" + |
13057 |
"Write access to enclosing field X.field is emulated by a synthetic accessor method\n" + |
12711 |
"Write access to enclosing field X.field is emulated by a synthetic accessor method\n" + |
13058 |
"----------\n" + |
12712 |
"----------\n" + |
13059 |
"3. WARNING in X.java (at line 6)\n" + |
12713 |
"2. WARNING in X.java (at line 6)\n" + |
13060 |
" return field; \n" + |
12714 |
" return field; \n" + |
13061 |
" ^^^^^\n" + |
12715 |
" ^^^^^\n" + |
13062 |
"Read access to enclosing field X.field is emulated by a synthetic accessor method\n" + |
12716 |
"Read access to enclosing field X.field is emulated by a synthetic accessor method\n" + |
Lines 13366-13377
Link Here
|
13366 |
}, |
13020 |
}, |
13367 |
null, customOptions, |
13021 |
null, customOptions, |
13368 |
"----------\n" + |
13022 |
"----------\n" + |
13369 |
"1. WARNING in X.java (at line 2)\n" + |
13023 |
"1. ERROR in X.java (at line 3)\n" + |
13370 |
" private int x = 0;\n" + |
|
|
13371 |
" ^\n" + |
13372 |
"The field X.x is never read locally\n" + |
13373 |
"----------\n" + |
13374 |
"2. ERROR in X.java (at line 3)\n" + |
13375 |
" int foo(int x) { \n" + |
13024 |
" int foo(int x) { \n" + |
13376 |
" ^\n" + |
13025 |
" ^\n" + |
13377 |
"The parameter x is hiding a field from type X\n" + |
13026 |
"The parameter x is hiding a field from type X\n" + |
Lines 13399-13420
Link Here
|
13399 |
"} \n", |
13048 |
"} \n", |
13400 |
}, |
13049 |
}, |
13401 |
"----------\n" + |
13050 |
"----------\n" + |
13402 |
"1. WARNING in X.java (at line 3)\n" + |
13051 |
"1. WARNING in X.java (at line 8)\n" + |
13403 |
" private X nextX; \n" + |
|
|
13404 |
" ^^^^^\n" + |
13405 |
"The field X.nextX is never read locally\n" + |
13406 |
"----------\n" + |
13407 |
"2. WARNING in X.java (at line 7)\n" + |
13408 |
" void bar() { \n" + |
13409 |
" ^^^^^\n" + |
13410 |
"The method bar() from the type new Object(){} is never used locally\n" + |
13411 |
"----------\n" + |
13412 |
"3. WARNING in X.java (at line 8)\n" + |
13413 |
" someX.nextX = null; \n" + |
13052 |
" someX.nextX = null; \n" + |
13414 |
" ^^^^^\n" + |
13053 |
" ^^^^^\n" + |
13415 |
"Read access to enclosing field X.someX is emulated by a synthetic accessor method\n" + |
13054 |
"Read access to enclosing field X.someX is emulated by a synthetic accessor method\n" + |
13416 |
"----------\n" + |
13055 |
"----------\n" + |
13417 |
"4. WARNING in X.java (at line 8)\n" + |
13056 |
"2. WARNING in X.java (at line 8)\n" + |
13418 |
" someX.nextX = null; \n" + |
13057 |
" someX.nextX = null; \n" + |
13419 |
" ^^^^^\n" + |
13058 |
" ^^^^^\n" + |
13420 |
"Write access to enclosing field X.nextX is emulated by a synthetic accessor method\n" + |
13059 |
"Write access to enclosing field X.nextX is emulated by a synthetic accessor method\n" + |
Lines 13874-13884
Link Here
|
13874 |
"----------\n" + |
13513 |
"----------\n" + |
13875 |
"11. WARNING in p\\X.java (at line 13)\n" + |
13514 |
"11. WARNING in p\\X.java (at line 13)\n" + |
13876 |
" class Object { }; \n" + |
13515 |
" class Object { }; \n" + |
13877 |
" ^^^^^^\n" + |
|
|
13878 |
"The type Object is never used locally\n" + |
13879 |
"----------\n" + |
13880 |
"12. WARNING in p\\X.java (at line 13)\n" + |
13881 |
" class Object { }; \n" + |
13882 |
" ^\n" + |
13516 |
" ^\n" + |
13883 |
"Unnecessary semicolon\n" + |
13517 |
"Unnecessary semicolon\n" + |
13884 |
"----------\n", |
13518 |
"----------\n", |
Lines 13935-13956
Link Here
|
13935 |
" ^\n" + |
13569 |
" ^\n" + |
13936 |
"Unnecessary semicolon\n" + |
13570 |
"Unnecessary semicolon\n" + |
13937 |
"----------\n" + |
13571 |
"----------\n" + |
13938 |
"6. WARNING in X.java (at line 9)\n" + |
13572 |
"6. WARNING in X.java (at line 10)\n" + |
13939 |
" class L {\n" + |
|
|
13940 |
" ^\n" + |
13941 |
"The type L is never used locally\n" + |
13942 |
"----------\n" + |
13943 |
"7. WARNING in X.java (at line 10)\n" + |
13944 |
" };//6\n" + |
13573 |
" };//6\n" + |
13945 |
" ^\n" + |
13574 |
" ^\n" + |
13946 |
"Unnecessary semicolon\n" + |
13575 |
"Unnecessary semicolon\n" + |
13947 |
"----------\n" + |
13576 |
"----------\n" + |
13948 |
"8. WARNING in X.java (at line 11)\n" + |
13577 |
"7. WARNING in X.java (at line 11)\n" + |
13949 |
" };//7\n" + |
13578 |
" };//7\n" + |
13950 |
" ^\n" + |
13579 |
" ^\n" + |
13951 |
"Unnecessary semicolon\n" + |
13580 |
"Unnecessary semicolon\n" + |
13952 |
"----------\n" + |
13581 |
"----------\n" + |
13953 |
"9. WARNING in X.java (at line 12)\n" + |
13582 |
"8. WARNING in X.java (at line 12)\n" + |
13954 |
" };//8\n" + |
13583 |
" };//8\n" + |
13955 |
" ^\n" + |
13584 |
" ^\n" + |
13956 |
"Unnecessary semicolon\n" + |
13585 |
"Unnecessary semicolon\n" + |
Lines 15406-15416
Link Here
|
15406 |
"}\n" |
15035 |
"}\n" |
15407 |
}, |
15036 |
}, |
15408 |
null, customOptions, |
15037 |
null, customOptions, |
15409 |
"----------\n" + |
15038 |
"----------\n" + |
15410 |
"1. ERROR in X.java (at line 6)\n" + |
15039 |
"1. ERROR in X.java (at line 6)\n" + |
15411 |
" private final int unused = 0;\n" + |
15040 |
" private final int unused = 0;\n" + |
15412 |
" ^^^^^^\n" + |
15041 |
" ^^^^^^\n" + |
15413 |
"The field X.unused is never read locally\n" + |
15042 |
"The field X.unused is never read locally\n" + |
15414 |
"----------\n", |
15043 |
"----------\n", |
15415 |
JavacTestOptions.Excuse.EclipseWarningConfiguredAsError); |
15044 |
JavacTestOptions.Excuse.EclipseWarningConfiguredAsError); |
15416 |
} |
15045 |
} |
Lines 16385-16441
Link Here
|
16385 |
" }\n" + |
16014 |
" }\n" + |
16386 |
"}\n" |
16015 |
"}\n" |
16387 |
}, |
16016 |
}, |
16388 |
"----------\n" + |
16017 |
"", |
16389 |
"1. WARNING in X.java (at line 4)\n" + |
|
|
16390 |
" int unused1 = this.unused1 + 1;\n" + |
16391 |
" ^^^^^^^\n" + |
16392 |
"The field new Object(){}.unused1 is never read locally\n" + |
16393 |
"----------\n" + |
16394 |
"2. WARNING in X.java (at line 5)\n" + |
16395 |
" void foo1() {}\n" + |
16396 |
" ^^^^^^\n" + |
16397 |
"The method foo1() from the type new Object(){} is never used locally\n" + |
16398 |
"----------\n" + |
16399 |
"3. WARNING in X.java (at line 8)\n" + |
16400 |
" class Local {\n" + |
16401 |
" ^^^^^\n" + |
16402 |
"The type Local is never used locally\n" + |
16403 |
"----------\n" + |
16404 |
"4. WARNING in X.java (at line 9)\n" + |
16405 |
" class LMember implements Runnable {\n" + |
16406 |
" ^^^^^^^\n" + |
16407 |
"The type Local.LMember is never used locally\n" + |
16408 |
"----------\n" + |
16409 |
"5. WARNING in X.java (at line 10)\n" + |
16410 |
" LMember(int i) {}\n" + |
16411 |
" ^^^^^^^^^^^^^^\n" + |
16412 |
"The constructor Local.LMember(int) is never used locally\n" + |
16413 |
"----------\n" + |
16414 |
"6. WARNING in X.java (at line 11)\n" + |
16415 |
" int unused2;\n" + |
16416 |
" ^^^^^^^\n" + |
16417 |
"The field Local.LMember.unused2 is never read locally\n" + |
16418 |
"----------\n" + |
16419 |
"7. WARNING in X.java (at line 12)\n" + |
16420 |
" void foo2() {}\n" + |
16421 |
" ^^^^^^\n" + |
16422 |
"The method foo2() from the type Local.LMember is never used locally\n" + |
16423 |
"----------\n" + |
16424 |
"8. WARNING in X.java (at line 15)\n" + |
16425 |
" Local(int i) {}\n" + |
16426 |
" ^^^^^^^^^^^^\n" + |
16427 |
"The constructor Local(int) is never used locally\n" + |
16428 |
"----------\n" + |
16429 |
"9. WARNING in X.java (at line 16)\n" + |
16430 |
" int unused3;\n" + |
16431 |
" ^^^^^^^\n" + |
16432 |
"The field Local.unused3 is never read locally\n" + |
16433 |
"----------\n" + |
16434 |
"10. WARNING in X.java (at line 17)\n" + |
16435 |
" void foo3() {}\n" + |
16436 |
" ^^^^^^\n" + |
16437 |
"The method foo3() from the type Local is never used locally\n" + |
16438 |
"----------\n", |
16439 |
null, null, JavacTestOptions.Excuse.EclipseHasSomeMoreWarnings); |
16018 |
null, null, JavacTestOptions.Excuse.EclipseHasSomeMoreWarnings); |
16440 |
} |
16019 |
} |
16441 |
public void test441() { |
16020 |
public void test441() { |
Lines 16492-16536
Link Here
|
16492 |
"} \n" |
16071 |
"} \n" |
16493 |
}, |
16072 |
}, |
16494 |
"----------\n" + |
16073 |
"----------\n" + |
16495 |
"1. WARNING in X.java (at line 2)\n" + |
16074 |
"1. WARNING in X.java (at line 4)\n" + |
16496 |
" private class M { \n" + |
|
|
16497 |
" ^\n" + |
16498 |
"The type X.M is never used locally\n" + |
16499 |
"----------\n" + |
16500 |
"2. WARNING in X.java (at line 3)\n" + |
16501 |
" private class Member1 {} \n" + |
16502 |
" ^^^^^^^\n" + |
16503 |
"The type X.M.Member1 is never used locally\n" + |
16504 |
"----------\n" + |
16505 |
"3. WARNING in X.java (at line 4)\n" + |
16506 |
" private class Member2 extends M { \n" + |
16507 |
" ^^^^^^^\n" + |
16508 |
"The type X.M.Member2 is never used locally\n" + |
16509 |
"----------\n" + |
16510 |
"4. WARNING in X.java (at line 4)\n" + |
16511 |
" private class Member2 extends M { \n" + |
16075 |
" private class Member2 extends M { \n" + |
16512 |
" ^^^^^^^\n" + |
16076 |
" ^^^^^^^\n" + |
16513 |
"Access to enclosing constructor X.M() is emulated by a synthetic accessor method\n" + |
16077 |
"Access to enclosing constructor X.M() is emulated by a synthetic accessor method\n" + |
16514 |
"----------\n" + |
|
|
16515 |
"5. WARNING in X.java (at line 8)\n" + |
16516 |
" class Local1 {} \n" + |
16517 |
" ^^^^^^\n" + |
16518 |
"The type Local1 is never used locally\n" + |
16519 |
"----------\n" + |
16520 |
"6. WARNING in X.java (at line 9)\n" + |
16521 |
" class Local2 { \n" + |
16522 |
" ^^^^^^\n" + |
16523 |
"The type Local2 is never used locally\n" + |
16524 |
"----------\n" + |
16525 |
"7. WARNING in X.java (at line 11)\n" + |
16526 |
" class LMember2 extends Local2 { \n" + |
16527 |
" ^^^^^^^^\n" + |
16528 |
"The type Local2.LMember2 is never used locally\n" + |
16529 |
"----------\n" + |
16530 |
"8. WARNING in X.java (at line 13)\n" + |
16531 |
" LMember1 m1;\n" + |
16532 |
" ^^\n" + |
16533 |
"The field Local2.m1 is never read locally\n" + |
16534 |
"----------\n", |
16078 |
"----------\n", |
16535 |
null, null, JavacTestOptions.Excuse.EclipseHasSomeMoreWarnings); |
16079 |
null, null, JavacTestOptions.Excuse.EclipseHasSomeMoreWarnings); |
16536 |
|
16080 |
|
Lines 16562-16606
Link Here
|
16562 |
"} \n" |
16106 |
"} \n" |
16563 |
}, |
16107 |
}, |
16564 |
"----------\n" + |
16108 |
"----------\n" + |
16565 |
"1. WARNING in X.java (at line 2)\n" + |
16109 |
"1. WARNING in X.java (at line 4)\n" + |
16566 |
" private class M { \n" + |
|
|
16567 |
" ^\n" + |
16568 |
"The type X.M is never used locally\n" + |
16569 |
"----------\n" + |
16570 |
"2. WARNING in X.java (at line 3)\n" + |
16571 |
" private class Member1 {} \n" + |
16572 |
" ^^^^^^^\n" + |
16573 |
"The type X.M.Member1 is never used locally\n" + |
16574 |
"----------\n" + |
16575 |
"3. WARNING in X.java (at line 4)\n" + |
16576 |
" private class Member2 extends M { \n" + |
16110 |
" private class Member2 extends M { \n" + |
16577 |
" ^^^^^^^\n" + |
16111 |
" ^^^^^^^\n" + |
16578 |
"Access to enclosing constructor X.M() is emulated by a synthetic accessor method\n" + |
16112 |
"Access to enclosing constructor X.M() is emulated by a synthetic accessor method\n" + |
16579 |
"----------\n" + |
|
|
16580 |
"4. WARNING in X.java (at line 6)\n" + |
16581 |
" M.Member2 m2;\n" + |
16582 |
" ^^\n" + |
16583 |
"The field X.M.m2 is never read locally\n" + |
16584 |
"----------\n" + |
16585 |
"5. WARNING in X.java (at line 9)\n" + |
16586 |
" class Local1 {} \n" + |
16587 |
" ^^^^^^\n" + |
16588 |
"The type Local1 is never used locally\n" + |
16589 |
"----------\n" + |
16590 |
"6. WARNING in X.java (at line 10)\n" + |
16591 |
" class Local2 { \n" + |
16592 |
" ^^^^^^\n" + |
16593 |
"The type Local2 is never used locally\n" + |
16594 |
"----------\n" + |
16595 |
"7. WARNING in X.java (at line 11)\n" + |
16596 |
" class LMember1 {} \n" + |
16597 |
" ^^^^^^^^\n" + |
16598 |
"The type Local2.LMember1 is never used locally\n" + |
16599 |
"----------\n" + |
16600 |
"8. WARNING in X.java (at line 12)\n" + |
16601 |
" class LMember2 extends Local2 { \n" + |
16602 |
" ^^^^^^^^\n" + |
16603 |
"The type Local2.LMember2 is never used locally\n" + |
16604 |
"----------\n", |
16113 |
"----------\n", |
16605 |
null, null, JavacTestOptions.Excuse.EclipseHasSomeMoreWarnings); |
16114 |
null, null, JavacTestOptions.Excuse.EclipseHasSomeMoreWarnings); |
16606 |
|
16115 |
|
Lines 16637-16668
Link Here
|
16637 |
"} \n" |
16146 |
"} \n" |
16638 |
}, |
16147 |
}, |
16639 |
"----------\n" + |
16148 |
"----------\n" + |
16640 |
"1. WARNING in X.java (at line 2)\n" + |
16149 |
"1. ERROR in X.java (at line 4)\n" + |
16641 |
" private class M { \n" + |
|
|
16642 |
" ^\n" + |
16643 |
"The type X.M is never used locally\n" + |
16644 |
"----------\n" + |
16645 |
"2. ERROR in X.java (at line 4)\n" + |
16646 |
" static{} \n" + |
16150 |
" static{} \n" + |
16647 |
" ^\n" + |
16151 |
" ^\n" + |
16648 |
"Cannot define static initializer in inner type X.M.Member1\n" + |
16152 |
"Cannot define static initializer in inner type X.M.Member1\n" + |
16649 |
"----------\n" + |
16153 |
"----------\n" + |
16650 |
"3. ERROR in X.java (at line 7)\n" + |
16154 |
"2. ERROR in X.java (at line 7)\n" + |
16651 |
" static{} \n" + |
16155 |
" static{} \n" + |
16652 |
" ^\n" + |
16156 |
" ^\n" + |
16653 |
"Cannot define static initializer in inner type X.M.Member2\n" + |
16157 |
"Cannot define static initializer in inner type X.M.Member2\n" + |
16654 |
"----------\n" + |
16158 |
"----------\n" + |
16655 |
"4. ERROR in X.java (at line 12)\n" + |
16159 |
"3. ERROR in X.java (at line 12)\n" + |
16656 |
" static{} \n" + |
16160 |
" static{} \n" + |
16657 |
" ^\n" + |
16161 |
" ^\n" + |
16658 |
"Cannot define static initializer in inner type Local1\n" + |
16162 |
"Cannot define static initializer in inner type Local1\n" + |
16659 |
"----------\n" + |
16163 |
"----------\n" + |
16660 |
"5. ERROR in X.java (at line 16)\n" + |
16164 |
"4. ERROR in X.java (at line 16)\n" + |
16661 |
" static{} \n" + |
16165 |
" static{} \n" + |
16662 |
" ^\n" + |
16166 |
" ^\n" + |
16663 |
"Cannot define static initializer in inner type Local2.LMember1\n" + |
16167 |
"Cannot define static initializer in inner type Local2.LMember1\n" + |
16664 |
"----------\n" + |
16168 |
"----------\n" + |
16665 |
"6. ERROR in X.java (at line 19)\n" + |
16169 |
"5. ERROR in X.java (at line 19)\n" + |
16666 |
" static{} \n" + |
16170 |
" static{} \n" + |
16667 |
" ^\n" + |
16171 |
" ^\n" + |
16668 |
"Cannot define static initializer in inner type Local2.LMember2\n" + |
16172 |
"Cannot define static initializer in inner type Local2.LMember2\n" + |