Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: doc/bugDescriptions.html

Issue 594833004: Roll FindBugs from 2.0.3 to 3.0.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/findbugs.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « doc/allBugDescriptions.html ('k') | doc/bugDescriptions_fr.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.or g/TR/html4/loose.dtd"> 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.or g/TR/html4/loose.dtd">
2 <html><head><title>FindBugs Bug Descriptions</title> 2 <html><head><title>FindBugs Bug Descriptions</title>
3 <link rel="stylesheet" type="text/css" href="findbugs.css"/> 3 <link rel="stylesheet" type="text/css" href="findbugs.css"/>
4 <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/> 4 <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
5 </head><body> 5 </head><body>
6 6
7 <table width="100%"><tr> 7 <table width="100%"><tr>
8 8
9 <td bgcolor="#b9b9fe" valign="top" align="left" width="20%"> 9 <td bgcolor="#b9b9fe" valign="top" align="left" width="20%">
10 <table width="100%" cellspacing="0" border="0"> 10 <table width="100%" cellspacing="0" border="0">
11 <tr><td><a class="sidebar" href="index.html"><img src="umdFindbugs.png" alt="Fin dBugs"></a></td></tr> 11 <tr><td><a class="sidebar" href="index.html"><img src="umdFindbugs.png" alt="Fin dBugs"></a></td></tr>
12 12
13 <tr><td>&nbsp;</td></tr> 13 <tr><td>&nbsp;</td></tr>
14 14
15 <tr><td><b>Docs and Info</b></td></tr> 15 <tr><td><b>Docs and Info</b></td></tr>
16 <tr><td><font size="-1"><a class="sidebar" href="findbugs2.html">FindBugs 2.0</a ></font></td></tr> 16 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="findbugs2.html">FindBugs 2.0</a></font></td></tr>
17 <tr><td><font size="-1"><a class="sidebar" href="demo.html">Demo and data</a></f ont></td></tr> 17 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="demo.html">Demo and data< /a></font></td></tr>
18 <tr><td><font size="-1"><a class="sidebar" href="users.html">Users and supporter s</a></font></td></tr> 18 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="users.html">Users and sup porters</a></font></td></tr>
19 <tr><td><font size="-1"><a class="sidebar" href="http://findbugs.blogspot.com/"> FindBugs blog</a></font></td></tr> 19 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="http://findbugs.blogspot. com/">FindBugs blog</a></font></td></tr>
20 <tr><td><font size="-1"><a class="sidebar" href="factSheet.html">Fact sheet</a>< /font></td></tr> 20 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="factSheet.html">Fact shee t</a></font></td></tr>
21 <tr><td><font size="-1"><a class="sidebar" href="manual/index.html">Manual</a></ font></td></tr> 21 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="manual/index.html">Manual </a></font></td></tr>
22 <tr><td><font size="-1"><a class="sidebar" href="ja/manual/index.html">Manual(ja /&#26085;&#26412;&#35486;)</a></font></td></tr> 22 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="ja/manual/index.html">Man ual(ja/&#26085;&#26412;&#35486;)</a></font></td></tr>
23 <tr><td><font size="-1"><a class="sidebar" href="FAQ.html">FAQ</a></font></td></ tr> 23 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="FAQ.html">FAQ</a></font>< /td></tr>
24 <tr><td><font size="-1"><a class="sidebar" href="bugDescriptions.html">Bug descr iptions</a></font></td></tr> 24 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="bugDescriptions.html">Bug descriptions</a></font></td></tr>
25 <tr><td><font size="-1"><a class="sidebar" href="mailingLists.html">Mailing list s</a></font></td></tr> 25 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="bugDescriptions_ja.html"> Bug descriptions(ja/&#26085;&#26412;&#35486;)</a></font></td></tr>
26 <tr><td><font size="-1"><a class="sidebar" href="publications.html">Documents an d Publications</a></font></td></tr> 26 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="bugDescriptions_fr.html"> Bug descriptions(fr)</a></font></td></tr>
27 <tr><td><font size="-1"><a class="sidebar" href="links.html">Links</a></font></t d></tr> 27 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="mailingLists.html">Mailin g lists</a></font></td></tr>
28 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="publications.html">Docume nts and Publications</a></font></td></tr>
29 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="links.html">Links</a></fo nt></td></tr>
28 30
29 <tr><td>&nbsp;</td></tr> 31 <tr><td>&nbsp;</td></tr>
30 32
31 <tr><td><a class="sidebar" href="downloads.html"><b>Downloads</b></a></td></tr> 33 <tr><td><a class="sidebar" href="downloads.html"><b>Downloads</b></a></td></tr>
32 34
33 <tr><td>&nbsp;</td></tr> 35 <tr><td>&nbsp;</td></tr>
34 36
35 <tr><td><a class="sidebar" href="http://www.cafeshops.com/findbugs"><b>FindBugs Swag</b></a></td></tr> 37 <tr><td><a class="sidebar" href="http://www.cafeshops.com/findbugs"><b>FindBugs Swag</b></a></td></tr>
36 38
37 <tr><td>&nbsp;</td></tr> 39 <tr><td>&nbsp;</td></tr>
38 40
39 <tr><td><b>Development</b></td></tr> 41 <tr><td><b>Development</b></td></tr>
40 <tr><td><font size="-1"><a class="sidebar" href="http://sourceforge.net/tracker/ ?group_id=96405">Open bugs</a></font></td></tr> 42 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="http://sourceforge.net/tr acker/?group_id=96405">Open bugs</a></font></td></tr>
41 <tr><td><font size="-1"><a class="sidebar" href="reportingBugs.html">Reporting b ugs</a></font></td></tr> 43 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="reportingBugs.html">Repor ting bugs</a></font></td></tr>
42 <tr><td><font size="-1"><a class="sidebar" href="contributing.html">Contributing </a></font></td></tr> 44 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="contributing.html">Contri buting</a></font></td></tr>
43 <tr><td><font size="-1"><a class="sidebar" href="team.html">Dev team</a></font>< /td></tr> 45 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="team.html">Dev team</a></ font></td></tr>
44 <tr><td><font size="-1"><a class="sidebar" href="api/index.html">API</a> <a clas s="sidebar" href="api/overview-summary.html">[no frames]</a></font></td></tr> 46 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="api/index.html">API</a> < a class="sidebar" href="api/overview-summary.html">[no frames]</a></font></td></ tr>
45 <tr><td><font size="-1"><a class="sidebar" href="Changes.html">Change log</a></f ont></td></tr> 47 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="Changes.html">Change log< /a></font></td></tr>
46 <tr><td><font size="-1"><a class="sidebar" href="http://sourceforge.net/projects /findbugs">SF project page</a></font></td></tr> 48 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="http://sourceforge.net/pr ojects/findbugs">SF project page</a></font></td></tr>
47 <tr><td><font size="-1"><a class="sidebar" href="http://code.google.com/p/findbu gs/source/browse/">Browse source</a></font></td></tr> 49 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="http://code.google.com/p/ findbugs/source/browse/">Browse source</a></font></td></tr>
48 <tr><td><font size="-1"><a class="sidebar" href="http://code.google.com/p/findbu gs/source/list">Latest code changes</a></font></td></tr> 50 <tr><td><font size="-1">&nbsp;<a class="sidebar" href="http://code.google.com/p/ findbugs/source/list">Latest code changes</a></font></td></tr>
49 </table> 51 </table>
50 </td> 52 </td>
51 <td align="left" valign="top"> 53 <td align="left" valign="top">
52 <h1>FindBugs Bug Descriptions</h1> 54 <h1>FindBugs Bug Descriptions</h1>
53 <p>This document lists the standard bug patterns reported by 55 <p>This document lists the standard bug patterns reported by
54 <a href="http://findbugs.sourceforge.net">FindBugs</a> version 2.0.3.</p> 56 <a href="http://findbugs.sourceforge.net">FindBugs</a> version 3.0.0.</p>
55 <h2>Summary</h2> 57 <h2>Summary</h2>
56 <table width="100%"> 58 <table width="100%">
57 <tr bgcolor="#b9b9fe"><th>Description</th><th>Category</th></tr> 59 <tr bgcolor="#b9b9fe"><th>Description</th><th>Category</th></tr>
58 <tr bgcolor="#eeeeee"><td><a href="#BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS ">BC: Equals method should not assume anything about the type of its argument</a ></td><td>Bad practice</td></tr> 60 <tr bgcolor="#eeeeee"><td><a href="#BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS ">BC: Equals method should not assume anything about the type of its argument</a ></td><td>Bad practice</td></tr>
59 <tr bgcolor="#ffffff"><td><a href="#BIT_SIGNED_CHECK">BIT: Check for sign of bit wise operation</a></td><td>Bad practice</td></tr> 61 <tr bgcolor="#ffffff"><td><a href="#BIT_SIGNED_CHECK">BIT: Check for sign of bit wise operation</a></td><td>Bad practice</td></tr>
60 <tr bgcolor="#eeeeee"><td><a href="#CN_IDIOM">CN: Class implements Cloneable but does not define or use clone method</a></td><td>Bad practice</td></tr> 62 <tr bgcolor="#eeeeee"><td><a href="#CN_IDIOM">CN: Class implements Cloneable but does not define or use clone method</a></td><td>Bad practice</td></tr>
61 <tr bgcolor="#ffffff"><td><a href="#CN_IDIOM_NO_SUPER_CALL">CN: clone method doe s not call super.clone()</a></td><td>Bad practice</td></tr> 63 <tr bgcolor="#ffffff"><td><a href="#CN_IDIOM_NO_SUPER_CALL">CN: clone method doe s not call super.clone()</a></td><td>Bad practice</td></tr>
62 <tr bgcolor="#eeeeee"><td><a href="#CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE">CN: C lass defines clone() but doesn't implement Cloneable</a></td><td>Bad practice</t d></tr> 64 <tr bgcolor="#eeeeee"><td><a href="#CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE">CN: C lass defines clone() but doesn't implement Cloneable</a></td><td>Bad practice</t d></tr>
63 <tr bgcolor="#ffffff"><td><a href="#CO_ABSTRACT_SELF">Co: Abstract class defines covariant compareTo() method</a></td><td>Bad practice</td></tr> 65 <tr bgcolor="#ffffff"><td><a href="#CNT_ROUGH_CONSTANT_VALUE">CNT: Rough value o f known constant found</a></td><td>Bad practice</td></tr>
64 <tr bgcolor="#eeeeee"><td><a href="#CO_SELF_NO_OBJECT">Co: Covariant compareTo() method defined</a></td><td>Bad practice</td></tr> 66 <tr bgcolor="#eeeeee"><td><a href="#CO_ABSTRACT_SELF">Co: Abstract class defines covariant compareTo() method</a></td><td>Bad practice</td></tr>
65 <tr bgcolor="#ffffff"><td><a href="#DE_MIGHT_DROP">DE: Method might drop excepti on</a></td><td>Bad practice</td></tr> 67 <tr bgcolor="#ffffff"><td><a href="#CO_SELF_NO_OBJECT">Co: Covariant compareTo() method defined</a></td><td>Bad practice</td></tr>
66 <tr bgcolor="#eeeeee"><td><a href="#DE_MIGHT_IGNORE">DE: Method might ignore exc eption</a></td><td>Bad practice</td></tr> 68 <tr bgcolor="#eeeeee"><td><a href="#DE_MIGHT_DROP">DE: Method might drop excepti on</a></td><td>Bad practice</td></tr>
67 <tr bgcolor="#ffffff"><td><a href="#DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS">DMI: Adding elements of an entry set may fail due to reuse of Entry objects</a></td> <td>Bad practice</td></tr> 69 <tr bgcolor="#ffffff"><td><a href="#DE_MIGHT_IGNORE">DE: Method might ignore exc eption</a></td><td>Bad practice</td></tr>
68 <tr bgcolor="#eeeeee"><td><a href="#DMI_RANDOM_USED_ONLY_ONCE">DMI: Random objec t created and used only once</a></td><td>Bad practice</td></tr> 70 <tr bgcolor="#eeeeee"><td><a href="#DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS">DMI: Adding elements of an entry set may fail due to reuse of Entry objects</a></td> <td>Bad practice</td></tr>
69 <tr bgcolor="#ffffff"><td><a href="#DMI_USING_REMOVEALL_TO_CLEAR_COLLECTION">DMI : Don't use removeAll to clear a collection</a></td><td>Bad practice</td></tr> 71 <tr bgcolor="#ffffff"><td><a href="#DMI_RANDOM_USED_ONLY_ONCE">DMI: Random objec t created and used only once</a></td><td>Bad practice</td></tr>
70 <tr bgcolor="#eeeeee"><td><a href="#DM_EXIT">Dm: Method invokes System.exit(...) </a></td><td>Bad practice</td></tr> 72 <tr bgcolor="#eeeeee"><td><a href="#DMI_USING_REMOVEALL_TO_CLEAR_COLLECTION">DMI : Don't use removeAll to clear a collection</a></td><td>Bad practice</td></tr>
71 <tr bgcolor="#ffffff"><td><a href="#DM_RUN_FINALIZERS_ON_EXIT">Dm: Method invoke s dangerous method runFinalizersOnExit</a></td><td>Bad practice</td></tr> 73 <tr bgcolor="#ffffff"><td><a href="#DM_EXIT">Dm: Method invokes System.exit(...) </a></td><td>Bad practice</td></tr>
72 <tr bgcolor="#eeeeee"><td><a href="#ES_COMPARING_PARAMETER_STRING_WITH_EQ">ES: C omparison of String parameter using == or !=</a></td><td>Bad practice</td></tr> 74 <tr bgcolor="#eeeeee"><td><a href="#DM_RUN_FINALIZERS_ON_EXIT">Dm: Method invoke s dangerous method runFinalizersOnExit</a></td><td>Bad practice</td></tr>
73 <tr bgcolor="#ffffff"><td><a href="#ES_COMPARING_STRINGS_WITH_EQ">ES: Comparison of String objects using == or !=</a></td><td>Bad practice</td></tr> 75 <tr bgcolor="#ffffff"><td><a href="#ES_COMPARING_PARAMETER_STRING_WITH_EQ">ES: C omparison of String parameter using == or !=</a></td><td>Bad practice</td></tr>
74 <tr bgcolor="#eeeeee"><td><a href="#EQ_ABSTRACT_SELF">Eq: Abstract class defines covariant equals() method</a></td><td>Bad practice</td></tr> 76 <tr bgcolor="#eeeeee"><td><a href="#ES_COMPARING_STRINGS_WITH_EQ">ES: Comparison of String objects using == or !=</a></td><td>Bad practice</td></tr>
75 <tr bgcolor="#ffffff"><td><a href="#EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THI S">Eq: Equals checks for incompatible operand</a></td><td>Bad practice</td></tr> 77 <tr bgcolor="#ffffff"><td><a href="#EQ_ABSTRACT_SELF">Eq: Abstract class defines covariant equals() method</a></td><td>Bad practice</td></tr>
76 <tr bgcolor="#eeeeee"><td><a href="#EQ_COMPARETO_USE_OBJECT_EQUALS">Eq: Class de fines compareTo(...) and uses Object.equals()</a></td><td>Bad practice</td></tr> 78 <tr bgcolor="#eeeeee"><td><a href="#EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THI S">Eq: Equals checks for incompatible operand</a></td><td>Bad practice</td></tr>
77 <tr bgcolor="#ffffff"><td><a href="#EQ_GETCLASS_AND_CLASS_CONSTANT">Eq: equals m ethod fails for subtypes</a></td><td>Bad practice</td></tr> 79 <tr bgcolor="#ffffff"><td><a href="#EQ_COMPARETO_USE_OBJECT_EQUALS">Eq: Class de fines compareTo(...) and uses Object.equals()</a></td><td>Bad practice</td></tr>
78 <tr bgcolor="#eeeeee"><td><a href="#EQ_SELF_NO_OBJECT">Eq: Covariant equals() me thod defined</a></td><td>Bad practice</td></tr> 80 <tr bgcolor="#eeeeee"><td><a href="#EQ_GETCLASS_AND_CLASS_CONSTANT">Eq: equals m ethod fails for subtypes</a></td><td>Bad practice</td></tr>
79 <tr bgcolor="#ffffff"><td><a href="#FI_EMPTY">FI: Empty finalizer should be dele ted</a></td><td>Bad practice</td></tr> 81 <tr bgcolor="#ffffff"><td><a href="#EQ_SELF_NO_OBJECT">Eq: Covariant equals() me thod defined</a></td><td>Bad practice</td></tr>
80 <tr bgcolor="#eeeeee"><td><a href="#FI_EXPLICIT_INVOCATION">FI: Explicit invocat ion of finalizer</a></td><td>Bad practice</td></tr> 82 <tr bgcolor="#eeeeee"><td><a href="#FI_EMPTY">FI: Empty finalizer should be dele ted</a></td><td>Bad practice</td></tr>
81 <tr bgcolor="#ffffff"><td><a href="#FI_FINALIZER_NULLS_FIELDS">FI: Finalizer nul ls fields</a></td><td>Bad practice</td></tr> 83 <tr bgcolor="#ffffff"><td><a href="#FI_EXPLICIT_INVOCATION">FI: Explicit invocat ion of finalizer</a></td><td>Bad practice</td></tr>
82 <tr bgcolor="#eeeeee"><td><a href="#FI_FINALIZER_ONLY_NULLS_FIELDS">FI: Finalize r only nulls fields</a></td><td>Bad practice</td></tr> 84 <tr bgcolor="#eeeeee"><td><a href="#FI_FINALIZER_NULLS_FIELDS">FI: Finalizer nul ls fields</a></td><td>Bad practice</td></tr>
83 <tr bgcolor="#ffffff"><td><a href="#FI_MISSING_SUPER_CALL">FI: Finalizer does no t call superclass finalizer</a></td><td>Bad practice</td></tr> 85 <tr bgcolor="#ffffff"><td><a href="#FI_FINALIZER_ONLY_NULLS_FIELDS">FI: Finalize r only nulls fields</a></td><td>Bad practice</td></tr>
84 <tr bgcolor="#eeeeee"><td><a href="#FI_NULLIFY_SUPER">FI: Finalizer nullifies su perclass finalizer</a></td><td>Bad practice</td></tr> 86 <tr bgcolor="#eeeeee"><td><a href="#FI_MISSING_SUPER_CALL">FI: Finalizer does no t call superclass finalizer</a></td><td>Bad practice</td></tr>
85 <tr bgcolor="#ffffff"><td><a href="#FI_USELESS">FI: Finalizer does nothing but c all superclass finalizer</a></td><td>Bad practice</td></tr> 87 <tr bgcolor="#ffffff"><td><a href="#FI_NULLIFY_SUPER">FI: Finalizer nullifies su perclass finalizer</a></td><td>Bad practice</td></tr>
86 <tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_USES_NEWLINE">FS: Format st ring should use %n rather than \n</a></td><td>Bad practice</td></tr> 88 <tr bgcolor="#eeeeee"><td><a href="#FI_USELESS">FI: Finalizer does nothing but c all superclass finalizer</a></td><td>Bad practice</td></tr>
87 <tr bgcolor="#ffffff"><td><a href="#GC_UNCHECKED_TYPE_IN_GENERIC_CALL">GC: Unche cked type in generic call</a></td><td>Bad practice</td></tr> 89 <tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_USES_NEWLINE">FS: Format st ring should use %n rather than \n</a></td><td>Bad practice</td></tr>
88 <tr bgcolor="#eeeeee"><td><a href="#HE_EQUALS_NO_HASHCODE">HE: Class defines equ als() but not hashCode()</a></td><td>Bad practice</td></tr> 90 <tr bgcolor="#eeeeee"><td><a href="#GC_UNCHECKED_TYPE_IN_GENERIC_CALL">GC: Unche cked type in generic call</a></td><td>Bad practice</td></tr>
89 <tr bgcolor="#ffffff"><td><a href="#HE_EQUALS_USE_HASHCODE">HE: Class defines eq uals() and uses Object.hashCode()</a></td><td>Bad practice</td></tr> 91 <tr bgcolor="#ffffff"><td><a href="#HE_EQUALS_NO_HASHCODE">HE: Class defines equ als() but not hashCode()</a></td><td>Bad practice</td></tr>
90 <tr bgcolor="#eeeeee"><td><a href="#HE_HASHCODE_NO_EQUALS">HE: Class defines has hCode() but not equals()</a></td><td>Bad practice</td></tr> 92 <tr bgcolor="#eeeeee"><td><a href="#HE_EQUALS_USE_HASHCODE">HE: Class defines eq uals() and uses Object.hashCode()</a></td><td>Bad practice</td></tr>
91 <tr bgcolor="#ffffff"><td><a href="#HE_HASHCODE_USE_OBJECT_EQUALS">HE: Class def ines hashCode() and uses Object.equals()</a></td><td>Bad practice</td></tr> 93 <tr bgcolor="#ffffff"><td><a href="#HE_HASHCODE_NO_EQUALS">HE: Class defines has hCode() but not equals()</a></td><td>Bad practice</td></tr>
92 <tr bgcolor="#eeeeee"><td><a href="#HE_INHERITS_EQUALS_USE_HASHCODE">HE: Class i nherits equals() and uses Object.hashCode()</a></td><td>Bad practice</td></tr> 94 <tr bgcolor="#eeeeee"><td><a href="#HE_HASHCODE_USE_OBJECT_EQUALS">HE: Class def ines hashCode() and uses Object.equals()</a></td><td>Bad practice</td></tr>
93 <tr bgcolor="#ffffff"><td><a href="#IC_SUPERCLASS_USES_SUBCLASS_DURING_INITIALIZ ATION">IC: Superclass uses subclass during initialization</a></td><td>Bad practi ce</td></tr> 95 <tr bgcolor="#ffffff"><td><a href="#HE_INHERITS_EQUALS_USE_HASHCODE">HE: Class i nherits equals() and uses Object.hashCode()</a></td><td>Bad practice</td></tr>
94 <tr bgcolor="#eeeeee"><td><a href="#IMSE_DONT_CATCH_IMSE">IMSE: Dubious catching of IllegalMonitorStateException</a></td><td>Bad practice</td></tr> 96 <tr bgcolor="#eeeeee"><td><a href="#IC_SUPERCLASS_USES_SUBCLASS_DURING_INITIALIZ ATION">IC: Superclass uses subclass during initialization</a></td><td>Bad practi ce</td></tr>
95 <tr bgcolor="#ffffff"><td><a href="#ISC_INSTANTIATE_STATIC_CLASS">ISC: Needless instantiation of class that only supplies static methods</a></td><td>Bad practic e</td></tr> 97 <tr bgcolor="#ffffff"><td><a href="#IMSE_DONT_CATCH_IMSE">IMSE: Dubious catching of IllegalMonitorStateException</a></td><td>Bad practice</td></tr>
96 <tr bgcolor="#eeeeee"><td><a href="#IT_NO_SUCH_ELEMENT">It: Iterator next() meth od can't throw NoSuchElementException</a></td><td>Bad practice</td></tr> 98 <tr bgcolor="#eeeeee"><td><a href="#ISC_INSTANTIATE_STATIC_CLASS">ISC: Needless instantiation of class that only supplies static methods</a></td><td>Bad practic e</td></tr>
97 <tr bgcolor="#ffffff"><td><a href="#J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_S ESSION">J2EE: Store of non serializable object into HttpSession</a></td><td>Bad practice</td></tr> 99 <tr bgcolor="#ffffff"><td><a href="#IT_NO_SUCH_ELEMENT">It: Iterator next() meth od can't throw NoSuchElementException</a></td><td>Bad practice</td></tr>
98 <tr bgcolor="#eeeeee"><td><a href="#JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS">JC IP: Fields of immutable classes should be final</a></td><td>Bad practice</td></t r> 100 <tr bgcolor="#eeeeee"><td><a href="#J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_S ESSION">J2EE: Store of non serializable object into HttpSession</a></td><td>Bad practice</td></tr>
99 <tr bgcolor="#ffffff"><td><a href="#NP_BOOLEAN_RETURN_NULL">NP: Method with Bool ean return type returns explicit null</a></td><td>Bad practice</td></tr> 101 <tr bgcolor="#ffffff"><td><a href="#JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS">JC IP: Fields of immutable classes should be final</a></td><td>Bad practice</td></t r>
100 <tr bgcolor="#eeeeee"><td><a href="#NP_CLONE_COULD_RETURN_NULL">NP: Clone method may return null</a></td><td>Bad practice</td></tr> 102 <tr bgcolor="#eeeeee"><td><a href="#NP_BOOLEAN_RETURN_NULL">NP: Method with Bool ean return type returns explicit null</a></td><td>Bad practice</td></tr>
101 <tr bgcolor="#ffffff"><td><a href="#NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT">NP: e quals() method does not check for null argument</a></td><td>Bad practice</td></t r> 103 <tr bgcolor="#ffffff"><td><a href="#NP_CLONE_COULD_RETURN_NULL">NP: Clone method may return null</a></td><td>Bad practice</td></tr>
102 <tr bgcolor="#eeeeee"><td><a href="#NP_TOSTRING_COULD_RETURN_NULL">NP: toString method may return null</a></td><td>Bad practice</td></tr> 104 <tr bgcolor="#eeeeee"><td><a href="#NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT">NP: e quals() method does not check for null argument</a></td><td>Bad practice</td></t r>
103 <tr bgcolor="#ffffff"><td><a href="#NM_CLASS_NAMING_CONVENTION">Nm: Class names should start with an upper case letter</a></td><td>Bad practice</td></tr> 105 <tr bgcolor="#ffffff"><td><a href="#NP_TOSTRING_COULD_RETURN_NULL">NP: toString method may return null</a></td><td>Bad practice</td></tr>
104 <tr bgcolor="#eeeeee"><td><a href="#NM_CLASS_NOT_EXCEPTION">Nm: Class is not der ived from an Exception, even though it is named as such</a></td><td>Bad practice </td></tr> 106 <tr bgcolor="#eeeeee"><td><a href="#NM_CLASS_NAMING_CONVENTION">Nm: Class names should start with an upper case letter</a></td><td>Bad practice</td></tr>
105 <tr bgcolor="#ffffff"><td><a href="#NM_CONFUSING">Nm: Confusing method names</a> </td><td>Bad practice</td></tr> 107 <tr bgcolor="#ffffff"><td><a href="#NM_CLASS_NOT_EXCEPTION">Nm: Class is not der ived from an Exception, even though it is named as such</a></td><td>Bad practice </td></tr>
106 <tr bgcolor="#eeeeee"><td><a href="#NM_FIELD_NAMING_CONVENTION">Nm: Field names should start with a lower case letter</a></td><td>Bad practice</td></tr> 108 <tr bgcolor="#eeeeee"><td><a href="#NM_CONFUSING">Nm: Confusing method names</a> </td><td>Bad practice</td></tr>
107 <tr bgcolor="#ffffff"><td><a href="#NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER">Nm: Us e of identifier that is a keyword in later versions of Java</a></td><td>Bad prac tice</td></tr> 109 <tr bgcolor="#ffffff"><td><a href="#NM_FIELD_NAMING_CONVENTION">Nm: Field names should start with a lower case letter</a></td><td>Bad practice</td></tr>
108 <tr bgcolor="#eeeeee"><td><a href="#NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER" >Nm: Use of identifier that is a keyword in later versions of Java</a></td><td>B ad practice</td></tr> 110 <tr bgcolor="#eeeeee"><td><a href="#NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER">Nm: Us e of identifier that is a keyword in later versions of Java</a></td><td>Bad prac tice</td></tr>
109 <tr bgcolor="#ffffff"><td><a href="#NM_METHOD_NAMING_CONVENTION">Nm: Method name s should start with a lower case letter</a></td><td>Bad practice</td></tr> 111 <tr bgcolor="#ffffff"><td><a href="#NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER" >Nm: Use of identifier that is a keyword in later versions of Java</a></td><td>B ad practice</td></tr>
110 <tr bgcolor="#eeeeee"><td><a href="#NM_SAME_SIMPLE_NAME_AS_INTERFACE">Nm: Class names shouldn't shadow simple name of implemented interface</a></td><td>Bad prac tice</td></tr> 112 <tr bgcolor="#eeeeee"><td><a href="#NM_METHOD_NAMING_CONVENTION">Nm: Method name s should start with a lower case letter</a></td><td>Bad practice</td></tr>
111 <tr bgcolor="#ffffff"><td><a href="#NM_SAME_SIMPLE_NAME_AS_SUPERCLASS">Nm: Class names shouldn't shadow simple name of superclass</a></td><td>Bad practice</td>< /tr> 113 <tr bgcolor="#ffffff"><td><a href="#NM_SAME_SIMPLE_NAME_AS_INTERFACE">Nm: Class names shouldn't shadow simple name of implemented interface</a></td><td>Bad prac tice</td></tr>
112 <tr bgcolor="#eeeeee"><td><a href="#NM_VERY_CONFUSING_INTENTIONAL">Nm: Very conf using method names (but perhaps intentional)</a></td><td>Bad practice</td></tr> 114 <tr bgcolor="#eeeeee"><td><a href="#NM_SAME_SIMPLE_NAME_AS_SUPERCLASS">Nm: Class names shouldn't shadow simple name of superclass</a></td><td>Bad practice</td>< /tr>
113 <tr bgcolor="#ffffff"><td><a href="#NM_WRONG_PACKAGE_INTENTIONAL">Nm: Method doe sn't override method in superclass due to wrong package for parameter</a></td><t d>Bad practice</td></tr> 115 <tr bgcolor="#ffffff"><td><a href="#NM_VERY_CONFUSING_INTENTIONAL">Nm: Very conf using method names (but perhaps intentional)</a></td><td>Bad practice</td></tr>
114 <tr bgcolor="#eeeeee"><td><a href="#ODR_OPEN_DATABASE_RESOURCE">ODR: Method may fail to close database resource</a></td><td>Bad practice</td></tr> 116 <tr bgcolor="#eeeeee"><td><a href="#NM_WRONG_PACKAGE_INTENTIONAL">Nm: Method doe sn't override method in superclass due to wrong package for parameter</a></td><t d>Bad practice</td></tr>
115 <tr bgcolor="#ffffff"><td><a href="#ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH">O DR: Method may fail to close database resource on exception</a></td><td>Bad prac tice</td></tr> 117 <tr bgcolor="#ffffff"><td><a href="#ODR_OPEN_DATABASE_RESOURCE">ODR: Method may fail to close database resource</a></td><td>Bad practice</td></tr>
116 <tr bgcolor="#eeeeee"><td><a href="#OS_OPEN_STREAM">OS: Method may fail to close stream</a></td><td>Bad practice</td></tr> 118 <tr bgcolor="#eeeeee"><td><a href="#ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH">O DR: Method may fail to close database resource on exception</a></td><td>Bad prac tice</td></tr>
117 <tr bgcolor="#ffffff"><td><a href="#OS_OPEN_STREAM_EXCEPTION_PATH">OS: Method ma y fail to close stream on exception</a></td><td>Bad practice</td></tr> 119 <tr bgcolor="#ffffff"><td><a href="#OS_OPEN_STREAM">OS: Method may fail to close stream</a></td><td>Bad practice</td></tr>
118 <tr bgcolor="#eeeeee"><td><a href="#PZ_DONT_REUSE_ENTRY_OBJECTS_IN_ITERATORS">PZ : Don't reuse entry objects in iterators</a></td><td>Bad practice</td></tr> 120 <tr bgcolor="#eeeeee"><td><a href="#OS_OPEN_STREAM_EXCEPTION_PATH">OS: Method ma y fail to close stream on exception</a></td><td>Bad practice</td></tr>
119 <tr bgcolor="#ffffff"><td><a href="#RC_REF_COMPARISON_BAD_PRACTICE">RC: Suspicio us reference comparison to constant</a></td><td>Bad practice</td></tr> 121 <tr bgcolor="#ffffff"><td><a href="#PZ_DONT_REUSE_ENTRY_OBJECTS_IN_ITERATORS">PZ : Don't reuse entry objects in iterators</a></td><td>Bad practice</td></tr>
120 <tr bgcolor="#eeeeee"><td><a href="#RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN">RC: Suspicious reference comparison of Boolean values</a></td><td>Bad practice</td>< /tr> 122 <tr bgcolor="#eeeeee"><td><a href="#RC_REF_COMPARISON_BAD_PRACTICE">RC: Suspicio us reference comparison to constant</a></td><td>Bad practice</td></tr>
121 <tr bgcolor="#ffffff"><td><a href="#RR_NOT_CHECKED">RR: Method ignores results o f InputStream.read()</a></td><td>Bad practice</td></tr> 123 <tr bgcolor="#ffffff"><td><a href="#RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN">RC: Suspicious reference comparison of Boolean values</a></td><td>Bad practice</td>< /tr>
122 <tr bgcolor="#eeeeee"><td><a href="#SR_NOT_CHECKED">RR: Method ignores results o f InputStream.skip()</a></td><td>Bad practice</td></tr> 124 <tr bgcolor="#eeeeee"><td><a href="#RR_NOT_CHECKED">RR: Method ignores results o f InputStream.read()</a></td><td>Bad practice</td></tr>
123 <tr bgcolor="#ffffff"><td><a href="#RV_NEGATING_RESULT_OF_COMPARETO">RV: Negatin g the result of compareTo()/compare()</a></td><td>Bad practice</td></tr> 125 <tr bgcolor="#ffffff"><td><a href="#SR_NOT_CHECKED">RR: Method ignores results o f InputStream.skip()</a></td><td>Bad practice</td></tr>
124 <tr bgcolor="#eeeeee"><td><a href="#RV_RETURN_VALUE_IGNORED_BAD_PRACTICE">RV: Me thod ignores exceptional return value</a></td><td>Bad practice</td></tr> 126 <tr bgcolor="#eeeeee"><td><a href="#RV_NEGATING_RESULT_OF_COMPARETO">RV: Negatin g the result of compareTo()/compare()</a></td><td>Bad practice</td></tr>
125 <tr bgcolor="#ffffff"><td><a href="#SI_INSTANCE_BEFORE_FINALS_ASSIGNED">SI: Stat ic initializer creates instance before all static final fields assigned</a></td> <td>Bad practice</td></tr> 127 <tr bgcolor="#ffffff"><td><a href="#RV_RETURN_VALUE_IGNORED_BAD_PRACTICE">RV: Me thod ignores exceptional return value</a></td><td>Bad practice</td></tr>
126 <tr bgcolor="#eeeeee"><td><a href="#SW_SWING_METHODS_INVOKED_IN_SWING_THREAD">SW : Certain swing methods needs to be invoked in Swing thread</a></td><td>Bad prac tice</td></tr> 128 <tr bgcolor="#eeeeee"><td><a href="#SI_INSTANCE_BEFORE_FINALS_ASSIGNED">SI: Stat ic initializer creates instance before all static final fields assigned</a></td> <td>Bad practice</td></tr>
127 <tr bgcolor="#ffffff"><td><a href="#SE_BAD_FIELD">Se: Non-transient non-serializ able instance field in serializable class</a></td><td>Bad practice</td></tr> 129 <tr bgcolor="#ffffff"><td><a href="#SW_SWING_METHODS_INVOKED_IN_SWING_THREAD">SW : Certain swing methods needs to be invoked in Swing thread</a></td><td>Bad prac tice</td></tr>
128 <tr bgcolor="#eeeeee"><td><a href="#SE_BAD_FIELD_INNER_CLASS">Se: Non-serializab le class has a serializable inner class</a></td><td>Bad practice</td></tr> 130 <tr bgcolor="#eeeeee"><td><a href="#SE_BAD_FIELD">Se: Non-transient non-serializ able instance field in serializable class</a></td><td>Bad practice</td></tr>
129 <tr bgcolor="#ffffff"><td><a href="#SE_BAD_FIELD_STORE">Se: Non-serializable val ue stored into instance field of a serializable class</a></td><td>Bad practice</ td></tr> 131 <tr bgcolor="#ffffff"><td><a href="#SE_BAD_FIELD_INNER_CLASS">Se: Non-serializab le class has a serializable inner class</a></td><td>Bad practice</td></tr>
130 <tr bgcolor="#eeeeee"><td><a href="#SE_COMPARATOR_SHOULD_BE_SERIALIZABLE">Se: Co mparator doesn't implement Serializable</a></td><td>Bad practice</td></tr> 132 <tr bgcolor="#eeeeee"><td><a href="#SE_BAD_FIELD_STORE">Se: Non-serializable val ue stored into instance field of a serializable class</a></td><td>Bad practice</ td></tr>
131 <tr bgcolor="#ffffff"><td><a href="#SE_INNER_CLASS">Se: Serializable inner class </a></td><td>Bad practice</td></tr> 133 <tr bgcolor="#ffffff"><td><a href="#SE_COMPARATOR_SHOULD_BE_SERIALIZABLE">Se: Co mparator doesn't implement Serializable</a></td><td>Bad practice</td></tr>
132 <tr bgcolor="#eeeeee"><td><a href="#SE_NONFINAL_SERIALVERSIONID">Se: serialVersi onUID isn't final</a></td><td>Bad practice</td></tr> 134 <tr bgcolor="#eeeeee"><td><a href="#SE_INNER_CLASS">Se: Serializable inner class </a></td><td>Bad practice</td></tr>
133 <tr bgcolor="#ffffff"><td><a href="#SE_NONLONG_SERIALVERSIONID">Se: serialVersio nUID isn't long</a></td><td>Bad practice</td></tr> 135 <tr bgcolor="#ffffff"><td><a href="#SE_NONFINAL_SERIALVERSIONID">Se: serialVersi onUID isn't final</a></td><td>Bad practice</td></tr>
134 <tr bgcolor="#eeeeee"><td><a href="#SE_NONSTATIC_SERIALVERSIONID">Se: serialVers ionUID isn't static</a></td><td>Bad practice</td></tr> 136 <tr bgcolor="#eeeeee"><td><a href="#SE_NONLONG_SERIALVERSIONID">Se: serialVersio nUID isn't long</a></td><td>Bad practice</td></tr>
135 <tr bgcolor="#ffffff"><td><a href="#SE_NO_SUITABLE_CONSTRUCTOR">Se: Class is Ser ializable but its superclass doesn't define a void constructor</a></td><td>Bad p ractice</td></tr> 137 <tr bgcolor="#ffffff"><td><a href="#SE_NONSTATIC_SERIALVERSIONID">Se: serialVers ionUID isn't static</a></td><td>Bad practice</td></tr>
136 <tr bgcolor="#eeeeee"><td><a href="#SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATI ON">Se: Class is Externalizable but doesn't define a void constructor</a></td><t d>Bad practice</td></tr> 138 <tr bgcolor="#eeeeee"><td><a href="#SE_NO_SUITABLE_CONSTRUCTOR">Se: Class is Ser ializable but its superclass doesn't define a void constructor</a></td><td>Bad p ractice</td></tr>
137 <tr bgcolor="#ffffff"><td><a href="#SE_READ_RESOLVE_MUST_RETURN_OBJECT">Se: The readResolve method must be declared with a return type of Object. </a></td><td>B ad practice</td></tr> 139 <tr bgcolor="#ffffff"><td><a href="#SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATI ON">Se: Class is Externalizable but doesn't define a void constructor</a></td><t d>Bad practice</td></tr>
138 <tr bgcolor="#eeeeee"><td><a href="#SE_TRANSIENT_FIELD_NOT_RESTORED">Se: Transie nt field that isn't set by deserialization. </a></td><td>Bad practice</td></tr> 140 <tr bgcolor="#eeeeee"><td><a href="#SE_READ_RESOLVE_MUST_RETURN_OBJECT">Se: The readResolve method must be declared with a return type of Object. </a></td><td>B ad practice</td></tr>
139 <tr bgcolor="#ffffff"><td><a href="#SE_NO_SERIALVERSIONID">SnVI: Class is Serial izable, but doesn't define serialVersionUID</a></td><td>Bad practice</td></tr> 141 <tr bgcolor="#ffffff"><td><a href="#SE_TRANSIENT_FIELD_NOT_RESTORED">Se: Transie nt field that isn't set by deserialization. </a></td><td>Bad practice</td></tr>
140 <tr bgcolor="#eeeeee"><td><a href="#UI_INHERITANCE_UNSAFE_GETRESOURCE">UI: Usage of GetResource may be unsafe if class is extended</a></td><td>Bad practice</td> </tr> 142 <tr bgcolor="#eeeeee"><td><a href="#SE_NO_SERIALVERSIONID">SnVI: Class is Serial izable, but doesn't define serialVersionUID</a></td><td>Bad practice</td></tr>
141 <tr bgcolor="#ffffff"><td><a href="#BC_IMPOSSIBLE_CAST">BC: Impossible cast</a>< /td><td>Correctness</td></tr> 143 <tr bgcolor="#ffffff"><td><a href="#UI_INHERITANCE_UNSAFE_GETRESOURCE">UI: Usage of GetResource may be unsafe if class is extended</a></td><td>Bad practice</td> </tr>
142 <tr bgcolor="#eeeeee"><td><a href="#BC_IMPOSSIBLE_DOWNCAST">BC: Impossible downc ast</a></td><td>Correctness</td></tr> 144 <tr bgcolor="#eeeeee"><td><a href="#BC_IMPOSSIBLE_CAST">BC: Impossible cast</a>< /td><td>Correctness</td></tr>
143 <tr bgcolor="#ffffff"><td><a href="#BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY">BC: Impos sible downcast of toArray() result</a></td><td>Correctness</td></tr> 145 <tr bgcolor="#ffffff"><td><a href="#BC_IMPOSSIBLE_DOWNCAST">BC: Impossible downc ast</a></td><td>Correctness</td></tr>
144 <tr bgcolor="#eeeeee"><td><a href="#BC_IMPOSSIBLE_INSTANCEOF">BC: instanceof wil l always return false</a></td><td>Correctness</td></tr> 146 <tr bgcolor="#eeeeee"><td><a href="#BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY">BC: Impos sible downcast of toArray() result</a></td><td>Correctness</td></tr>
145 <tr bgcolor="#ffffff"><td><a href="#BIT_ADD_OF_SIGNED_BYTE">BIT: Bitwise add of signed byte value</a></td><td>Correctness</td></tr> 147 <tr bgcolor="#ffffff"><td><a href="#BC_IMPOSSIBLE_INSTANCEOF">BC: instanceof wil l always return false</a></td><td>Correctness</td></tr>
146 <tr bgcolor="#eeeeee"><td><a href="#BIT_AND">BIT: Incompatible bit masks</a></td ><td>Correctness</td></tr> 148 <tr bgcolor="#eeeeee"><td><a href="#BIT_ADD_OF_SIGNED_BYTE">BIT: Bitwise add of signed byte value</a></td><td>Correctness</td></tr>
147 <tr bgcolor="#ffffff"><td><a href="#BIT_AND_ZZ">BIT: Check to see if ((...) & 0) == 0</a></td><td>Correctness</td></tr> 149 <tr bgcolor="#ffffff"><td><a href="#BIT_AND">BIT: Incompatible bit masks</a></td ><td>Correctness</td></tr>
148 <tr bgcolor="#eeeeee"><td><a href="#BIT_IOR">BIT: Incompatible bit masks</a></td ><td>Correctness</td></tr> 150 <tr bgcolor="#eeeeee"><td><a href="#BIT_AND_ZZ">BIT: Check to see if ((...) & 0) == 0</a></td><td>Correctness</td></tr>
149 <tr bgcolor="#ffffff"><td><a href="#BIT_IOR_OF_SIGNED_BYTE">BIT: Bitwise OR of s igned byte value</a></td><td>Correctness</td></tr> 151 <tr bgcolor="#ffffff"><td><a href="#BIT_IOR">BIT: Incompatible bit masks</a></td ><td>Correctness</td></tr>
150 <tr bgcolor="#eeeeee"><td><a href="#BIT_SIGNED_CHECK_HIGH_BIT">BIT: Check for si gn of bitwise operation</a></td><td>Correctness</td></tr> 152 <tr bgcolor="#eeeeee"><td><a href="#BIT_IOR_OF_SIGNED_BYTE">BIT: Bitwise OR of s igned byte value</a></td><td>Correctness</td></tr>
151 <tr bgcolor="#ffffff"><td><a href="#BOA_BADLY_OVERRIDDEN_ADAPTER">BOA: Class ove rrides a method implemented in super class Adapter wrongly</a></td><td>Correctne ss</td></tr> 153 <tr bgcolor="#ffffff"><td><a href="#BIT_SIGNED_CHECK_HIGH_BIT">BIT: Check for si gn of bitwise operation</a></td><td>Correctness</td></tr>
152 <tr bgcolor="#eeeeee"><td><a href="#ICAST_BAD_SHIFT_AMOUNT">BSHIFT: 32 bit int s hifted by an amount not in the range -31..31</a></td><td>Correctness</td></tr> 154 <tr bgcolor="#eeeeee"><td><a href="#BOA_BADLY_OVERRIDDEN_ADAPTER">BOA: Class ove rrides a method implemented in super class Adapter wrongly</a></td><td>Correctne ss</td></tr>
153 <tr bgcolor="#ffffff"><td><a href="#BX_UNBOXED_AND_COERCED_FOR_TERNARY_OPERATOR" >Bx: Primitive value is unboxed and coerced for ternary operator</a></td><td>Cor rectness</td></tr> 155 <tr bgcolor="#ffffff"><td><a href="#ICAST_BAD_SHIFT_AMOUNT">BSHIFT: 32 bit int s hifted by an amount not in the range -31..31</a></td><td>Correctness</td></tr>
154 <tr bgcolor="#eeeeee"><td><a href="#CO_COMPARETO_RESULTS_MIN_VALUE">Co: compareT o()/compare() returns Integer.MIN_VALUE</a></td><td>Correctness</td></tr> 156 <tr bgcolor="#eeeeee"><td><a href="#BX_UNBOXED_AND_COERCED_FOR_TERNARY_OPERATOR" >Bx: Primitive value is unboxed and coerced for ternary operator</a></td><td>Cor rectness</td></tr>
155 <tr bgcolor="#ffffff"><td><a href="#DLS_DEAD_LOCAL_INCREMENT_IN_RETURN">DLS: Use less increment in return statement</a></td><td>Correctness</td></tr> 157 <tr bgcolor="#ffffff"><td><a href="#CO_COMPARETO_RESULTS_MIN_VALUE">Co: compareT o()/compare() returns Integer.MIN_VALUE</a></td><td>Correctness</td></tr>
156 <tr bgcolor="#eeeeee"><td><a href="#DLS_DEAD_STORE_OF_CLASS_LITERAL">DLS: Dead s tore of class literal</a></td><td>Correctness</td></tr> 158 <tr bgcolor="#eeeeee"><td><a href="#DLS_DEAD_LOCAL_INCREMENT_IN_RETURN">DLS: Use less increment in return statement</a></td><td>Correctness</td></tr>
157 <tr bgcolor="#ffffff"><td><a href="#DLS_OVERWRITTEN_INCREMENT">DLS: Overwritten increment</a></td><td>Correctness</td></tr> 159 <tr bgcolor="#ffffff"><td><a href="#DLS_DEAD_STORE_OF_CLASS_LITERAL">DLS: Dead s tore of class literal</a></td><td>Correctness</td></tr>
158 <tr bgcolor="#eeeeee"><td><a href="#DMI_ARGUMENTS_WRONG_ORDER">DMI: Reversed met hod arguments</a></td><td>Correctness</td></tr> 160 <tr bgcolor="#eeeeee"><td><a href="#DLS_OVERWRITTEN_INCREMENT">DLS: Overwritten increment</a></td><td>Correctness</td></tr>
159 <tr bgcolor="#ffffff"><td><a href="#DMI_BAD_MONTH">DMI: Bad constant value for m onth</a></td><td>Correctness</td></tr> 161 <tr bgcolor="#ffffff"><td><a href="#DMI_ARGUMENTS_WRONG_ORDER">DMI: Reversed met hod arguments</a></td><td>Correctness</td></tr>
160 <tr bgcolor="#eeeeee"><td><a href="#DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE">DMI: BigDecimal constructed from double that isn't represented precisely</a></td><td >Correctness</td></tr> 162 <tr bgcolor="#eeeeee"><td><a href="#DMI_BAD_MONTH">DMI: Bad constant value for m onth</a></td><td>Correctness</td></tr>
161 <tr bgcolor="#ffffff"><td><a href="#DMI_CALLING_NEXT_FROM_HASNEXT">DMI: hasNext method invokes next</a></td><td>Correctness</td></tr> 163 <tr bgcolor="#ffffff"><td><a href="#DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE">DMI: BigDecimal constructed from double that isn't represented precisely</a></td><td >Correctness</td></tr>
162 <tr bgcolor="#eeeeee"><td><a href="#DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVE S">DMI: Collections should not contain themselves</a></td><td>Correctness</td></ tr> 164 <tr bgcolor="#eeeeee"><td><a href="#DMI_CALLING_NEXT_FROM_HASNEXT">DMI: hasNext method invokes next</a></td><td>Correctness</td></tr>
163 <tr bgcolor="#ffffff"><td><a href="#DMI_DOH">DMI: D'oh! A nonsensical method inv ocation</a></td><td>Correctness</td></tr> 165 <tr bgcolor="#ffffff"><td><a href="#DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVE S">DMI: Collections should not contain themselves</a></td><td>Correctness</td></ tr>
164 <tr bgcolor="#eeeeee"><td><a href="#DMI_INVOKING_HASHCODE_ON_ARRAY">DMI: Invocat ion of hashCode on an array</a></td><td>Correctness</td></tr> 166 <tr bgcolor="#eeeeee"><td><a href="#DMI_DOH">DMI: D'oh! A nonsensical method inv ocation</a></td><td>Correctness</td></tr>
165 <tr bgcolor="#ffffff"><td><a href="#DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT">DMI: Double.longBitsToDouble invoked on an int</a></td><td>Correctness</td></tr> 167 <tr bgcolor="#ffffff"><td><a href="#DMI_INVOKING_HASHCODE_ON_ARRAY">DMI: Invocat ion of hashCode on an array</a></td><td>Correctness</td></tr>
166 <tr bgcolor="#eeeeee"><td><a href="#DMI_VACUOUS_SELF_COLLECTION_CALL">DMI: Vacuo us call to collections</a></td><td>Correctness</td></tr> 168 <tr bgcolor="#eeeeee"><td><a href="#DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT">DMI: Double.longBitsToDouble invoked on an int</a></td><td>Correctness</td></tr>
167 <tr bgcolor="#ffffff"><td><a href="#DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION" >Dm: Can't use reflection to check for presence of annotation without runtime re tention</a></td><td>Correctness</td></tr> 169 <tr bgcolor="#ffffff"><td><a href="#DMI_VACUOUS_SELF_COLLECTION_CALL">DMI: Vacuo us call to collections</a></td><td>Correctness</td></tr>
168 <tr bgcolor="#eeeeee"><td><a href="#DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF _SCHEDULED_THREAD_POOL_EXECUTOR">Dm: Futile attempt to change max pool size of S cheduledThreadPoolExecutor</a></td><td>Correctness</td></tr> 170 <tr bgcolor="#eeeeee"><td><a href="#DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION" >Dm: Can't use reflection to check for presence of annotation without runtime re tention</a></td><td>Correctness</td></tr>
169 <tr bgcolor="#ffffff"><td><a href="#DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO _CORE_THREADS">Dm: Creation of ScheduledThreadPoolExecutor with zero core thread s</a></td><td>Correctness</td></tr> 171 <tr bgcolor="#ffffff"><td><a href="#DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF _SCHEDULED_THREAD_POOL_EXECUTOR">Dm: Futile attempt to change max pool size of S cheduledThreadPoolExecutor</a></td><td>Correctness</td></tr>
170 <tr bgcolor="#eeeeee"><td><a href="#DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD">Dm: Use less/vacuous call to EasyMock method</a></td><td>Correctness</td></tr> 172 <tr bgcolor="#eeeeee"><td><a href="#DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO _CORE_THREADS">Dm: Creation of ScheduledThreadPoolExecutor with zero core thread s</a></td><td>Correctness</td></tr>
171 <tr bgcolor="#ffffff"><td><a href="#EC_ARRAY_AND_NONARRAY">EC: equals() used to compare array and nonarray</a></td><td>Correctness</td></tr> 173 <tr bgcolor="#ffffff"><td><a href="#DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD">Dm: Use less/vacuous call to EasyMock method</a></td><td>Correctness</td></tr>
172 <tr bgcolor="#eeeeee"><td><a href="#EC_BAD_ARRAY_COMPARE">EC: Invocation of equa ls() on an array, which is equivalent to ==</a></td><td>Correctness</td></tr> 174 <tr bgcolor="#eeeeee"><td><a href="#EC_ARRAY_AND_NONARRAY">EC: equals() used to compare array and nonarray</a></td><td>Correctness</td></tr>
173 <tr bgcolor="#ffffff"><td><a href="#EC_INCOMPATIBLE_ARRAY_COMPARE">EC: equals(.. .) used to compare incompatible arrays</a></td><td>Correctness</td></tr> 175 <tr bgcolor="#ffffff"><td><a href="#EC_BAD_ARRAY_COMPARE">EC: Invocation of equa ls() on an array, which is equivalent to ==</a></td><td>Correctness</td></tr>
174 <tr bgcolor="#eeeeee"><td><a href="#EC_NULL_ARG">EC: Call to equals(null)</a></t d><td>Correctness</td></tr> 176 <tr bgcolor="#eeeeee"><td><a href="#EC_INCOMPATIBLE_ARRAY_COMPARE">EC: equals(.. .) used to compare incompatible arrays</a></td><td>Correctness</td></tr>
175 <tr bgcolor="#ffffff"><td><a href="#EC_UNRELATED_CLASS_AND_INTERFACE">EC: Call t o equals() comparing unrelated class and interface</a></td><td>Correctness</td>< /tr> 177 <tr bgcolor="#ffffff"><td><a href="#EC_NULL_ARG">EC: Call to equals(null)</a></t d><td>Correctness</td></tr>
176 <tr bgcolor="#eeeeee"><td><a href="#EC_UNRELATED_INTERFACES">EC: Call to equals( ) comparing different interface types</a></td><td>Correctness</td></tr> 178 <tr bgcolor="#eeeeee"><td><a href="#EC_UNRELATED_CLASS_AND_INTERFACE">EC: Call t o equals() comparing unrelated class and interface</a></td><td>Correctness</td>< /tr>
177 <tr bgcolor="#ffffff"><td><a href="#EC_UNRELATED_TYPES">EC: Call to equals() com paring different types</a></td><td>Correctness</td></tr> 179 <tr bgcolor="#ffffff"><td><a href="#EC_UNRELATED_INTERFACES">EC: Call to equals( ) comparing different interface types</a></td><td>Correctness</td></tr>
178 <tr bgcolor="#eeeeee"><td><a href="#EC_UNRELATED_TYPES_USING_POINTER_EQUALITY">E C: Using pointer equality to compare different types</a></td><td>Correctness</td ></tr> 180 <tr bgcolor="#eeeeee"><td><a href="#EC_UNRELATED_TYPES">EC: Call to equals() com paring different types</a></td><td>Correctness</td></tr>
179 <tr bgcolor="#ffffff"><td><a href="#EQ_ALWAYS_FALSE">Eq: equals method always re turns false</a></td><td>Correctness</td></tr> 181 <tr bgcolor="#ffffff"><td><a href="#EC_UNRELATED_TYPES_USING_POINTER_EQUALITY">E C: Using pointer equality to compare different types</a></td><td>Correctness</td ></tr>
180 <tr bgcolor="#eeeeee"><td><a href="#EQ_ALWAYS_TRUE">Eq: equals method always ret urns true</a></td><td>Correctness</td></tr> 182 <tr bgcolor="#eeeeee"><td><a href="#EQ_ALWAYS_FALSE">Eq: equals method always re turns false</a></td><td>Correctness</td></tr>
181 <tr bgcolor="#ffffff"><td><a href="#EQ_COMPARING_CLASS_NAMES">Eq: equals method compares class names rather than class objects</a></td><td>Correctness</td></tr> 183 <tr bgcolor="#ffffff"><td><a href="#EQ_ALWAYS_TRUE">Eq: equals method always ret urns true</a></td><td>Correctness</td></tr>
182 <tr bgcolor="#eeeeee"><td><a href="#EQ_DONT_DEFINE_EQUALS_FOR_ENUM">Eq: Covarian t equals() method defined for enum</a></td><td>Correctness</td></tr> 184 <tr bgcolor="#eeeeee"><td><a href="#EQ_COMPARING_CLASS_NAMES">Eq: equals method compares class names rather than class objects</a></td><td>Correctness</td></tr>
183 <tr bgcolor="#ffffff"><td><a href="#EQ_OTHER_NO_OBJECT">Eq: equals() method defi ned that doesn't override equals(Object)</a></td><td>Correctness</td></tr> 185 <tr bgcolor="#ffffff"><td><a href="#EQ_DONT_DEFINE_EQUALS_FOR_ENUM">Eq: Covarian t equals() method defined for enum</a></td><td>Correctness</td></tr>
184 <tr bgcolor="#eeeeee"><td><a href="#EQ_OTHER_USE_OBJECT">Eq: equals() method def ined that doesn't override Object.equals(Object)</a></td><td>Correctness</td></t r> 186 <tr bgcolor="#eeeeee"><td><a href="#EQ_OTHER_NO_OBJECT">Eq: equals() method defi ned that doesn't override equals(Object)</a></td><td>Correctness</td></tr>
185 <tr bgcolor="#ffffff"><td><a href="#EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC">Eq: equa ls method overrides equals in superclass and may not be symmetric</a></td><td>Co rrectness</td></tr> 187 <tr bgcolor="#ffffff"><td><a href="#EQ_OTHER_USE_OBJECT">Eq: equals() method def ined that doesn't override Object.equals(Object)</a></td><td>Correctness</td></t r>
186 <tr bgcolor="#eeeeee"><td><a href="#EQ_SELF_USE_OBJECT">Eq: Covariant equals() m ethod defined, Object.equals(Object) inherited</a></td><td>Correctness</td></tr> 188 <tr bgcolor="#eeeeee"><td><a href="#EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC">Eq: equa ls method overrides equals in superclass and may not be symmetric</a></td><td>Co rrectness</td></tr>
187 <tr bgcolor="#ffffff"><td><a href="#FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER">FE: Doomed test for equality to NaN</a></td><td>Correctness</td></tr> 189 <tr bgcolor="#ffffff"><td><a href="#EQ_SELF_USE_OBJECT">Eq: Covariant equals() m ethod defined, Object.equals(Object) inherited</a></td><td>Correctness</td></tr>
188 <tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_BAD_ARGUMENT">FS: Format st ring placeholder incompatible with passed argument</a></td><td>Correctness</td>< /tr> 190 <tr bgcolor="#eeeeee"><td><a href="#FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER">FE: Doomed test for equality to NaN</a></td><td>Correctness</td></tr>
189 <tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_BAD_CONVERSION">FS: The typ e of a supplied argument doesn't match format specifier</a></td><td>Correctness< /td></tr> 191 <tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_BAD_ARGUMENT">FS: Format st ring placeholder incompatible with passed argument</a></td><td>Correctness</td>< /tr>
190 <tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUP PLIED">FS: MessageFormat supplied where printf style format expected</a></td><td >Correctness</td></tr> 192 <tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_BAD_CONVERSION">FS: The typ e of a supplied argument doesn't match format specifier</a></td><td>Correctness< /td></tr>
191 <tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED">FS: More arguments are passed than are actually used in the format string</a></td>< td>Correctness</td></tr> 193 <tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUP PLIED">FS: MessageFormat supplied where printf style format expected</a></td><td >Correctness</td></tr>
192 <tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_ILLEGAL">FS: Illegal format string</a></td><td>Correctness</td></tr> 194 <tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED">FS: More arguments are passed than are actually used in the format string</a></td>< td>Correctness</td></tr>
193 <tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_MISSING_ARGUMENT">FS: Forma t string references missing argument</a></td><td>Correctness</td></tr> 195 <tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_ILLEGAL">FS: Illegal format string</a></td><td>Correctness</td></tr>
194 <tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT">FS: N o previous argument for format string</a></td><td>Correctness</td></tr> 196 <tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_MISSING_ARGUMENT">FS: Forma t string references missing argument</a></td><td>Correctness</td></tr>
195 <tr bgcolor="#ffffff"><td><a href="#GC_UNRELATED_TYPES">GC: No relationship betw een generic parameter and method argument</a></td><td>Correctness</td></tr> 197 <tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT">FS: N o previous argument for format string</a></td><td>Correctness</td></tr>
196 <tr bgcolor="#eeeeee"><td><a href="#HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_ CLASS">HE: Signature declares use of unhashable class in hashed construct</a></t d><td>Correctness</td></tr> 198 <tr bgcolor="#eeeeee"><td><a href="#GC_UNRELATED_TYPES">GC: No relationship betw een generic parameter and method argument</a></td><td>Correctness</td></tr>
197 <tr bgcolor="#ffffff"><td><a href="#HE_USE_OF_UNHASHABLE_CLASS">HE: Use of class without a hashCode() method in a hashed data structure</a></td><td>Correctness< /td></tr> 199 <tr bgcolor="#ffffff"><td><a href="#HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_ CLASS">HE: Signature declares use of unhashable class in hashed construct</a></t d><td>Correctness</td></tr>
198 <tr bgcolor="#eeeeee"><td><a href="#ICAST_INT_2_LONG_AS_INSTANT">ICAST: int valu e converted to long and used as absolute time</a></td><td>Correctness</td></tr> 200 <tr bgcolor="#eeeeee"><td><a href="#HE_USE_OF_UNHASHABLE_CLASS">HE: Use of class without a hashCode() method in a hashed data structure</a></td><td>Correctness< /td></tr>
199 <tr bgcolor="#ffffff"><td><a href="#ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL">ICA ST: Integral value cast to double and then passed to Math.ceil</a></td><td>Corre ctness</td></tr> 201 <tr bgcolor="#ffffff"><td><a href="#ICAST_INT_2_LONG_AS_INSTANT">ICAST: int valu e converted to long and used as absolute time</a></td><td>Correctness</td></tr>
200 <tr bgcolor="#eeeeee"><td><a href="#ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND">ICA ST: int value cast to float and then passed to Math.round</a></td><td>Correctnes s</td></tr> 202 <tr bgcolor="#eeeeee"><td><a href="#ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL">ICA ST: Integral value cast to double and then passed to Math.ceil</a></td><td>Corre ctness</td></tr>
201 <tr bgcolor="#ffffff"><td><a href="#IJU_ASSERT_METHOD_INVOKED_FROM_RUN_METHOD">I JU: JUnit assertion in run method will not be noticed by JUnit</a></td><td>Corre ctness</td></tr> 203 <tr bgcolor="#ffffff"><td><a href="#ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND">ICA ST: int value cast to float and then passed to Math.round</a></td><td>Correctnes s</td></tr>
202 <tr bgcolor="#eeeeee"><td><a href="#IJU_BAD_SUITE_METHOD">IJU: TestCase declares a bad suite method </a></td><td>Correctness</td></tr> 204 <tr bgcolor="#eeeeee"><td><a href="#IJU_ASSERT_METHOD_INVOKED_FROM_RUN_METHOD">I JU: JUnit assertion in run method will not be noticed by JUnit</a></td><td>Corre ctness</td></tr>
203 <tr bgcolor="#ffffff"><td><a href="#IJU_NO_TESTS">IJU: TestCase has no tests</a> </td><td>Correctness</td></tr> 205 <tr bgcolor="#ffffff"><td><a href="#IJU_BAD_SUITE_METHOD">IJU: TestCase declares a bad suite method </a></td><td>Correctness</td></tr>
204 <tr bgcolor="#eeeeee"><td><a href="#IJU_SETUP_NO_SUPER">IJU: TestCase defines se tUp that doesn't call super.setUp()</a></td><td>Correctness</td></tr> 206 <tr bgcolor="#eeeeee"><td><a href="#IJU_NO_TESTS">IJU: TestCase has no tests</a> </td><td>Correctness</td></tr>
205 <tr bgcolor="#ffffff"><td><a href="#IJU_SUITE_NOT_STATIC">IJU: TestCase implemen ts a non-static suite method </a></td><td>Correctness</td></tr> 207 <tr bgcolor="#ffffff"><td><a href="#IJU_SETUP_NO_SUPER">IJU: TestCase defines se tUp that doesn't call super.setUp()</a></td><td>Correctness</td></tr>
206 <tr bgcolor="#eeeeee"><td><a href="#IJU_TEARDOWN_NO_SUPER">IJU: TestCase defines tearDown that doesn't call super.tearDown()</a></td><td>Correctness</td></tr> 208 <tr bgcolor="#eeeeee"><td><a href="#IJU_SUITE_NOT_STATIC">IJU: TestCase implemen ts a non-static suite method </a></td><td>Correctness</td></tr>
207 <tr bgcolor="#ffffff"><td><a href="#IL_CONTAINER_ADDED_TO_ITSELF">IL: A collecti on is added to itself</a></td><td>Correctness</td></tr> 209 <tr bgcolor="#ffffff"><td><a href="#IJU_TEARDOWN_NO_SUPER">IJU: TestCase defines tearDown that doesn't call super.tearDown()</a></td><td>Correctness</td></tr>
208 <tr bgcolor="#eeeeee"><td><a href="#IL_INFINITE_LOOP">IL: An apparent infinite l oop</a></td><td>Correctness</td></tr> 210 <tr bgcolor="#eeeeee"><td><a href="#IL_CONTAINER_ADDED_TO_ITSELF">IL: A collecti on is added to itself</a></td><td>Correctness</td></tr>
209 <tr bgcolor="#ffffff"><td><a href="#IL_INFINITE_RECURSIVE_LOOP">IL: An apparent infinite recursive loop</a></td><td>Correctness</td></tr> 211 <tr bgcolor="#ffffff"><td><a href="#IL_INFINITE_LOOP">IL: An apparent infinite l oop</a></td><td>Correctness</td></tr>
210 <tr bgcolor="#eeeeee"><td><a href="#IM_MULTIPLYING_RESULT_OF_IREM">IM: Integer m ultiply of result of integer remainder</a></td><td>Correctness</td></tr> 212 <tr bgcolor="#eeeeee"><td><a href="#IL_INFINITE_RECURSIVE_LOOP">IL: An apparent infinite recursive loop</a></td><td>Correctness</td></tr>
211 <tr bgcolor="#ffffff"><td><a href="#INT_BAD_COMPARISON_WITH_INT_VALUE">INT: Bad comparison of int value with long constant</a></td><td>Correctness</td></tr> 213 <tr bgcolor="#ffffff"><td><a href="#IM_MULTIPLYING_RESULT_OF_IREM">IM: Integer m ultiply of result of integer remainder</a></td><td>Correctness</td></tr>
212 <tr bgcolor="#eeeeee"><td><a href="#INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE">I NT: Bad comparison of nonnegative value with negative constant</a></td><td>Corre ctness</td></tr> 214 <tr bgcolor="#eeeeee"><td><a href="#INT_BAD_COMPARISON_WITH_INT_VALUE">INT: Bad comparison of int value with long constant</a></td><td>Correctness</td></tr>
213 <tr bgcolor="#ffffff"><td><a href="#INT_BAD_COMPARISON_WITH_SIGNED_BYTE">INT: Ba d comparison of signed byte</a></td><td>Correctness</td></tr> 215 <tr bgcolor="#ffffff"><td><a href="#INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE">I NT: Bad comparison of nonnegative value with negative constant</a></td><td>Corre ctness</td></tr>
214 <tr bgcolor="#eeeeee"><td><a href="#IO_APPENDING_TO_OBJECT_OUTPUT_STREAM">IO: Do omed attempt to append to an object output stream</a></td><td>Correctness</td></ tr> 216 <tr bgcolor="#eeeeee"><td><a href="#INT_BAD_COMPARISON_WITH_SIGNED_BYTE">INT: Ba d comparison of signed byte</a></td><td>Correctness</td></tr>
215 <tr bgcolor="#ffffff"><td><a href="#IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN">IP: A parameter is dead upon entry to a method but overwritten</a></td><td>Correctness </td></tr> 217 <tr bgcolor="#ffffff"><td><a href="#IO_APPENDING_TO_OBJECT_OUTPUT_STREAM">IO: Do omed attempt to append to an object output stream</a></td><td>Correctness</td></ tr>
216 <tr bgcolor="#eeeeee"><td><a href="#MF_CLASS_MASKS_FIELD">MF: Class defines fiel d that masks a superclass field</a></td><td>Correctness</td></tr> 218 <tr bgcolor="#eeeeee"><td><a href="#IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN">IP: A parameter is dead upon entry to a method but overwritten</a></td><td>Correctness </td></tr>
217 <tr bgcolor="#ffffff"><td><a href="#MF_METHOD_MASKS_FIELD">MF: Method defines a variable that obscures a field</a></td><td>Correctness</td></tr> 219 <tr bgcolor="#ffffff"><td><a href="#MF_CLASS_MASKS_FIELD">MF: Class defines fiel d that masks a superclass field</a></td><td>Correctness</td></tr>
218 <tr bgcolor="#eeeeee"><td><a href="#NP_ALWAYS_NULL">NP: Null pointer dereference </a></td><td>Correctness</td></tr> 220 <tr bgcolor="#eeeeee"><td><a href="#MF_METHOD_MASKS_FIELD">MF: Method defines a variable that obscures a field</a></td><td>Correctness</td></tr>
219 <tr bgcolor="#ffffff"><td><a href="#NP_ALWAYS_NULL_EXCEPTION">NP: Null pointer d ereference in method on exception path</a></td><td>Correctness</td></tr> 221 <tr bgcolor="#ffffff"><td><a href="#NP_ALWAYS_NULL">NP: Null pointer dereference </a></td><td>Correctness</td></tr>
220 <tr bgcolor="#eeeeee"><td><a href="#NP_ARGUMENT_MIGHT_BE_NULL">NP: Method does n ot check for null argument</a></td><td>Correctness</td></tr> 222 <tr bgcolor="#eeeeee"><td><a href="#NP_ALWAYS_NULL_EXCEPTION">NP: Null pointer d ereference in method on exception path</a></td><td>Correctness</td></tr>
221 <tr bgcolor="#ffffff"><td><a href="#NP_CLOSING_NULL">NP: close() invoked on a va lue that is always null</a></td><td>Correctness</td></tr> 223 <tr bgcolor="#ffffff"><td><a href="#NP_ARGUMENT_MIGHT_BE_NULL">NP: Method does n ot check for null argument</a></td><td>Correctness</td></tr>
222 <tr bgcolor="#eeeeee"><td><a href="#NP_GUARANTEED_DEREF">NP: Null value is guara nteed to be dereferenced</a></td><td>Correctness</td></tr> 224 <tr bgcolor="#eeeeee"><td><a href="#NP_CLOSING_NULL">NP: close() invoked on a va lue that is always null</a></td><td>Correctness</td></tr>
223 <tr bgcolor="#ffffff"><td><a href="#NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH">NP: V alue is null and guaranteed to be dereferenced on exception path</a></td><td>Cor rectness</td></tr> 225 <tr bgcolor="#ffffff"><td><a href="#NP_GUARANTEED_DEREF">NP: Null value is guara nteed to be dereferenced</a></td><td>Correctness</td></tr>
224 <tr bgcolor="#eeeeee"><td><a href="#NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUC TOR">NP: Nonnull field is not initialized</a></td><td>Correctness</td></tr> 226 <tr bgcolor="#eeeeee"><td><a href="#NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH">NP: V alue is null and guaranteed to be dereferenced on exception path</a></td><td>Cor rectness</td></tr>
225 <tr bgcolor="#ffffff"><td><a href="#NP_NONNULL_PARAM_VIOLATION">NP: Method call passes null to a nonnull parameter </a></td><td>Correctness</td></tr> 227 <tr bgcolor="#ffffff"><td><a href="#NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUC TOR">NP: Nonnull field is not initialized</a></td><td>Correctness</td></tr>
226 <tr bgcolor="#eeeeee"><td><a href="#NP_NONNULL_RETURN_VIOLATION">NP: Method may return null, but is declared @NonNull</a></td><td>Correctness</td></tr> 228 <tr bgcolor="#eeeeee"><td><a href="#NP_NONNULL_PARAM_VIOLATION">NP: Method call passes null to a nonnull parameter </a></td><td>Correctness</td></tr>
227 <tr bgcolor="#ffffff"><td><a href="#NP_NULL_INSTANCEOF">NP: A known null value i s checked to see if it is an instance of a type</a></td><td>Correctness</td></tr > 229 <tr bgcolor="#ffffff"><td><a href="#NP_NONNULL_RETURN_VIOLATION">NP: Method may return null, but is declared @NonNull</a></td><td>Correctness</td></tr>
228 <tr bgcolor="#eeeeee"><td><a href="#NP_NULL_ON_SOME_PATH">NP: Possible null poin ter dereference</a></td><td>Correctness</td></tr> 230 <tr bgcolor="#eeeeee"><td><a href="#NP_NULL_INSTANCEOF">NP: A known null value i s checked to see if it is an instance of a type</a></td><td>Correctness</td></tr >
229 <tr bgcolor="#ffffff"><td><a href="#NP_NULL_ON_SOME_PATH_EXCEPTION">NP: Possible null pointer dereference in method on exception path</a></td><td>Correctness</t d></tr> 231 <tr bgcolor="#ffffff"><td><a href="#NP_NULL_ON_SOME_PATH">NP: Possible null poin ter dereference</a></td><td>Correctness</td></tr>
230 <tr bgcolor="#eeeeee"><td><a href="#NP_NULL_PARAM_DEREF">NP: Method call passes null for nonnull parameter</a></td><td>Correctness</td></tr> 232 <tr bgcolor="#eeeeee"><td><a href="#NP_NULL_ON_SOME_PATH_EXCEPTION">NP: Possible null pointer dereference in method on exception path</a></td><td>Correctness</t d></tr>
231 <tr bgcolor="#ffffff"><td><a href="#NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS">N P: Method call passes null for nonnull parameter</a></td><td>Correctness</td></t r> 233 <tr bgcolor="#ffffff"><td><a href="#NP_NULL_PARAM_DEREF">NP: Method call passes null for nonnull parameter</a></td><td>Correctness</td></tr>
232 <tr bgcolor="#eeeeee"><td><a href="#NP_NULL_PARAM_DEREF_NONVIRTUAL">NP: Non-virt ual method call passes null for nonnull parameter</a></td><td>Correctness</td></ tr> 234 <tr bgcolor="#eeeeee"><td><a href="#NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS">N P: Method call passes null for nonnull parameter</a></td><td>Correctness</td></t r>
235 <tr bgcolor="#ffffff"><td><a href="#NP_NULL_PARAM_DEREF_NONVIRTUAL">NP: Non-virt ual method call passes null for nonnull parameter</a></td><td>Correctness</td></ tr>
236 <tr bgcolor="#eeeeee"><td><a href="#NP_OPTIONAL_RETURN_NULL">NP: Method with Opt ional return type returns explicit null</a></td><td>Correctness</td></tr>
233 <tr bgcolor="#ffffff"><td><a href="#NP_STORE_INTO_NONNULL_FIELD">NP: Store of nu ll value into field annotated NonNull</a></td><td>Correctness</td></tr> 237 <tr bgcolor="#ffffff"><td><a href="#NP_STORE_INTO_NONNULL_FIELD">NP: Store of nu ll value into field annotated NonNull</a></td><td>Correctness</td></tr>
234 <tr bgcolor="#eeeeee"><td><a href="#NP_UNWRITTEN_FIELD">NP: Read of unwritten fi eld</a></td><td>Correctness</td></tr> 238 <tr bgcolor="#eeeeee"><td><a href="#NP_UNWRITTEN_FIELD">NP: Read of unwritten fi eld</a></td><td>Correctness</td></tr>
235 <tr bgcolor="#ffffff"><td><a href="#NM_BAD_EQUAL">Nm: Class defines equal(Object ); should it be equals(Object)?</a></td><td>Correctness</td></tr> 239 <tr bgcolor="#ffffff"><td><a href="#NM_BAD_EQUAL">Nm: Class defines equal(Object ); should it be equals(Object)?</a></td><td>Correctness</td></tr>
236 <tr bgcolor="#eeeeee"><td><a href="#NM_LCASE_HASHCODE">Nm: Class defines hashcod e(); should it be hashCode()?</a></td><td>Correctness</td></tr> 240 <tr bgcolor="#eeeeee"><td><a href="#NM_LCASE_HASHCODE">Nm: Class defines hashcod e(); should it be hashCode()?</a></td><td>Correctness</td></tr>
237 <tr bgcolor="#ffffff"><td><a href="#NM_LCASE_TOSTRING">Nm: Class defines tostrin g(); should it be toString()?</a></td><td>Correctness</td></tr> 241 <tr bgcolor="#ffffff"><td><a href="#NM_LCASE_TOSTRING">Nm: Class defines tostrin g(); should it be toString()?</a></td><td>Correctness</td></tr>
238 <tr bgcolor="#eeeeee"><td><a href="#NM_METHOD_CONSTRUCTOR_CONFUSION">Nm: Apparen t method/constructor confusion</a></td><td>Correctness</td></tr> 242 <tr bgcolor="#eeeeee"><td><a href="#NM_METHOD_CONSTRUCTOR_CONFUSION">Nm: Apparen t method/constructor confusion</a></td><td>Correctness</td></tr>
239 <tr bgcolor="#ffffff"><td><a href="#NM_VERY_CONFUSING">Nm: Very confusing method names</a></td><td>Correctness</td></tr> 243 <tr bgcolor="#ffffff"><td><a href="#NM_VERY_CONFUSING">Nm: Very confusing method names</a></td><td>Correctness</td></tr>
240 <tr bgcolor="#eeeeee"><td><a href="#NM_WRONG_PACKAGE">Nm: Method doesn't overrid e method in superclass due to wrong package for parameter</a></td><td>Correctnes s</td></tr> 244 <tr bgcolor="#eeeeee"><td><a href="#NM_WRONG_PACKAGE">Nm: Method doesn't overrid e method in superclass due to wrong package for parameter</a></td><td>Correctnes s</td></tr>
241 <tr bgcolor="#ffffff"><td><a href="#QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT">QBA: Me thod assigns boolean literal in boolean expression</a></td><td>Correctness</td>< /tr> 245 <tr bgcolor="#ffffff"><td><a href="#QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT">QBA: Me thod assigns boolean literal in boolean expression</a></td><td>Correctness</td>< /tr>
242 <tr bgcolor="#eeeeee"><td><a href="#RC_REF_COMPARISON">RC: Suspicious reference comparison</a></td><td>Correctness</td></tr> 246 <tr bgcolor="#eeeeee"><td><a href="#RC_REF_COMPARISON">RC: Suspicious reference comparison</a></td><td>Correctness</td></tr>
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 <tr bgcolor="#ffffff"><td><a href="#DMI_BLOCKING_METHODS_ON_URL">Dm: The equals and hashCode methods of URL are blocking</a></td><td>Performance</td></tr> 361 <tr bgcolor="#ffffff"><td><a href="#DMI_BLOCKING_METHODS_ON_URL">Dm: The equals and hashCode methods of URL are blocking</a></td><td>Performance</td></tr>
358 <tr bgcolor="#eeeeee"><td><a href="#DMI_COLLECTION_OF_URLS">Dm: Maps and sets of URLs can be performance hogs</a></td><td>Performance</td></tr> 362 <tr bgcolor="#eeeeee"><td><a href="#DMI_COLLECTION_OF_URLS">Dm: Maps and sets of URLs can be performance hogs</a></td><td>Performance</td></tr>
359 <tr bgcolor="#ffffff"><td><a href="#DM_BOOLEAN_CTOR">Dm: Method invokes ineffici ent Boolean constructor; use Boolean.valueOf(...) instead</a></td><td>Performanc e</td></tr> 363 <tr bgcolor="#ffffff"><td><a href="#DM_BOOLEAN_CTOR">Dm: Method invokes ineffici ent Boolean constructor; use Boolean.valueOf(...) instead</a></td><td>Performanc e</td></tr>
360 <tr bgcolor="#eeeeee"><td><a href="#DM_GC">Dm: Explicit garbage collection; extr emely dubious except in benchmarking code</a></td><td>Performance</td></tr> 364 <tr bgcolor="#eeeeee"><td><a href="#DM_GC">Dm: Explicit garbage collection; extr emely dubious except in benchmarking code</a></td><td>Performance</td></tr>
361 <tr bgcolor="#ffffff"><td><a href="#DM_NEW_FOR_GETCLASS">Dm: Method allocates an object, only to get the class object</a></td><td>Performance</td></tr> 365 <tr bgcolor="#ffffff"><td><a href="#DM_NEW_FOR_GETCLASS">Dm: Method allocates an object, only to get the class object</a></td><td>Performance</td></tr>
362 <tr bgcolor="#eeeeee"><td><a href="#DM_NEXTINT_VIA_NEXTDOUBLE">Dm: Use the nextI nt method of Random rather than nextDouble to generate a random integer</a></td> <td>Performance</td></tr> 366 <tr bgcolor="#eeeeee"><td><a href="#DM_NEXTINT_VIA_NEXTDOUBLE">Dm: Use the nextI nt method of Random rather than nextDouble to generate a random integer</a></td> <td>Performance</td></tr>
363 <tr bgcolor="#ffffff"><td><a href="#DM_STRING_CTOR">Dm: Method invokes inefficie nt new String(String) constructor</a></td><td>Performance</td></tr> 367 <tr bgcolor="#ffffff"><td><a href="#DM_STRING_CTOR">Dm: Method invokes inefficie nt new String(String) constructor</a></td><td>Performance</td></tr>
364 <tr bgcolor="#eeeeee"><td><a href="#DM_STRING_TOSTRING">Dm: Method invokes toStr ing() method on a String</a></td><td>Performance</td></tr> 368 <tr bgcolor="#eeeeee"><td><a href="#DM_STRING_TOSTRING">Dm: Method invokes toStr ing() method on a String</a></td><td>Performance</td></tr>
365 <tr bgcolor="#ffffff"><td><a href="#DM_STRING_VOID_CTOR">Dm: Method invokes inef ficient new String() constructor</a></td><td>Performance</td></tr> 369 <tr bgcolor="#ffffff"><td><a href="#DM_STRING_VOID_CTOR">Dm: Method invokes inef ficient new String() constructor</a></td><td>Performance</td></tr>
366 <tr bgcolor="#eeeeee"><td><a href="#HSC_HUGE_SHARED_STRING_CONSTANT">HSC: Huge s tring constants is duplicated across multiple class files</a></td><td>Performanc e</td></tr> 370 <tr bgcolor="#eeeeee"><td><a href="#HSC_HUGE_SHARED_STRING_CONSTANT">HSC: Huge s tring constants is duplicated across multiple class files</a></td><td>Performanc e</td></tr>
371 <tr bgcolor="#ffffff"><td><a href="#IIO_INEFFICIENT_INDEX_OF">IIO: Inefficient u se of String.indexOf(String)</a></td><td>Performance</td></tr>
372 <tr bgcolor="#eeeeee"><td><a href="#IIO_INEFFICIENT_LAST_INDEX_OF">IIO: Ineffici ent use of String.lastIndexOf(String)</a></td><td>Performance</td></tr>
367 <tr bgcolor="#ffffff"><td><a href="#ITA_INEFFICIENT_TO_ARRAY">ITA: Method uses t oArray() with zero-length array argument</a></td><td>Performance</td></tr> 373 <tr bgcolor="#ffffff"><td><a href="#ITA_INEFFICIENT_TO_ARRAY">ITA: Method uses t oArray() with zero-length array argument</a></td><td>Performance</td></tr>
368 <tr bgcolor="#eeeeee"><td><a href="#SBSC_USE_STRINGBUFFER_CONCATENATION">SBSC: M ethod concatenates strings using + in a loop</a></td><td>Performance</td></tr> 374 <tr bgcolor="#eeeeee"><td><a href="#SBSC_USE_STRINGBUFFER_CONCATENATION">SBSC: M ethod concatenates strings using + in a loop</a></td><td>Performance</td></tr>
369 <tr bgcolor="#ffffff"><td><a href="#SIC_INNER_SHOULD_BE_STATIC">SIC: Should be a static inner class</a></td><td>Performance</td></tr> 375 <tr bgcolor="#ffffff"><td><a href="#SIC_INNER_SHOULD_BE_STATIC">SIC: Should be a static inner class</a></td><td>Performance</td></tr>
370 <tr bgcolor="#eeeeee"><td><a href="#SIC_INNER_SHOULD_BE_STATIC_ANON">SIC: Could be refactored into a named static inner class</a></td><td>Performance</td></tr> 376 <tr bgcolor="#eeeeee"><td><a href="#SIC_INNER_SHOULD_BE_STATIC_ANON">SIC: Could be refactored into a named static inner class</a></td><td>Performance</td></tr>
371 <tr bgcolor="#ffffff"><td><a href="#SIC_INNER_SHOULD_BE_STATIC_NEEDS_THIS">SIC: Could be refactored into a static inner class</a></td><td>Performance</td></tr> 377 <tr bgcolor="#ffffff"><td><a href="#SIC_INNER_SHOULD_BE_STATIC_NEEDS_THIS">SIC: Could be refactored into a static inner class</a></td><td>Performance</td></tr>
372 <tr bgcolor="#eeeeee"><td><a href="#SS_SHOULD_BE_STATIC">SS: Unread field: shoul d this field be static?</a></td><td>Performance</td></tr> 378 <tr bgcolor="#eeeeee"><td><a href="#SS_SHOULD_BE_STATIC">SS: Unread field: shoul d this field be static?</a></td><td>Performance</td></tr>
373 <tr bgcolor="#ffffff"><td><a href="#UM_UNNECESSARY_MATH">UM: Method calls static Math class method on a constant value</a></td><td>Performance</td></tr> 379 <tr bgcolor="#ffffff"><td><a href="#UM_UNNECESSARY_MATH">UM: Method calls static Math class method on a constant value</a></td><td>Performance</td></tr>
374 <tr bgcolor="#eeeeee"><td><a href="#UPM_UNCALLED_PRIVATE_METHOD">UPM: Private me thod is never called</a></td><td>Performance</td></tr> 380 <tr bgcolor="#eeeeee"><td><a href="#UPM_UNCALLED_PRIVATE_METHOD">UPM: Private me thod is never called</a></td><td>Performance</td></tr>
375 <tr bgcolor="#ffffff"><td><a href="#URF_UNREAD_FIELD">UrF: Unread field</a></td> <td>Performance</td></tr> 381 <tr bgcolor="#ffffff"><td><a href="#URF_UNREAD_FIELD">UrF: Unread field</a></td> <td>Performance</td></tr>
376 <tr bgcolor="#eeeeee"><td><a href="#UUF_UNUSED_FIELD">UuF: Unused field</a></td> <td>Performance</td></tr> 382 <tr bgcolor="#eeeeee"><td><a href="#UUF_UNUSED_FIELD">UuF: Unused field</a></td> <td>Performance</td></tr>
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 516
511 <h3><a name="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE">CN: Class defines clone() bu t doesn't implement Cloneable (CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE)</a></h3> 517 <h3><a name="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE">CN: Class defines clone() bu t doesn't implement Cloneable (CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE)</a></h3>
512 518
513 519
514 <p> This class defines a clone() method but the class doesn't implement Cloneabl e. 520 <p> This class defines a clone() method but the class doesn't implement Cloneabl e.
515 There are some situations in which this is OK (e.g., you want to control how sub classes 521 There are some situations in which this is OK (e.g., you want to control how sub classes
516 can clone themselves), but just make sure that this is what you intended. 522 can clone themselves), but just make sure that this is what you intended.
517 </p> 523 </p>
518 524
519 525
526 <h3><a name="CNT_ROUGH_CONSTANT_VALUE">CNT: Rough value of known constant found (CNT_ROUGH_CONSTANT_VALUE)</a></h3>
527
528
529 <p>It's recommended to use the predefined library constant for code clarity and better precision.</p>
530
531
520 <h3><a name="CO_ABSTRACT_SELF">Co: Abstract class defines covariant compareTo() method (CO_ABSTRACT_SELF)</a></h3> 532 <h3><a name="CO_ABSTRACT_SELF">Co: Abstract class defines covariant compareTo() method (CO_ABSTRACT_SELF)</a></h3>
521 533
522 534
523 <p> This class defines a covariant version of <code>compareTo()</code>.&nbsp; 535 <p> This class defines a covariant version of <code>compareTo()</code>.&nbsp;
524 To correctly override the <code>compareTo()</code> method in the 536 To correctly override the <code>compareTo()</code> method in the
525 <code>Comparable</code> interface, the parameter of <code>compareTo()</code> 537 <code>Comparable</code> interface, the parameter of <code>compareTo()</code>
526 must have type <code>java.lang.Object</code>.</p> 538 must have type <code>java.lang.Object</code>.</p>
527 539
528 540
529 <h3><a name="CO_SELF_NO_OBJECT">Co: Covariant compareTo() method defined (CO_SEL F_NO_OBJECT)</a></h3> 541 <h3><a name="CO_SELF_NO_OBJECT">Co: Covariant compareTo() method defined (CO_SEL F_NO_OBJECT)</a></h3>
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
1576 the constant Integer.MIN_VALUE, which is an exceptionally bad practice. 1588 the constant Integer.MIN_VALUE, which is an exceptionally bad practice.
1577 The only thing that matters about the return value of compareTo is the sign of the result. 1589 The only thing that matters about the return value of compareTo is the sign of the result.
1578 But people will sometimes negate the return value of compareTo, expecting th at this will negate 1590 But people will sometimes negate the return value of compareTo, expecting th at this will negate
1579 the sign of the result. And it will, except in the case where the value retu rned is Integer.MIN_VALUE. 1591 the sign of the result. And it will, except in the case where the value retu rned is Integer.MIN_VALUE.
1580 So just return -1 rather than Integer.MIN_VALUE. 1592 So just return -1 rather than Integer.MIN_VALUE.
1581 1593
1582 1594
1583 <h3><a name="DLS_DEAD_LOCAL_INCREMENT_IN_RETURN">DLS: Useless increment in retur n statement (DLS_DEAD_LOCAL_INCREMENT_IN_RETURN)</a></h3> 1595 <h3><a name="DLS_DEAD_LOCAL_INCREMENT_IN_RETURN">DLS: Useless increment in retur n statement (DLS_DEAD_LOCAL_INCREMENT_IN_RETURN)</a></h3>
1584 1596
1585 1597
1586 <p>This statement has a return such as <code>return x++;</code>. 1598 <p>This statement has a return such as <code>return x++;</code>.
1587 A postfix increment/decrement does not impact the value of the expression, 1599 A postfix increment/decrement does not impact the value of the expression,
1588 so this increment/decrement has no effect. 1600 so this increment/decrement has no effect.
1589 Please verify that this statement does the right thing. 1601 Please verify that this statement does the right thing.
1590 </p> 1602 </p>
1591 1603
1592 1604
1593 <h3><a name="DLS_DEAD_STORE_OF_CLASS_LITERAL">DLS: Dead store of class literal ( DLS_DEAD_STORE_OF_CLASS_LITERAL)</a></h3> 1605 <h3><a name="DLS_DEAD_STORE_OF_CLASS_LITERAL">DLS: Dead store of class literal ( DLS_DEAD_STORE_OF_CLASS_LITERAL)</a></h3>
1594 1606
1595 1607
1596 <p> 1608 <p>
1597 This instruction assigns a class literal to a variable and then never uses it. 1609 This instruction assigns a class literal to a variable and then never uses it.
1598 <a href="//java.sun.com/j2se/1.5.0/compatibility.html#literal">The behavior of t his differs in Java 1.4 and in Java 5.</a> 1610 <a href="//java.sun.com/j2se/1.5.0/compatibility.html#literal">The behavior of t his differs in Java 1.4 and in Java 5.</a>
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
2446 2458
2447 2459
2448 <p> 2460 <p>
2449 A possibly-null value is passed to a nonnull method parameter. 2461 A possibly-null value is passed to a nonnull method parameter.
2450 Either the parameter is annotated as a parameter that should 2462 Either the parameter is annotated as a parameter that should
2451 always be nonnull, or analysis has shown that it will always be 2463 always be nonnull, or analysis has shown that it will always be
2452 dereferenced. 2464 dereferenced.
2453 </p> 2465 </p>
2454 2466
2455 2467
2468 <h3><a name="NP_OPTIONAL_RETURN_NULL">NP: Method with Optional return type retur ns explicit null (NP_OPTIONAL_RETURN_NULL)</a></h3>
2469
2470
2471 <p>
2472 The usage of Optional return type always mean that explicit null returns wer e not desired by design.
2473 Returning a null value in such case is a contract violation and will most li kely break clients code.
2474 </p>
2475
2476
2456 <h3><a name="NP_STORE_INTO_NONNULL_FIELD">NP: Store of null value into field ann otated NonNull (NP_STORE_INTO_NONNULL_FIELD)</a></h3> 2477 <h3><a name="NP_STORE_INTO_NONNULL_FIELD">NP: Store of null value into field ann otated NonNull (NP_STORE_INTO_NONNULL_FIELD)</a></h3>
2457 2478
2458 2479
2459 <p> A value that could be null is stored into a field that has been annotated as NonNull. </p> 2480 <p> A value that could be null is stored into a field that has been annotated as NonNull. </p>
2460 2481
2461 2482
2462 <h3><a name="NP_UNWRITTEN_FIELD">NP: Read of unwritten field (NP_UNWRITTEN_FIELD )</a></h3> 2483 <h3><a name="NP_UNWRITTEN_FIELD">NP: Read of unwritten field (NP_UNWRITTEN_FIELD )</a></h3>
2463 2484
2464 2485
2465 <p> The program is dereferencing a field that does not seem to ever have a non -null value written to it. 2486 <p> The program is dereferencing a field that does not seem to ever have a non -null value written to it.
(...skipping 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after
4121 <p> 4142 <p>
4122 A large String constant is duplicated across multiple class files. 4143 A large String constant is duplicated across multiple class files.
4123 This is likely because a final field is initialized to a String constant, an d the Java language 4144 This is likely because a final field is initialized to a String constant, an d the Java language
4124 mandates that all references to a final field from other classes be inlined into 4145 mandates that all references to a final field from other classes be inlined into
4125 that classfile. See <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id= 6447475">JDK bug 6447475</a> 4146 that classfile. See <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id= 6447475">JDK bug 6447475</a>
4126 for a description of an occurrence of this bug in the JDK and how resolving it reduced 4147 for a description of an occurrence of this bug in the JDK and how resolving it reduced
4127 the size of the JDK by 1 megabyte. 4148 the size of the JDK by 1 megabyte.
4128 </p> 4149 </p>
4129 4150
4130 4151
4152 <h3><a name="IIO_INEFFICIENT_INDEX_OF">IIO: Inefficient use of String.indexOf(St ring) (IIO_INEFFICIENT_INDEX_OF)</a></h3>
4153
4154
4155 <p> This code passes a constant string of length 1 to String.indexOf().
4156 It is more efficient to use the integer implementations of String.indexOf().
4157 f. e. call <code>myString.indexOf('.')</code> instead of <code>myString.indexOf( ".")</code></p>
4158
4159
4160 <h3><a name="IIO_INEFFICIENT_LAST_INDEX_OF">IIO: Inefficient use of String.lastI ndexOf(String) (IIO_INEFFICIENT_LAST_INDEX_OF)</a></h3>
4161
4162
4163 <p> This code passes a constant string of length 1 to String.lastIndexOf().
4164 It is more efficient to use the integer implementations of String.lastIndexOf().
4165 f. e. call <code>myString.lastIndexOf('.')</code> instead of <code>myString.last IndexOf(".")</code></p>
4166
4167
4131 <h3><a name="ITA_INEFFICIENT_TO_ARRAY">ITA: Method uses toArray() with zero-leng th array argument (ITA_INEFFICIENT_TO_ARRAY)</a></h3> 4168 <h3><a name="ITA_INEFFICIENT_TO_ARRAY">ITA: Method uses toArray() with zero-leng th array argument (ITA_INEFFICIENT_TO_ARRAY)</a></h3>
4132 4169
4133 4170
4134 <p> This method uses the toArray() method of a collection derived class, and pas ses 4171 <p> This method uses the toArray() method of a collection derived class, and pas ses
4135 in a zero-length prototype array argument. It is more efficient to use 4172 in a zero-length prototype array argument. It is more efficient to use
4136 <code>myCollection.toArray(new Foo[myCollection.size()])</code> 4173 <code>myCollection.toArray(new Foo[myCollection.size()])</code>
4137 If the array passed in is big enough to store all of the 4174 If the array passed in is big enough to store all of the
4138 elements of the collection, then it is populated and returned 4175 elements of the collection, then it is populated and returned
4139 directly. This avoids the need to create a second array 4176 directly. This avoids the need to create a second array
4140 (by reflection) to return as the result.</p> 4177 (by reflection) to return as the result.</p>
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
4688 <p> 4725 <p>
4689 An argument not of type Boolean is being formatted with a %b format specifier. T his won't throw an 4726 An argument not of type Boolean is being formatted with a %b format specifier. T his won't throw an
4690 exception; instead, it will print true for any nonnull value, and false for null . 4727 exception; instead, it will print true for any nonnull value, and false for null .
4691 This feature of format strings is strange, and may not be what you intended. 4728 This feature of format strings is strange, and may not be what you intended.
4692 </p> 4729 </p>
4693 4730
4694 4731
4695 <h3><a name="IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD">IA: Potential ly ambiguous invocation of either an inherited or outer method (IA_AMBIGUOUS_INV OCATION_OF_INHERITED_OR_OUTER_METHOD)</a></h3> 4732 <h3><a name="IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD">IA: Potential ly ambiguous invocation of either an inherited or outer method (IA_AMBIGUOUS_INV OCATION_OF_INHERITED_OR_OUTER_METHOD)</a></h3>
4696 4733
4697 4734
4698 <p> 4735 <p>
4699 An inner class is invoking a method that could be resolved to either a inherited method or a method defined in an outer class. 4736 An inner class is invoking a method that could be resolved to either a inherited method or a method defined in an outer class.
4700 For example, you invoke <code>foo(17)</code>, which is defined in both a supercl ass and in an outer method. 4737 For example, you invoke <code>foo(17)</code>, which is defined in both a supercl ass and in an outer method.
4701 By the Java semantics, 4738 By the Java semantics,
4702 it will be resolved to invoke the inherited method, but this may not be want 4739 it will be resolved to invoke the inherited method, but this may not be want
4703 you intend. 4740 you intend.
4704 </p> 4741 </p>
4705 <p>If you really intend to invoke the inherited method, 4742 <p>If you really intend to invoke the inherited method,
4706 invoke it by invoking the method on super (e.g., invoke super.foo(17)), and 4743 invoke it by invoking the method on super (e.g., invoke super.foo(17)), and
4707 thus it will be clear to other readers of your code and to FindBugs 4744 thus it will be clear to other readers of your code and to FindBugs
4708 that you want to invoke the inherited method, not the method in the outer class. 4745 that you want to invoke the inherited method, not the method in the outer class.
4709 </p> 4746 </p>
4710 <p>If you call <code>this.foo(17)</code>, then the inherited method will be invo ked. However, since FindBugs only looks at 4747 <p>If you call <code>this.foo(17)</code>, then the inherited method will be invo ked. However, since FindBugs only looks at
4711 classfiles, it 4748 classfiles, it
4712 can't tell the difference between an invocation of <code>this.foo(17)</code> and <code>foo(17)</code>, it will still 4749 can't tell the difference between an invocation of <code>this.foo(17)</code> and <code>foo(17)</code>, it will still
4713 complain about a potential ambiguous invocation. 4750 complain about a potential ambiguous invocation.
4714 </p> 4751 </p>
4715 4752
4716 4753
4717 <h3><a name="IC_INIT_CIRCULARITY">IC: Initialization circularity (IC_INIT_CIRCUL ARITY)</a></h3> 4754 <h3><a name="IC_INIT_CIRCULARITY">IC: Initialization circularity (IC_INIT_CIRCUL ARITY)</a></h3>
4718 4755
4719 4756
4720 <p> A circularity was detected in the static initializers of the two 4757 <p> A circularity was detected in the static initializers of the two
4721 classes referenced by the bug instance.&nbsp; Many kinds of unexpected 4758 classes referenced by the bug instance.&nbsp; Many kinds of unexpected
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
4870 check against null. Although this is valid, it might be a mistake (perhaps yo u 4907 check against null. Although this is valid, it might be a mistake (perhaps yo u
4871 intended to refer to a different variable, or perhaps the earlier check to see i f the 4908 intended to refer to a different variable, or perhaps the earlier check to see i f the
4872 variable is null should have been a check to see if it was nonnull). 4909 variable is null should have been a check to see if it was nonnull).
4873 </p> 4910 </p>
4874 4911
4875 4912
4876 <h3><a name="NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION">NP: Method tightens nullne ss annotation on parameter (NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION)</a></h3> 4913 <h3><a name="NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION">NP: Method tightens nullne ss annotation on parameter (NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION)</a></h3>
4877 4914
4878 <p> 4915 <p>
4879 A method should always implement the contract of a method it overrides. Thus, if a method takes a parameter 4916 A method should always implement the contract of a method it overrides. Thus, if a method takes a parameter
4880 » that is marked as @Nullable, you shouldn't override that method in a sub class with a method where that parameter is @Nonnull. 4917 that is marked as @Nullable, you shouldn't override that method in a subclas s with a method where that parameter is @Nonnull.
4881 » Doing so violates the contract that the method should handle a null para meter. 4918 Doing so violates the contract that the method should handle a null paramete r.
4882 </p> 4919 </p>
4883 4920
4884 <h3><a name="NP_METHOD_RETURN_RELAXING_ANNOTATION">NP: Method relaxes nullness a nnotation on return value (NP_METHOD_RETURN_RELAXING_ANNOTATION)</a></h3> 4921 <h3><a name="NP_METHOD_RETURN_RELAXING_ANNOTATION">NP: Method relaxes nullness a nnotation on return value (NP_METHOD_RETURN_RELAXING_ANNOTATION)</a></h3>
4885 4922
4886 <p> 4923 <p>
4887 A method should always implement the contract of a method it overrides. Thus, if a method takes is annotated 4924 A method should always implement the contract of a method it overrides. Thus, if a method takes is annotated
4888 » as returning a @Nonnull value, 4925 as returning a @Nonnull value,
4889 » you shouldn't override that method in a subclass with a method annotated as returning a @Nullable or @CheckForNull value. 4926 you shouldn't override that method in a subclass with a method annotated as returning a @Nullable or @CheckForNull value.
4890 » Doing so violates the contract that the method shouldn't return null. 4927 Doing so violates the contract that the method shouldn't return null.
4891 </p> 4928 </p>
4892 4929
4893 <h3><a name="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE">NP: Possible null pointer d ereference due to return value of called method (NP_NULL_ON_SOME_PATH_FROM_RETUR N_VALUE)</a></h3> 4930 <h3><a name="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE">NP: Possible null pointer d ereference due to return value of called method (NP_NULL_ON_SOME_PATH_FROM_RETUR N_VALUE)</a></h3>
4894 4931
4895 4932
4896 <p> The return value from a method is dereferenced without a null check, 4933 <p> The return value from a method is dereferenced without a null check,
4897 and the return value of that method is one that should generally be checked 4934 and the return value of that method is one that should generally be checked
4898 for null. This may lead to a <code>NullPointerException</code> when the code is executed. 4935 for null. This may lead to a <code>NullPointerException</code> when the code is executed.
4899 </p> 4936 </p>
4900 4937
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
5316 <script language="JavaScript" type="text/javascript"> 5353 <script language="JavaScript" type="text/javascript">
5317 <!---//hide script from old browsers 5354 <!---//hide script from old browsers
5318 document.write( "Last updated "+ document.lastModified + "." ); 5355 document.write( "Last updated "+ document.lastModified + "." );
5319 //end hiding contents ---> 5356 //end hiding contents --->
5320 </script> 5357 </script>
5321 <p> Send comments to <a class="sidebar" href="mailto:findbugs@cs.umd.edu">findbu gs@cs.umd.edu</a> 5358 <p> Send comments to <a class="sidebar" href="mailto:findbugs@cs.umd.edu">findbu gs@cs.umd.edu</a>
5322 <p> 5359 <p>
5323 <A href="http://sourceforge.net"><IMG src="http://sourceforge.net/sflogo.php?gro up_id=96405&amp;type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A> 5360 <A href="http://sourceforge.net"><IMG src="http://sourceforge.net/sflogo.php?gro up_id=96405&amp;type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
5324 </td></tr></table> 5361 </td></tr></table>
5325 </body></html> 5362 </body></html>
OLDNEW
« no previous file with comments | « doc/allBugDescriptions.html ('k') | doc/bugDescriptions_fr.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698