Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 366ebedbbbbed180304c93c98d02b6dc3b09ba77 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2012. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Java Compile Errors/Warnings Preferences</title>
<link rel="stylesheet" href="../../../../book.css" charset="ISO-8859-1" type="text/css">
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script>
</head>
<body>
<h1>Java Compile Errors/Warnings Preferences</h1>
<p>Indicate your preferences for the Errors/Warnings settings on the <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.ProblemSeveritiesPreferencePage)")'> <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Errors/Warnings preference page"> <b> Java &gt; Compiler &gt; Errors/Warnings </b></a> preference page.</p>
<h3>Code style</h3>
<table border="1" cellspacing="0" cellpadding="5" width="100%" summary="Code style section">
	<tr>
		<th>
		<p>Option</p>
		</th>
		<th>
		<p>Description</p>
		</th>
		<th>
		<p>Default</p>
		</th>
	</tr>
	<tr>
		<td valign="top">
		<p>Non-static access to a static member</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever a static field or method is accessed with an expression receiver. A reference to a static member should be qualified with a type name.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Indirect access to a static member</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever a static field or method is indirectly accessed. A static field of an interface should be qualified with the declaring type name.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Unqualified access to instance field</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters a field access which is not qualified (e.g. misses a 'this').</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Undocumented empty block</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters an empty block statement with no explaining comment.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Access to a non-accessible member of an enclosing type</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it emulates access to a non-accessible member of an enclosing type. Such accesses can have performance implications.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Method with a constructor name</p>
		</td>
		<td valign="top">
		<p>Naming a method with a constructor name is generally considered poor style programming. When this option is enabled, the compiler will signal such scenario either as an error or a warning.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Parameter assignment</p>
		</td>
		<td valign="top">
		<p>Assigning a value to a parameter is generally considered poor style programming. When this option is enabled, the compiler will signal such scenario either as an error or a warning.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Non-externalized strings</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning for non externalized String literal (i.e. non tagged with //$NON-NLS-&lt;n&gt;$) or for non externalized String tags which do not belong to a String.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Method can be static</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning for methods which are private or final and which refer only to static members.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Method can potentially be static</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning for methods which are not private or final and which refer only to static members. Note that methods can be overridden in a subclass, so if you make a "potentially static" method static, this may break existing clients.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Resource not managed via try-with-resource (1.7 or higher)</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning if a local variable holds a value of type 'java.lang.AutoCloseable', and if the method
	     'close()' is explicitly invoked on that resource, but the resource is not managed by a try-with-resources block.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
</table>

<h3>Potential programming problems</h3>

<table border="1" cellspacing="0" cellpadding="5" width="100%" summary="Potential programming problems section">
	<tr>
		<td valign="top">
		<p>Serializable class without serialVersionUID</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever a type implementing 'java.io.Serializable' does not contain a serialVersionUID field.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Assignment has no effect (e.g. 'x = x')</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever an assignment has no effect (e.g. 'x = x').</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Possible accidental boolean assignment (e.g. 'if (a = b)')</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters a possible accidental boolean assignment (e.g. 'if (a = b)').</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>'finally' does not complete normally</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever a 'finally' statement does not complete normally (e.g. contains a return statement).</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Empty statement</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters an empty statement (e.g. a superfluous semicolon).</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Using a char array in string concatenation</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever a char[] expression is used in String concatenations,</p>
		<code>"hello" + new char[]{'w','o','r','l','d'}</code></td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Hidden catch block</p>
		</td>
		<td valign="top">
		<p>Locally to a try statement, some catch blocks may hide others , e.g.</p>
		<code>try { throw new java.io.CharConversionException();</code><br>
		<code>} catch (java.io.CharConversionException e) {</code><br>
		<code>} catch (java.io.IOException e) {}</code><br>
		<br>
		<p>When enabled, the compiler will issue an error or a warning for hidden catch blocks corresponding to checked exceptions.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Inexact type match for vararg arguments</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters an inexact type match for vararg arguments.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Boxing and unboxing conversions</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters a boxing or unboxing conversion. Autoboxing may affects performance negatively.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Incomplete 'switch' cases on enum</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters a switch statement which does not contain case statements
		for every enum constant of the referenced enum nor a default case. A missing default case is reported even when all enum constants are covered
		by corresponding case labels; this warning is recommended by the Java Language Specification for the sake of binary compatibility.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>'switch' case fall-through</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning when a case may be entered by falling through a preceding, non empty case.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Comparing identical</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning if a comparison is involving identical operands (e.g 'x == x').</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Missing synchronized modifier on inherited method</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning when it encounters an inherited method which is missing the synchronized modifier.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Class overrides 'equals()' but not 'hashCode()'</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning when it encounters a class which overrides 'equals()' but not 'hashCode()'.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Dead code</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning when it encounters dead code (e.g 'if (false)' ).</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Unused object allocation</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning when it encounters an allocated object which is not used, e.g.</p>
		<code>if (name == null)</code><br>
		<code>&nbsp;&nbsp;&nbsp;new IllegalArgumentException();</code><br>
		<br>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Resource leak</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning if a local variable holds a value of type 'java.lang.AutoCloseable' (compliance &gt;= 1.7) 
	 		or a value of type 'java.io.Closeable' (compliance &lt;= 1.6) and if
	 		flow analysis shows that the method 'close()' is not invoked locally on that value.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Potential resource leak</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning if a local variable holds a value of type 'java.lang.AutoCloseable' (compliance &gt;= 1.7) 
	 		or a value of type 'java.io.Closeable' (compliance &lt;= 1.6) and if 
	 		flow analysis shows that the method 'close()' is not invoked locally on that value for all execution paths.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
</table>

<h3>Name shadowing and conflicts</h3>

<table border="1" cellspacing="0" cellpadding="5" width="100%" summary="Name shadowing and conflicts section">
	<tr>
		<td valign="top">
		<p>Field declaration hides another field or variable</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning if a field declaration hides another inherited field.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Local variable declaration hides another field or variable</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning if a local variable declaration hides another field or variable.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top" style="padding-left: 2em;">
		<p>Include constructor or setter method parameters</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler additionally will issue an error or a warning if a constructor or setter method parameter hides another field or variable.</p>
		</td>
		<td valign="top">
		<p>Off</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Type parameter hides another type</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning if i.e. a type parameter of an inner class hides an outer type.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Method does not override package visible method</p>
		</td>
		<td valign="top">
		<p>A package default method is not visible in a different package, and thus cannot be overridden. When this option is enabled, the compiler will signal such scenario either as an error or a warning.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Interface method conflicts with protected 'Object' method</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever an interface defines a method incompatible with a non-inherited Object method. Until this conflict is resolved, such an interface cannot be implemented, e.g.</p>
		<code>interface I {</code><br>
		<code>&nbsp;&nbsp;&nbsp;int clone();</code><br>
		<code>}</code><br>
		<br>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
</table>

<h3>Deprecated and restricted API</h3>

<table border="1" cellspacing="0" cellpadding="5" width="100%" summary="Deprecated and restricted API section">
	<tr>
		<td valign="top">
		<p>Deprecated API</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will signal use of deprecated API either as an error or a warning.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top" style="padding-left: 2em;">
		<p>Signal use of deprecated API inside deprecated code</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will signal use of deprecated API inside deprecated code. The severity of the problem is controlled with option "Deprecated API".</p>
		</td>
		<td valign="top">
		<p>Off</p>
		</td>
	</tr>
	<tr>
		<td valign="top" style="padding-left: 2em;">
		<p>Signal overriding or implementing deprecated method</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will signal overriding or implementing a deprecated method The severity of the problem is controlled with option "Deprecated API".</p>
		</td>
		<td valign="top">
		<p>Off</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Forbidden reference (access rules)</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will signal a forbidden reference specified in the access rules.</p>
		</td>
		<td valign="top">
		<p>Error</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Discouraged reference (access rules)</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will signal a discouraged reference specified in the access rules.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
</table>

<h3>Unnecessary code</h3>

<table border="1" cellspacing="0" cellpadding="5" width="100%" summary="Unnecessary code section">
	<tr>
		<td valign="top">
		<p>Value of local variable is not used</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever a local variable is declared but its value never used within its scope.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Value of parameter is not used</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever a parameter is declared but its value never used within its scope.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top" style="padding-left: 2em;">
		<p>Ignore in overriding and implementing methods</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will not issue an error or a warning whenever a parameter is declared but never used within its scope in a method that overrides or implements another method.</p>
		</td>
		<td valign="top">
		<p>On</p>
		</td>
	</tr>
	<tr>
		<td valign="top" style="padding-left: 2em;">
		<p>Ignore parameters documented with '@param' tag</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will not issue an error or a warning whenever an unread parameter is documented with an '@param' tag.</p>
		</td>
		<td valign="top">
		<p>On</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Unused import</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning for unused import reference.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Unused private members</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever a private member is declared but never used within the same unit.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Unnecessary 'else' statement</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters an unnecessary else statement (e.g. if (condition) return; else doSomething();).</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Unnecessary cast or 'instanceof' operation</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters an unnecessary cast or 'instanceof' operation (e.g. if (object instanceof Object) return;).</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Unnecessary declaration of thrown exception</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters an unnecessary declaration of a thrown exception.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>

	<tr>
		<td valign="top" style="padding-left: 2em;">
		<p>Ignore in overriding and implementing methods</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will not issue an error or a warning whenever it encounters an unnecessary declaration of a thrown exception in a method that overrides or implements another method.</p>
		</td>
		<td valign="top">
		<p>On</p>
		</td>
	</tr>
	<tr>
		<td valign="top" style="padding-left: 2em;">
		<p>Ignore exceptions documented with '@throws' or '@exception' tags</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will not issue an error or a warning whenever an unnecessary declaration of a thrown exception is documented with an '@throws' or '@exception' tag.</p>
		</td>
		<td valign="top">
		<p>On</p>
		</td>
	</tr>
	<tr>
		<td valign="top" style="padding-left: 2em;">
		<p>Ignore 'Exception' and 'Throwable'</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will not issue an error or a warning whenever it encounters an unnecessary declaration of 'Exception' and 'Throwable' exception</p>
		</td>
		<td valign="top">
		<p>On</p>
		</td>
	</tr>	
	<tr>
		<td valign="top">
		<p>Unused 'break' or 'continue' label</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters an unused 'break' or 'continue' label.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Redundant super interface</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters a type which
		   explicitly implements an interface that is already implemented by any of its supertypes.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
</table>

<h3>Generic types</h3>

<table border="1" cellspacing="0" cellpadding="5" width="100%" summary="Generic types section">
	<tr>
		<td valign="top">
		<p>Unchecked generic type operation</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters an unchecked generic type operation.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Usage of a raw type</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters a usage of a raw type (i.e. List instead of List&lt;String&gt;).</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Generic type parameter declared with a final type bound</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters a type bound involving a final type.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Ignore unavoidable generic type problems</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning even when it detects a generic type problem
that could not have been avoided by the programmer. As an example, a type may be forced to use raw types
in its method signatures and return types because the methods it overrides from a super type are declared to
use raw types in the first place.</p>
		</td>
		<td valign="top">
		<p>Off</p>
		</td>
	</tr>
</table>

<h3>Annotations</h3>

<table border="1" cellspacing="0" cellpadding="5" width="100%" summary="Annotations section">
	<tr>
		<td valign="top">
		<p>Missing '@Override' annotation</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters a method overriding another implemented method, and the '@Override' annotation is missing.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top" style="padding-left: 2em;">
		<p>Include implementations of interface methods (1.6 or higher)</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will also issue an error or a warning whenever it encounters a method overriding or implementing
		a method declared in an interface, and the '@Override' annotation is missing.<br>
		Note that '@Override' is only allowed on such methods if the compiler compliance level is 1.6 or higher, so this error or
		warning will never appear in 1.5 code.</p>
		</td>
		<td valign="top">
		<p>On</p>
		</td>
	</tr>	
	<tr>
		<td valign="top">
		<p>Missing '@Deprecated' annotation</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters a deprecated type without additional '@Deprecated' annotation.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Annotation is used as super interface</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters a type implementing an annotation. Although possible, this is considered bad practice.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Unhandled token in '@SuppressWarnings'</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters an unknown token in a '@SuppressWarnings' annotation.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Enable '@SuppressWarnings' annotations</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will process '@SuppressWarnings' annotations. When disabled, it will act as if all '@SuppressWarnings' annotations were removed.</p>
		</td>
		<td valign="top">
		<p>On</p>
		</td>
	</tr>
	<tr>
		<td valign="top" style="padding-left: 2em;">
		<p>Unused '@SuppressWarnings' token</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever it encounters an unused token in a '@SuppressWarnings' annotation.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top" style="padding-left: 2em;">
		<p>Suppress optional errors with '@SuppressWarnings'</p>
		</td>
		<td valign="top">
		<p>When enabled, the '@SuppressWarnings' annotation will also suppress optional compile errors, i.e. options set to "Error" here.
		Mandatory compile errors cannot be suppressed.</p>
		</td>
		<td valign="top">
		<p>Off</p>
		</td>
	</tr>
</table>

<h3 id="null_analysis">Null analysis</h3>

<table border="1" cellspacing="0" cellpadding="5" width="100%" summary="Annotations section">
	<tr>
		<td valign="top">
		<p>Null pointer access</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning when it encounters that a local variable which is certainly null is dereferenced. Note that the analysis can not find all null pointer accesses, see <strong>Potential null pointer access</strong>.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Potential null pointer access</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning when it encounters that a local variable which may be null is dereferenced. Note that the analysis is fairly conservative, it only considers cases where there is something suspicious.</p>
		<p>The quality of the analysis can be improved by using null-annotations, which can be enabled using the option 
		<b>Enable annotation-based null analysis</b>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Redundant null check</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning whenever a local variable which can not be null is tested for null.</p>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Include 'assert' in null analysis</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will honor 'assert' statement when doing the null analysis.</p>
		</td>
		<td valign="top">
		<p>Off</p>
		</td>
	</tr>
	<tr>
		<td valign="top">
		<p>Enable annotation-based null analysis</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will interpret annotations @Nullable, @NonNull, and @NonNullByDefault
		as specifying whether or not a given type includes the value 'null'.</p>
		<p>The effect of these analyses is further controlled by the following sub-options.</p>
		</td>
		<td valign="top">
		<p>Off</p>
		</td>
	</tr>
	<tr id="null_spec_violation">
		<td valign="top" style="padding-left: 2em;">
		<p>Violation of null specification</p>
		</td>
		<td valign="top">
		<p>Depending on this option, the compiler will issue either an error or a warning whenever one of the following situations is detected:</p> 
		<ol>
		<li>A method declared with a nonnull annotation returns a <em>nullable</em> expression.</li> 
		<li>A <em>nullable</em> expression is passed as an argument in a method call where the corresponding parameter of the called method is declared with a nonnull annotation.</li> 
		<li>A <em>nullable</em> expression is assigned to a local variable that is declared with a nonnull annotation.</li> 
		<li>A method that overrides an inherited method declared with a nonnull annotation tries to relax that contract by specifying a nullable annotation (prohibition of contravariant return).</li> 
		<li>A method that overrides an inherited method which has a nullable declaration for at least one of its parameters, tries to tighten that null contract by specifying a nonnull annotation for its corresponding parameter (prohibition of covariant parameters).</li>
		</ol>
		<p>In the above an expression is considered as <em>nullable</em> if
	 	either it is statically known to evaluate to the value <code>null</code>, or if it is
	 	declared with a nullable annotation.</p>
		</td>
		<td valign="top">
		<p>Error</p>
		</td>
	</tr>
	<tr>
		<td valign="top" style="padding-left: 2em;">
		<p>Conflict between null annotations and null inference</p>
		</td>
		<td valign="top">
		<p>Depending on this option, the compiler will issue either an error or a warning whenever one of the following situations is detected:</p>
		<ol>
		<li>A method declared with a nonnull annotation returns an expression that is statically known to evaluate to a null value on some flow.</li> 
		<li>An expression that is statically known to evaluate to a null value on some flow is passed as an argument in a method call where the corresponding parameter of the called method is declared with a nonnull annotation. </li> 
		<li>An expression that is statically known to evaluate to a null value on some flow is assigned to a local variable that is declared with a nonnull annotation.</li> 
		</ol> 
		</td>
		<td valign="top">
		<p>Error</p>
		</td>
	</tr>
	<tr>
		<td valign="top" style="padding-left: 2em;">
		<p>Unchecked conversion from non-annotated type to @NonNull type</p>
		</td>
		<td valign="top">
		<p>Depending on this option, the compiler will issue either an error or a warning whenever one of the following situations is detected:</p>
		<ol>
		<li>A method declared with a nonnull annotation returns an expression for which insufficient nullness information is available for statically proving that no flow will pass a null value at runtime. </li> 
		<li>An expression for which insufficient nullness information is available for statically proving that it will never evaluate to a null value at runtime is passed as an argument in a method call where 
		the corresponding parameter of the called method is declared with a nonnull annotation. </li> 
		<li>An expression for which insufficient nullness information is available for statically proving that it will never evaluate to a null value at runtime is assigned to a local variable that is declared 
		with a nonnull annotation. </li> 
		</ol> 
		<p>Unchecked conversion is usually a consequence of using other unannotated variables or methods.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top" style="padding-left: 2em;">
		<p>Redundnant null annotation</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning when a non-null annotation is applied although the same effect is already achieved by a default applicable at the current location. 
		Such a default may be set by enabling the option <b>Use non-null as workspace-wide (or project-wide) default</b> or by using the @NonNullByDefault annotation.</p>
		</td>
		<td valign="top">
		<p>Warning</p>
		</td>
	</tr>
	<tr>
		<td valign="top" style="padding-left: 2em;">
		<p>Missing '@NonNullByDefault' annotation on package</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will issue an error or a warning in the following cases:</p>
		<ol>
		<li>When a package does not contain a default nullness annotation, as a result of missing package-info.java 
	 	or missing default nullness annotation in package-info.java.</li>
	 	<li>When a type inside a default package does not contain a default nullness annotation.</li>
		</ol>
		</td>
		<td valign="top">
		<p>Ignore</p>
		</td>
	</tr>
	<tr id="null_annotation_names">
		<td valign="top" style="padding-left: 2em;">
		<p>Use default annotations for null specifications</p>
		</td>
		<td valign="top">
		<p>When enabled, the compiler will use the default set of annotations for null specifications. These annotations are included in the Eclipse SDK in the
		<b>org.eclipse.jdt.annotation</b> bundle.</p>
		<p>You can specify different annotation names to use in your projects, but be aware that the Eclipse compiler only supports the semantics
		specified in the default annotations:</p>
		<ul>
			<li><b>org.eclipse.jdt.annotation.Nullable</b>: A fully qualified name of a Java annotation type, which when applied to a type in a method signature or variable declaration, 
				will be interpreted as a specification that null is a legal value in that position.<br>
				Currently supported positions are: method parameters, method return type and local variables.
			</li>
			<li><b>org.eclipse.jdt.annotation.NonNull</b>: A fully qualified name of a Java annotation type, which when applied to a type in a method signature or variable declaration, 
				will be interpreted as a specification that null is <b>not</b> a legal value in that position.<br>
				Currently supported positions are: method parameters, method return type and local variables.
			</li>
			<li>
				<b>org.eclipse.jdt.annotation.NonNullByDefault</b>: A fully qualified name of a Java annotation type. When applied to an element without an annotation argument, 
				all unannotated types in method signatures within the annotated element will be treated as if they were specified with the non-null annotation.<br>
				On the contrary, when the annotation is applied with the constant 'false' as its argument, all corresponding defaults at outer scopes will be canceled for the annotated element.
			</li>
		</ul>
		</td>
		<td valign="top">
		<p>On</p>
		</td>
	</tr>
</table>

<p>When <strong>Treat above errors like fatal compile errors</strong> is enabled, all generated errors, fatal or configurable, lead to non-executable code.
If disabled, then your code can be executed as long as it has no fatal error (syntax error, type error, or any error according to the Java Language Specification).</p>

<p><img src="../../../../images/ngrelc.png" alt="Related concepts" border="0"></p>
<p><a href="../../../../../org.eclipse.platform.doc.user/concepts/cprbview.htm">Problems View</a><br>
<a href="../../../../concepts/concept-quickfix-assist.htm">Quick Fix</a><br>
<a href="../../../../concepts/concept-java-builder.htm">Java builder</a></p>
</body>
</html>

Back to the top