OLD | NEW |
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 (Unabridged)</title> | 2 <html><head><title>FindBugs Bug Descriptions (Unabridged)</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> </td></tr> | 13 <tr><td> </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"> <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"> <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"> <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"> <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"> <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"> <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
/日本語)</a></font></td></tr> | 22 <tr><td><font size="-1"> <a class="sidebar" href="ja/manual/index.html">Man
ual(ja/日本語)</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"> <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"> <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"> <a class="sidebar" href="bugDescriptions_ja.html">
Bug descriptions(ja/日本語)</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"> <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"> <a class="sidebar" href="mailingLists.html">Mailin
g lists</a></font></td></tr> |
| 28 <tr><td><font size="-1"> <a class="sidebar" href="publications.html">Docume
nts and Publications</a></font></td></tr> |
| 29 <tr><td><font size="-1"> <a class="sidebar" href="links.html">Links</a></fo
nt></td></tr> |
28 | 30 |
29 <tr><td> </td></tr> | 31 <tr><td> </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> </td></tr> | 35 <tr><td> </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> </td></tr> | 39 <tr><td> </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"> <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"> <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"> <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"> <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"> <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"> <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"> <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"> <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"> <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 (Unabridged)</h1> | 54 <h1>FindBugs Bug Descriptions (Unabridged)</h1> |
53 <p>This document lists all of the bug patterns reported by the | 55 <p>This document lists all of the bug patterns reported by the |
54 latest development version of | 56 latest development version of |
55 <a href="http://findbugs.sourceforge.net">FindBugs</a>. Note that this may
include | 57 <a href="http://findbugs.sourceforge.net">FindBugs</a>. Note that this may
include |
56 bug patterns not available in any released version of FindBugs, | 58 bug patterns not available in any released version of FindBugs, |
57 as well as bug patterns that are not enabled by default. | 59 as well as bug patterns that are not enabled by default. |
58 <h2>Summary</h2> | 60 <h2>Summary</h2> |
59 <table width="100%"> | 61 <table width="100%"> |
60 <tr bgcolor="#b9b9fe"><th>Description</th><th>Category</th></tr> | 62 <tr bgcolor="#b9b9fe"><th>Description</th><th>Category</th></tr> |
61 <tr bgcolor="#eeeeee"><td><a href="#AM_CREATES_EMPTY_JAR_FILE_ENTRY">AM: Creates
an empty jar file entry</a></td><td>Bad practice</td></tr> | 63 <tr bgcolor="#eeeeee"><td><a href="#AM_CREATES_EMPTY_JAR_FILE_ENTRY">AM: Creates
an empty jar file entry</a></td><td>Bad practice</td></tr> |
62 <tr bgcolor="#ffffff"><td><a href="#AM_CREATES_EMPTY_ZIP_FILE_ENTRY">AM: Creates
an empty zip file entry</a></td><td>Bad practice</td></tr> | 64 <tr bgcolor="#ffffff"><td><a href="#AM_CREATES_EMPTY_ZIP_FILE_ENTRY">AM: Creates
an empty zip file entry</a></td><td>Bad practice</td></tr> |
63 <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> | 65 <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> |
64 <tr bgcolor="#ffffff"><td><a href="#BIT_SIGNED_CHECK">BIT: Check for sign of bit
wise operation</a></td><td>Bad practice</td></tr> | 66 <tr bgcolor="#ffffff"><td><a href="#BIT_SIGNED_CHECK">BIT: Check for sign of bit
wise operation</a></td><td>Bad practice</td></tr> |
65 <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> | 67 <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> |
66 <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> | 68 <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> |
67 <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> | 69 <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> |
68 <tr bgcolor="#ffffff"><td><a href="#CO_ABSTRACT_SELF">Co: Abstract class defines
covariant compareTo() method</a></td><td>Bad practice</td></tr> | 70 <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> |
69 <tr bgcolor="#eeeeee"><td><a href="#CO_SELF_NO_OBJECT">Co: Covariant compareTo()
method defined</a></td><td>Bad practice</td></tr> | 71 <tr bgcolor="#eeeeee"><td><a href="#CO_ABSTRACT_SELF">Co: Abstract class defines
covariant compareTo() method</a></td><td>Bad practice</td></tr> |
70 <tr bgcolor="#ffffff"><td><a href="#DE_MIGHT_DROP">DE: Method might drop excepti
on</a></td><td>Bad practice</td></tr> | 72 <tr bgcolor="#ffffff"><td><a href="#CO_SELF_NO_OBJECT">Co: Covariant compareTo()
method defined</a></td><td>Bad practice</td></tr> |
71 <tr bgcolor="#eeeeee"><td><a href="#DE_MIGHT_IGNORE">DE: Method might ignore exc
eption</a></td><td>Bad practice</td></tr> | 73 <tr bgcolor="#eeeeee"><td><a href="#DE_MIGHT_DROP">DE: Method might drop excepti
on</a></td><td>Bad practice</td></tr> |
72 <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> | 74 <tr bgcolor="#ffffff"><td><a href="#DE_MIGHT_IGNORE">DE: Method might ignore exc
eption</a></td><td>Bad practice</td></tr> |
73 <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> | 75 <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> |
74 <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> | 76 <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> |
75 <tr bgcolor="#eeeeee"><td><a href="#DM_EXIT">Dm: Method invokes System.exit(...)
</a></td><td>Bad practice</td></tr> | 77 <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> |
76 <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> | 78 <tr bgcolor="#ffffff"><td><a href="#DM_EXIT">Dm: Method invokes System.exit(...)
</a></td><td>Bad practice</td></tr> |
77 <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> | 79 <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> |
78 <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> | 80 <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> |
79 <tr bgcolor="#eeeeee"><td><a href="#EQ_ABSTRACT_SELF">Eq: Abstract class defines
covariant equals() method</a></td><td>Bad practice</td></tr> | 81 <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> |
80 <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> | 82 <tr bgcolor="#ffffff"><td><a href="#EQ_ABSTRACT_SELF">Eq: Abstract class defines
covariant equals() method</a></td><td>Bad practice</td></tr> |
81 <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> | 83 <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> |
82 <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> | 84 <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> |
83 <tr bgcolor="#eeeeee"><td><a href="#EQ_SELF_NO_OBJECT">Eq: Covariant equals() me
thod defined</a></td><td>Bad practice</td></tr> | 85 <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> |
84 <tr bgcolor="#ffffff"><td><a href="#FI_EMPTY">FI: Empty finalizer should be dele
ted</a></td><td>Bad practice</td></tr> | 86 <tr bgcolor="#ffffff"><td><a href="#EQ_SELF_NO_OBJECT">Eq: Covariant equals() me
thod defined</a></td><td>Bad practice</td></tr> |
85 <tr bgcolor="#eeeeee"><td><a href="#FI_EXPLICIT_INVOCATION">FI: Explicit invocat
ion of finalizer</a></td><td>Bad practice</td></tr> | 87 <tr bgcolor="#eeeeee"><td><a href="#FI_EMPTY">FI: Empty finalizer should be dele
ted</a></td><td>Bad practice</td></tr> |
86 <tr bgcolor="#ffffff"><td><a href="#FI_FINALIZER_NULLS_FIELDS">FI: Finalizer nul
ls fields</a></td><td>Bad practice</td></tr> | 88 <tr bgcolor="#ffffff"><td><a href="#FI_EXPLICIT_INVOCATION">FI: Explicit invocat
ion of finalizer</a></td><td>Bad practice</td></tr> |
87 <tr bgcolor="#eeeeee"><td><a href="#FI_FINALIZER_ONLY_NULLS_FIELDS">FI: Finalize
r only nulls fields</a></td><td>Bad practice</td></tr> | 89 <tr bgcolor="#eeeeee"><td><a href="#FI_FINALIZER_NULLS_FIELDS">FI: Finalizer nul
ls fields</a></td><td>Bad practice</td></tr> |
88 <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> | 90 <tr bgcolor="#ffffff"><td><a href="#FI_FINALIZER_ONLY_NULLS_FIELDS">FI: Finalize
r only nulls fields</a></td><td>Bad practice</td></tr> |
89 <tr bgcolor="#eeeeee"><td><a href="#FI_NULLIFY_SUPER">FI: Finalizer nullifies su
perclass finalizer</a></td><td>Bad practice</td></tr> | 91 <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> |
90 <tr bgcolor="#ffffff"><td><a href="#FI_USELESS">FI: Finalizer does nothing but c
all superclass finalizer</a></td><td>Bad practice</td></tr> | 92 <tr bgcolor="#ffffff"><td><a href="#FI_NULLIFY_SUPER">FI: Finalizer nullifies su
perclass finalizer</a></td><td>Bad practice</td></tr> |
91 <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> | 93 <tr bgcolor="#eeeeee"><td><a href="#FI_USELESS">FI: Finalizer does nothing but c
all superclass finalizer</a></td><td>Bad practice</td></tr> |
92 <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> | 94 <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> |
93 <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> | 95 <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> |
94 <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> | 96 <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> |
95 <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> | 97 <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> |
96 <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> | 98 <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> |
97 <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> | 99 <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> |
98 <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> | 100 <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> |
99 <tr bgcolor="#eeeeee"><td><a href="#IMSE_DONT_CATCH_IMSE">IMSE: Dubious catching
of IllegalMonitorStateException</a></td><td>Bad practice</td></tr> | 101 <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> |
100 <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> | 102 <tr bgcolor="#ffffff"><td><a href="#IMSE_DONT_CATCH_IMSE">IMSE: Dubious catching
of IllegalMonitorStateException</a></td><td>Bad practice</td></tr> |
101 <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> | 103 <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> |
102 <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> | 104 <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> |
103 <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> | 105 <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> |
104 <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> | 106 <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> |
105 <tr bgcolor="#eeeeee"><td><a href="#NP_CLONE_COULD_RETURN_NULL">NP: Clone method
may return null</a></td><td>Bad practice</td></tr> | 107 <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> |
106 <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> | 108 <tr bgcolor="#ffffff"><td><a href="#NP_CLONE_COULD_RETURN_NULL">NP: Clone method
may return null</a></td><td>Bad practice</td></tr> |
107 <tr bgcolor="#eeeeee"><td><a href="#NP_TOSTRING_COULD_RETURN_NULL">NP: toString
method may return null</a></td><td>Bad practice</td></tr> | 109 <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> |
108 <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> | 110 <tr bgcolor="#ffffff"><td><a href="#NP_TOSTRING_COULD_RETURN_NULL">NP: toString
method may return null</a></td><td>Bad practice</td></tr> |
109 <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> | 111 <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> |
110 <tr bgcolor="#ffffff"><td><a href="#NM_CONFUSING">Nm: Confusing method names</a>
</td><td>Bad practice</td></tr> | 112 <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> |
111 <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> | 113 <tr bgcolor="#eeeeee"><td><a href="#NM_CONFUSING">Nm: Confusing method names</a>
</td><td>Bad practice</td></tr> |
112 <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> | 114 <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> |
113 <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> | 115 <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> |
114 <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> | 116 <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> |
115 <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> | 117 <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> |
116 <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> | 118 <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> |
117 <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> | 119 <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> |
118 <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> | 120 <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> |
119 <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> | 121 <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> |
120 <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> | 122 <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> |
121 <tr bgcolor="#eeeeee"><td><a href="#OS_OPEN_STREAM">OS: Method may fail to close
stream</a></td><td>Bad practice</td></tr> | 123 <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> |
122 <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> | 124 <tr bgcolor="#ffffff"><td><a href="#OS_OPEN_STREAM">OS: Method may fail to close
stream</a></td><td>Bad practice</td></tr> |
123 <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> | 125 <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> |
124 <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> | 126 <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> |
125 <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> | 127 <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> |
126 <tr bgcolor="#ffffff"><td><a href="#RR_NOT_CHECKED">RR: Method ignores results o
f InputStream.read()</a></td><td>Bad practice</td></tr> | 128 <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> |
127 <tr bgcolor="#eeeeee"><td><a href="#SR_NOT_CHECKED">RR: Method ignores results o
f InputStream.skip()</a></td><td>Bad practice</td></tr> | 129 <tr bgcolor="#eeeeee"><td><a href="#RR_NOT_CHECKED">RR: Method ignores results o
f InputStream.read()</a></td><td>Bad practice</td></tr> |
128 <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> | 130 <tr bgcolor="#ffffff"><td><a href="#SR_NOT_CHECKED">RR: Method ignores results o
f InputStream.skip()</a></td><td>Bad practice</td></tr> |
129 <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> | 131 <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> |
130 <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> | 132 <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> |
131 <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> | 133 <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> |
132 <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> | 134 <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> |
133 <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> | 135 <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> |
134 <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> | 136 <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> |
135 <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> | 137 <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> |
136 <tr bgcolor="#ffffff"><td><a href="#SE_INNER_CLASS">Se: Serializable inner class
</a></td><td>Bad practice</td></tr> | 138 <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> |
137 <tr bgcolor="#eeeeee"><td><a href="#SE_NONFINAL_SERIALVERSIONID">Se: serialVersi
onUID isn't final</a></td><td>Bad practice</td></tr> | 139 <tr bgcolor="#eeeeee"><td><a href="#SE_INNER_CLASS">Se: Serializable inner class
</a></td><td>Bad practice</td></tr> |
138 <tr bgcolor="#ffffff"><td><a href="#SE_NONLONG_SERIALVERSIONID">Se: serialVersio
nUID isn't long</a></td><td>Bad practice</td></tr> | 140 <tr bgcolor="#ffffff"><td><a href="#SE_NONFINAL_SERIALVERSIONID">Se: serialVersi
onUID isn't final</a></td><td>Bad practice</td></tr> |
139 <tr bgcolor="#eeeeee"><td><a href="#SE_NONSTATIC_SERIALVERSIONID">Se: serialVers
ionUID isn't static</a></td><td>Bad practice</td></tr> | 141 <tr bgcolor="#eeeeee"><td><a href="#SE_NONLONG_SERIALVERSIONID">Se: serialVersio
nUID isn't long</a></td><td>Bad practice</td></tr> |
140 <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> | 142 <tr bgcolor="#ffffff"><td><a href="#SE_NONSTATIC_SERIALVERSIONID">Se: serialVers
ionUID isn't static</a></td><td>Bad practice</td></tr> |
141 <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> | 143 <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> |
142 <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> | 144 <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> |
143 <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> | 145 <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> |
144 <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> | 146 <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> |
145 <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> | 147 <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> |
146 <tr bgcolor="#ffffff"><td><a href="#BAC_BAD_APPLET_CONSTRUCTOR">BAC: Bad Applet
Constructor relies on uninitialized AppletStub</a></td><td>Correctness</td></tr> | 148 <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> |
147 <tr bgcolor="#eeeeee"><td><a href="#BC_IMPOSSIBLE_CAST">BC: Impossible cast</a><
/td><td>Correctness</td></tr> | 149 <tr bgcolor="#eeeeee"><td><a href="#BAC_BAD_APPLET_CONSTRUCTOR">BAC: Bad Applet
Constructor relies on uninitialized AppletStub</a></td><td>Correctness</td></tr> |
148 <tr bgcolor="#ffffff"><td><a href="#BC_IMPOSSIBLE_DOWNCAST">BC: Impossible downc
ast</a></td><td>Correctness</td></tr> | 150 <tr bgcolor="#ffffff"><td><a href="#BC_IMPOSSIBLE_CAST">BC: Impossible cast</a><
/td><td>Correctness</td></tr> |
149 <tr bgcolor="#eeeeee"><td><a href="#BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY">BC: Impos
sible downcast of toArray() result</a></td><td>Correctness</td></tr> | 151 <tr bgcolor="#eeeeee"><td><a href="#BC_IMPOSSIBLE_DOWNCAST">BC: Impossible downc
ast</a></td><td>Correctness</td></tr> |
150 <tr bgcolor="#ffffff"><td><a href="#BC_IMPOSSIBLE_INSTANCEOF">BC: instanceof wil
l always return false</a></td><td>Correctness</td></tr> | 152 <tr bgcolor="#ffffff"><td><a href="#BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY">BC: Impos
sible downcast of toArray() result</a></td><td>Correctness</td></tr> |
151 <tr bgcolor="#eeeeee"><td><a href="#BIT_ADD_OF_SIGNED_BYTE">BIT: Bitwise add of
signed byte value</a></td><td>Correctness</td></tr> | 153 <tr bgcolor="#eeeeee"><td><a href="#BC_IMPOSSIBLE_INSTANCEOF">BC: instanceof wil
l always return false</a></td><td>Correctness</td></tr> |
152 <tr bgcolor="#ffffff"><td><a href="#BIT_AND">BIT: Incompatible bit masks</a></td
><td>Correctness</td></tr> | 154 <tr bgcolor="#ffffff"><td><a href="#BIT_ADD_OF_SIGNED_BYTE">BIT: Bitwise add of
signed byte value</a></td><td>Correctness</td></tr> |
153 <tr bgcolor="#eeeeee"><td><a href="#BIT_AND_ZZ">BIT: Check to see if ((...) & 0)
== 0</a></td><td>Correctness</td></tr> | 155 <tr bgcolor="#eeeeee"><td><a href="#BIT_AND">BIT: Incompatible bit masks</a></td
><td>Correctness</td></tr> |
154 <tr bgcolor="#ffffff"><td><a href="#BIT_IOR">BIT: Incompatible bit masks</a></td
><td>Correctness</td></tr> | 156 <tr bgcolor="#ffffff"><td><a href="#BIT_AND_ZZ">BIT: Check to see if ((...) & 0)
== 0</a></td><td>Correctness</td></tr> |
155 <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> | 157 <tr bgcolor="#eeeeee"><td><a href="#BIT_IOR">BIT: Incompatible bit masks</a></td
><td>Correctness</td></tr> |
156 <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> | 158 <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> |
157 <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> | 159 <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> |
158 <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> | 160 <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> |
159 <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> | 161 <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> |
160 <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> | 162 <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> |
161 <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> | 163 <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> |
162 <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> | 164 <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> |
163 <tr bgcolor="#eeeeee"><td><a href="#DLS_OVERWRITTEN_INCREMENT">DLS: Overwritten
increment</a></td><td>Correctness</td></tr> | 165 <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> |
164 <tr bgcolor="#ffffff"><td><a href="#DMI_ARGUMENTS_WRONG_ORDER">DMI: Reversed met
hod arguments</a></td><td>Correctness</td></tr> | 166 <tr bgcolor="#ffffff"><td><a href="#DLS_OVERWRITTEN_INCREMENT">DLS: Overwritten
increment</a></td><td>Correctness</td></tr> |
165 <tr bgcolor="#eeeeee"><td><a href="#DMI_BAD_MONTH">DMI: Bad constant value for m
onth</a></td><td>Correctness</td></tr> | 167 <tr bgcolor="#eeeeee"><td><a href="#DMI_ARGUMENTS_WRONG_ORDER">DMI: Reversed met
hod arguments</a></td><td>Correctness</td></tr> |
166 <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> | 168 <tr bgcolor="#ffffff"><td><a href="#DMI_BAD_MONTH">DMI: Bad constant value for m
onth</a></td><td>Correctness</td></tr> |
167 <tr bgcolor="#eeeeee"><td><a href="#DMI_CALLING_NEXT_FROM_HASNEXT">DMI: hasNext
method invokes next</a></td><td>Correctness</td></tr> | 169 <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> |
168 <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> | 170 <tr bgcolor="#ffffff"><td><a href="#DMI_CALLING_NEXT_FROM_HASNEXT">DMI: hasNext
method invokes next</a></td><td>Correctness</td></tr> |
169 <tr bgcolor="#eeeeee"><td><a href="#DMI_DOH">DMI: D'oh! A nonsensical method inv
ocation</a></td><td>Correctness</td></tr> | 171 <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> |
170 <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> | 172 <tr bgcolor="#ffffff"><td><a href="#DMI_DOH">DMI: D'oh! A nonsensical method inv
ocation</a></td><td>Correctness</td></tr> |
171 <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> | 173 <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> |
172 <tr bgcolor="#ffffff"><td><a href="#DMI_VACUOUS_SELF_COLLECTION_CALL">DMI: Vacuo
us call to collections</a></td><td>Correctness</td></tr> | 174 <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> |
173 <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> | 175 <tr bgcolor="#eeeeee"><td><a href="#DMI_VACUOUS_SELF_COLLECTION_CALL">DMI: Vacuo
us call to collections</a></td><td>Correctness</td></tr> |
174 <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> | 176 <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> |
175 <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> | 177 <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> |
176 <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> | 178 <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> |
177 <tr bgcolor="#eeeeee"><td><a href="#EC_ARRAY_AND_NONARRAY">EC: equals() used to
compare array and nonarray</a></td><td>Correctness</td></tr> | 179 <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> |
178 <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> | 180 <tr bgcolor="#ffffff"><td><a href="#EC_ARRAY_AND_NONARRAY">EC: equals() used to
compare array and nonarray</a></td><td>Correctness</td></tr> |
179 <tr bgcolor="#eeeeee"><td><a href="#EC_INCOMPATIBLE_ARRAY_COMPARE">EC: equals(..
.) used to compare incompatible arrays</a></td><td>Correctness</td></tr> | 181 <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> |
180 <tr bgcolor="#ffffff"><td><a href="#EC_NULL_ARG">EC: Call to equals(null)</a></t
d><td>Correctness</td></tr> | 182 <tr bgcolor="#ffffff"><td><a href="#EC_INCOMPATIBLE_ARRAY_COMPARE">EC: equals(..
.) used to compare incompatible arrays</a></td><td>Correctness</td></tr> |
181 <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> | 183 <tr bgcolor="#eeeeee"><td><a href="#EC_NULL_ARG">EC: Call to equals(null)</a></t
d><td>Correctness</td></tr> |
182 <tr bgcolor="#ffffff"><td><a href="#EC_UNRELATED_INTERFACES">EC: Call to equals(
) comparing different interface types</a></td><td>Correctness</td></tr> | 184 <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> |
183 <tr bgcolor="#eeeeee"><td><a href="#EC_UNRELATED_TYPES">EC: Call to equals() com
paring different types</a></td><td>Correctness</td></tr> | 185 <tr bgcolor="#eeeeee"><td><a href="#EC_UNRELATED_INTERFACES">EC: Call to equals(
) comparing different interface types</a></td><td>Correctness</td></tr> |
184 <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> | 186 <tr bgcolor="#ffffff"><td><a href="#EC_UNRELATED_TYPES">EC: Call to equals() com
paring different types</a></td><td>Correctness</td></tr> |
185 <tr bgcolor="#eeeeee"><td><a href="#EQ_ALWAYS_FALSE">Eq: equals method always re
turns false</a></td><td>Correctness</td></tr> | 187 <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> |
186 <tr bgcolor="#ffffff"><td><a href="#EQ_ALWAYS_TRUE">Eq: equals method always ret
urns true</a></td><td>Correctness</td></tr> | 188 <tr bgcolor="#ffffff"><td><a href="#EQ_ALWAYS_FALSE">Eq: equals method always re
turns false</a></td><td>Correctness</td></tr> |
187 <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> | 189 <tr bgcolor="#eeeeee"><td><a href="#EQ_ALWAYS_TRUE">Eq: equals method always ret
urns true</a></td><td>Correctness</td></tr> |
188 <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> | 190 <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> |
189 <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> | 191 <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> |
190 <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> | 192 <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> |
191 <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> | 193 <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> |
192 <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> | 194 <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> |
193 <tr bgcolor="#eeeeee"><td><a href="#FB_MISSING_EXPECTED_WARNING">FB: Missing exp
ected or desired warning from FindBugs</a></td><td>Correctness</td></tr> | 195 <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> |
194 <tr bgcolor="#ffffff"><td><a href="#FB_UNEXPECTED_WARNING">FB: Unexpected/undesi
red warning from FindBugs</a></td><td>Correctness</td></tr> | 196 <tr bgcolor="#ffffff"><td><a href="#FB_MISSING_EXPECTED_WARNING">FB: Missing exp
ected or desired warning from FindBugs</a></td><td>Correctness</td></tr> |
195 <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> | 197 <tr bgcolor="#eeeeee"><td><a href="#FB_UNEXPECTED_WARNING">FB: Unexpected/undesi
red warning from FindBugs</a></td><td>Correctness</td></tr> |
196 <tr bgcolor="#ffffff"><td><a href="#FL_MATH_USING_FLOAT_PRECISION">FL: Method pe
rforms math using floating point precision</a></td><td>Correctness</td></tr> | 198 <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> |
197 <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> | 199 <tr bgcolor="#eeeeee"><td><a href="#FL_MATH_USING_FLOAT_PRECISION">FL: Method pe
rforms math using floating point precision</a></td><td>Correctness</td></tr> |
198 <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> | 200 <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> |
199 <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> | 201 <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> |
200 <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> | 202 <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> |
201 <tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_ILLEGAL">FS: Illegal format
string</a></td><td>Correctness</td></tr> | 203 <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> |
202 <tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_MISSING_ARGUMENT">FS: Forma
t string references missing argument</a></td><td>Correctness</td></tr> | 204 <tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_ILLEGAL">FS: Illegal format
string</a></td><td>Correctness</td></tr> |
203 <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> | 205 <tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_MISSING_ARGUMENT">FS: Forma
t string references missing argument</a></td><td>Correctness</td></tr> |
204 <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> | 206 <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> |
205 <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> | 207 <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> |
206 <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> | 208 <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> |
207 <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> | 209 <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> |
208 <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> | 210 <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> |
209 <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> | 211 <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> |
210 <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> | 212 <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> |
211 <tr bgcolor="#eeeeee"><td><a href="#IJU_BAD_SUITE_METHOD">IJU: TestCase declares
a bad suite method </a></td><td>Correctness</td></tr> | 213 <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> |
212 <tr bgcolor="#ffffff"><td><a href="#IJU_NO_TESTS">IJU: TestCase has no tests</a>
</td><td>Correctness</td></tr> | 214 <tr bgcolor="#ffffff"><td><a href="#IJU_BAD_SUITE_METHOD">IJU: TestCase declares
a bad suite method </a></td><td>Correctness</td></tr> |
213 <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> | 215 <tr bgcolor="#eeeeee"><td><a href="#IJU_NO_TESTS">IJU: TestCase has no tests</a>
</td><td>Correctness</td></tr> |
214 <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> | 216 <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> |
215 <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> | 217 <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> |
216 <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> | 218 <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> |
217 <tr bgcolor="#eeeeee"><td><a href="#IL_INFINITE_LOOP">IL: An apparent infinite l
oop</a></td><td>Correctness</td></tr> | 219 <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> |
218 <tr bgcolor="#ffffff"><td><a href="#IL_INFINITE_RECURSIVE_LOOP">IL: An apparent
infinite recursive loop</a></td><td>Correctness</td></tr> | 220 <tr bgcolor="#ffffff"><td><a href="#IL_INFINITE_LOOP">IL: An apparent infinite l
oop</a></td><td>Correctness</td></tr> |
219 <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> | 221 <tr bgcolor="#eeeeee"><td><a href="#IL_INFINITE_RECURSIVE_LOOP">IL: An apparent
infinite recursive loop</a></td><td>Correctness</td></tr> |
220 <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> | 222 <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> |
221 <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> | 223 <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> |
222 <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> | 224 <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> |
223 <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> | 225 <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> |
224 <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> | 226 <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> |
225 <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> | 227 <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> |
226 <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> | 228 <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> |
227 <tr bgcolor="#eeeeee"><td><a href="#NP_ALWAYS_NULL">NP: Null pointer dereference
</a></td><td>Correctness</td></tr> | 229 <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> |
228 <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> | 230 <tr bgcolor="#ffffff"><td><a href="#NP_ALWAYS_NULL">NP: Null pointer dereference
</a></td><td>Correctness</td></tr> |
229 <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> | 231 <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> |
230 <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> | 232 <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> |
231 <tr bgcolor="#eeeeee"><td><a href="#NP_GUARANTEED_DEREF">NP: Null value is guara
nteed to be dereferenced</a></td><td>Correctness</td></tr> | 233 <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> |
232 <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> | 234 <tr bgcolor="#ffffff"><td><a href="#NP_GUARANTEED_DEREF">NP: Null value is guara
nteed to be dereferenced</a></td><td>Correctness</td></tr> |
233 <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> | 235 <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> |
234 <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> | 236 <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> |
235 <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> | 237 <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> |
236 <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
> | 238 <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> |
237 <tr bgcolor="#eeeeee"><td><a href="#NP_NULL_ON_SOME_PATH">NP: Possible null poin
ter dereference</a></td><td>Correctness</td></tr> | 239 <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
> |
238 <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> | 240 <tr bgcolor="#ffffff"><td><a href="#NP_NULL_ON_SOME_PATH">NP: Possible null poin
ter dereference</a></td><td>Correctness</td></tr> |
239 <tr bgcolor="#eeeeee"><td><a href="#NP_NULL_PARAM_DEREF">NP: Method call passes
null for nonnull parameter</a></td><td>Correctness</td></tr> | 241 <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> |
240 <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> | 242 <tr bgcolor="#ffffff"><td><a href="#NP_NULL_PARAM_DEREF">NP: Method call passes
null for nonnull parameter</a></td><td>Correctness</td></tr> |
241 <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> | 243 <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> |
| 244 <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> |
| 245 <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> |
242 <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> | 246 <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> |
243 <tr bgcolor="#eeeeee"><td><a href="#NP_UNWRITTEN_FIELD">NP: Read of unwritten fi
eld</a></td><td>Correctness</td></tr> | 247 <tr bgcolor="#eeeeee"><td><a href="#NP_UNWRITTEN_FIELD">NP: Read of unwritten fi
eld</a></td><td>Correctness</td></tr> |
244 <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> | 248 <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> |
245 <tr bgcolor="#eeeeee"><td><a href="#NM_LCASE_HASHCODE">Nm: Class defines hashcod
e(); should it be hashCode()?</a></td><td>Correctness</td></tr> | 249 <tr bgcolor="#eeeeee"><td><a href="#NM_LCASE_HASHCODE">Nm: Class defines hashcod
e(); should it be hashCode()?</a></td><td>Correctness</td></tr> |
246 <tr bgcolor="#ffffff"><td><a href="#NM_LCASE_TOSTRING">Nm: Class defines tostrin
g(); should it be toString()?</a></td><td>Correctness</td></tr> | 250 <tr bgcolor="#ffffff"><td><a href="#NM_LCASE_TOSTRING">Nm: Class defines tostrin
g(); should it be toString()?</a></td><td>Correctness</td></tr> |
247 <tr bgcolor="#eeeeee"><td><a href="#NM_METHOD_CONSTRUCTOR_CONFUSION">Nm: Apparen
t method/constructor confusion</a></td><td>Correctness</td></tr> | 251 <tr bgcolor="#eeeeee"><td><a href="#NM_METHOD_CONSTRUCTOR_CONFUSION">Nm: Apparen
t method/constructor confusion</a></td><td>Correctness</td></tr> |
248 <tr bgcolor="#ffffff"><td><a href="#NM_VERY_CONFUSING">Nm: Very confusing method
names</a></td><td>Correctness</td></tr> | 252 <tr bgcolor="#ffffff"><td><a href="#NM_VERY_CONFUSING">Nm: Very confusing method
names</a></td><td>Correctness</td></tr> |
249 <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> | 253 <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> |
250 <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> | 254 <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> |
251 <tr bgcolor="#eeeeee"><td><a href="#RC_REF_COMPARISON">RC: Suspicious reference
comparison</a></td><td>Correctness</td></tr> | 255 <tr bgcolor="#eeeeee"><td><a href="#RC_REF_COMPARISON">RC: Suspicious reference
comparison</a></td><td>Correctness</td></tr> |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 <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> | 376 <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> |
373 <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> | 377 <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> |
374 <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> | 378 <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> |
375 <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> | 379 <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> |
376 <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> | 380 <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> |
377 <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> | 381 <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> |
378 <tr bgcolor="#ffffff"><td><a href="#DM_STRING_CTOR">Dm: Method invokes inefficie
nt new String(String) constructor</a></td><td>Performance</td></tr> | 382 <tr bgcolor="#ffffff"><td><a href="#DM_STRING_CTOR">Dm: Method invokes inefficie
nt new String(String) constructor</a></td><td>Performance</td></tr> |
379 <tr bgcolor="#eeeeee"><td><a href="#DM_STRING_TOSTRING">Dm: Method invokes toStr
ing() method on a String</a></td><td>Performance</td></tr> | 383 <tr bgcolor="#eeeeee"><td><a href="#DM_STRING_TOSTRING">Dm: Method invokes toStr
ing() method on a String</a></td><td>Performance</td></tr> |
380 <tr bgcolor="#ffffff"><td><a href="#DM_STRING_VOID_CTOR">Dm: Method invokes inef
ficient new String() constructor</a></td><td>Performance</td></tr> | 384 <tr bgcolor="#ffffff"><td><a href="#DM_STRING_VOID_CTOR">Dm: Method invokes inef
ficient new String() constructor</a></td><td>Performance</td></tr> |
381 <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> | 385 <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> |
| 386 <tr bgcolor="#ffffff"><td><a href="#IIO_INEFFICIENT_INDEX_OF">IIO: Inefficient u
se of String.indexOf(String)</a></td><td>Performance</td></tr> |
| 387 <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> |
382 <tr bgcolor="#ffffff"><td><a href="#IMA_INEFFICIENT_MEMBER_ACCESS">IMA: Method a
ccesses a private member variable of owning class</a></td><td>Performance</td></
tr> | 388 <tr bgcolor="#ffffff"><td><a href="#IMA_INEFFICIENT_MEMBER_ACCESS">IMA: Method a
ccesses a private member variable of owning class</a></td><td>Performance</td></
tr> |
383 <tr bgcolor="#eeeeee"><td><a href="#ITA_INEFFICIENT_TO_ARRAY">ITA: Method uses t
oArray() with zero-length array argument</a></td><td>Performance</td></tr> | 389 <tr bgcolor="#eeeeee"><td><a href="#ITA_INEFFICIENT_TO_ARRAY">ITA: Method uses t
oArray() with zero-length array argument</a></td><td>Performance</td></tr> |
384 <tr bgcolor="#ffffff"><td><a href="#SBSC_USE_STRINGBUFFER_CONCATENATION">SBSC: M
ethod concatenates strings using + in a loop</a></td><td>Performance</td></tr> | 390 <tr bgcolor="#ffffff"><td><a href="#SBSC_USE_STRINGBUFFER_CONCATENATION">SBSC: M
ethod concatenates strings using + in a loop</a></td><td>Performance</td></tr> |
385 <tr bgcolor="#eeeeee"><td><a href="#SIC_INNER_SHOULD_BE_STATIC">SIC: Should be a
static inner class</a></td><td>Performance</td></tr> | 391 <tr bgcolor="#eeeeee"><td><a href="#SIC_INNER_SHOULD_BE_STATIC">SIC: Should be a
static inner class</a></td><td>Performance</td></tr> |
386 <tr bgcolor="#ffffff"><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> | 392 <tr bgcolor="#ffffff"><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> |
387 <tr bgcolor="#eeeeee"><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> | 393 <tr bgcolor="#eeeeee"><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> |
388 <tr bgcolor="#ffffff"><td><a href="#SS_SHOULD_BE_STATIC">SS: Unread field: shoul
d this field be static?</a></td><td>Performance</td></tr> | 394 <tr bgcolor="#ffffff"><td><a href="#SS_SHOULD_BE_STATIC">SS: Unread field: shoul
d this field be static?</a></td><td>Performance</td></tr> |
389 <tr bgcolor="#eeeeee"><td><a href="#UM_UNNECESSARY_MATH">UM: Method calls static
Math class method on a constant value</a></td><td>Performance</td></tr> | 395 <tr bgcolor="#eeeeee"><td><a href="#UM_UNNECESSARY_MATH">UM: Method calls static
Math class method on a constant value</a></td><td>Performance</td></tr> |
390 <tr bgcolor="#ffffff"><td><a href="#UPM_UNCALLED_PRIVATE_METHOD">UPM: Private me
thod is never called</a></td><td>Performance</td></tr> | 396 <tr bgcolor="#ffffff"><td><a href="#UPM_UNCALLED_PRIVATE_METHOD">UPM: Private me
thod is never called</a></td><td>Performance</td></tr> |
391 <tr bgcolor="#eeeeee"><td><a href="#URF_UNREAD_FIELD">UrF: Unread field</a></td>
<td>Performance</td></tr> | 397 <tr bgcolor="#eeeeee"><td><a href="#URF_UNREAD_FIELD">UrF: Unread field</a></td>
<td>Performance</td></tr> |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 | 559 |
554 <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> | 560 <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> |
555 | 561 |
556 | 562 |
557 <p> This class defines a clone() method but the class doesn't implement Cloneabl
e. | 563 <p> This class defines a clone() method but the class doesn't implement Cloneabl
e. |
558 There are some situations in which this is OK (e.g., you want to control how sub
classes | 564 There are some situations in which this is OK (e.g., you want to control how sub
classes |
559 can clone themselves), but just make sure that this is what you intended. | 565 can clone themselves), but just make sure that this is what you intended. |
560 </p> | 566 </p> |
561 | 567 |
562 | 568 |
| 569 <h3><a name="CNT_ROUGH_CONSTANT_VALUE">CNT: Rough value of known constant found
(CNT_ROUGH_CONSTANT_VALUE)</a></h3> |
| 570 |
| 571 |
| 572 <p>It's recommended to use the predefined library constant for code clarity
and better precision.</p> |
| 573 |
| 574 |
563 <h3><a name="CO_ABSTRACT_SELF">Co: Abstract class defines covariant compareTo()
method (CO_ABSTRACT_SELF)</a></h3> | 575 <h3><a name="CO_ABSTRACT_SELF">Co: Abstract class defines covariant compareTo()
method (CO_ABSTRACT_SELF)</a></h3> |
564 | 576 |
565 | 577 |
566 <p> This class defines a covariant version of <code>compareTo()</code>. | 578 <p> This class defines a covariant version of <code>compareTo()</code>. |
567 To correctly override the <code>compareTo()</code> method in the | 579 To correctly override the <code>compareTo()</code> method in the |
568 <code>Comparable</code> interface, the parameter of <code>compareTo()</code> | 580 <code>Comparable</code> interface, the parameter of <code>compareTo()</code> |
569 must have type <code>java.lang.Object</code>.</p> | 581 must have type <code>java.lang.Object</code>.</p> |
570 | 582 |
571 | 583 |
572 <h3><a name="CO_SELF_NO_OBJECT">Co: Covariant compareTo() method defined (CO_SEL
F_NO_OBJECT)</a></h3> | 584 <h3><a name="CO_SELF_NO_OBJECT">Co: Covariant compareTo() method defined (CO_SEL
F_NO_OBJECT)</a></h3> |
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1629 the constant Integer.MIN_VALUE, which is an exceptionally bad practice. | 1641 the constant Integer.MIN_VALUE, which is an exceptionally bad practice. |
1630 The only thing that matters about the return value of compareTo is the sign of
the result. | 1642 The only thing that matters about the return value of compareTo is the sign of
the result. |
1631 But people will sometimes negate the return value of compareTo, expecting th
at this will negate | 1643 But people will sometimes negate the return value of compareTo, expecting th
at this will negate |
1632 the sign of the result. And it will, except in the case where the value retu
rned is Integer.MIN_VALUE. | 1644 the sign of the result. And it will, except in the case where the value retu
rned is Integer.MIN_VALUE. |
1633 So just return -1 rather than Integer.MIN_VALUE. | 1645 So just return -1 rather than Integer.MIN_VALUE. |
1634 | 1646 |
1635 | 1647 |
1636 <h3><a name="DLS_DEAD_LOCAL_INCREMENT_IN_RETURN">DLS: Useless increment in retur
n statement (DLS_DEAD_LOCAL_INCREMENT_IN_RETURN)</a></h3> | 1648 <h3><a name="DLS_DEAD_LOCAL_INCREMENT_IN_RETURN">DLS: Useless increment in retur
n statement (DLS_DEAD_LOCAL_INCREMENT_IN_RETURN)</a></h3> |
1637 | 1649 |
1638 | 1650 |
1639 <p>This statement has a return such as <code>return x++;</code>. | 1651 <p>This statement has a return such as <code>return x++;</code>. |
1640 A postfix increment/decrement does not impact the value of the expression, | 1652 A postfix increment/decrement does not impact the value of the expression, |
1641 so this increment/decrement has no effect. | 1653 so this increment/decrement has no effect. |
1642 Please verify that this statement does the right thing. | 1654 Please verify that this statement does the right thing. |
1643 </p> | 1655 </p> |
1644 | 1656 |
1645 | 1657 |
1646 <h3><a name="DLS_DEAD_STORE_OF_CLASS_LITERAL">DLS: Dead store of class literal (
DLS_DEAD_STORE_OF_CLASS_LITERAL)</a></h3> | 1658 <h3><a name="DLS_DEAD_STORE_OF_CLASS_LITERAL">DLS: Dead store of class literal (
DLS_DEAD_STORE_OF_CLASS_LITERAL)</a></h3> |
1647 | 1659 |
1648 | 1660 |
1649 <p> | 1661 <p> |
1650 This instruction assigns a class literal to a variable and then never uses it. | 1662 This instruction assigns a class literal to a variable and then never uses it. |
1651 <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> | 1663 <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 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2522 | 2534 |
2523 | 2535 |
2524 <p> | 2536 <p> |
2525 A possibly-null value is passed to a nonnull method parameter. | 2537 A possibly-null value is passed to a nonnull method parameter. |
2526 Either the parameter is annotated as a parameter that should | 2538 Either the parameter is annotated as a parameter that should |
2527 always be nonnull, or analysis has shown that it will always be | 2539 always be nonnull, or analysis has shown that it will always be |
2528 dereferenced. | 2540 dereferenced. |
2529 </p> | 2541 </p> |
2530 | 2542 |
2531 | 2543 |
| 2544 <h3><a name="NP_OPTIONAL_RETURN_NULL">NP: Method with Optional return type retur
ns explicit null (NP_OPTIONAL_RETURN_NULL)</a></h3> |
| 2545 |
| 2546 |
| 2547 <p> |
| 2548 The usage of Optional return type always mean that explicit null returns wer
e not desired by design. |
| 2549 Returning a null value in such case is a contract violation and will most li
kely break clients code. |
| 2550 </p> |
| 2551 |
| 2552 |
2532 <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> | 2553 <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> |
2533 | 2554 |
2534 | 2555 |
2535 <p> A value that could be null is stored into a field that has been annotated as
NonNull. </p> | 2556 <p> A value that could be null is stored into a field that has been annotated as
NonNull. </p> |
2536 | 2557 |
2537 | 2558 |
2538 <h3><a name="NP_UNWRITTEN_FIELD">NP: Read of unwritten field (NP_UNWRITTEN_FIELD
)</a></h3> | 2559 <h3><a name="NP_UNWRITTEN_FIELD">NP: Read of unwritten field (NP_UNWRITTEN_FIELD
)</a></h3> |
2539 | 2560 |
2540 | 2561 |
2541 <p> The program is dereferencing a field that does not seem to ever have a non
-null value written to it. | 2562 <p> The program is dereferencing a field that does not seem to ever have a non
-null value written to it. |
(...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4237 <p> | 4258 <p> |
4238 A large String constant is duplicated across multiple class files. | 4259 A large String constant is duplicated across multiple class files. |
4239 This is likely because a final field is initialized to a String constant, an
d the Java language | 4260 This is likely because a final field is initialized to a String constant, an
d the Java language |
4240 mandates that all references to a final field from other classes be inlined
into | 4261 mandates that all references to a final field from other classes be inlined
into |
4241 that classfile. See <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=
6447475">JDK bug 6447475</a> | 4262 that classfile. See <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=
6447475">JDK bug 6447475</a> |
4242 for a description of an occurrence of this bug in the JDK and how resolving
it reduced | 4263 for a description of an occurrence of this bug in the JDK and how resolving
it reduced |
4243 the size of the JDK by 1 megabyte. | 4264 the size of the JDK by 1 megabyte. |
4244 </p> | 4265 </p> |
4245 | 4266 |
4246 | 4267 |
| 4268 <h3><a name="IIO_INEFFICIENT_INDEX_OF">IIO: Inefficient use of String.indexOf(St
ring) (IIO_INEFFICIENT_INDEX_OF)</a></h3> |
| 4269 |
| 4270 |
| 4271 <p> This code passes a constant string of length 1 to String.indexOf(). |
| 4272 It is more efficient to use the integer implementations of String.indexOf(). |
| 4273 f. e. call <code>myString.indexOf('.')</code> instead of <code>myString.indexOf(
".")</code></p> |
| 4274 |
| 4275 |
| 4276 <h3><a name="IIO_INEFFICIENT_LAST_INDEX_OF">IIO: Inefficient use of String.lastI
ndexOf(String) (IIO_INEFFICIENT_LAST_INDEX_OF)</a></h3> |
| 4277 |
| 4278 |
| 4279 <p> This code passes a constant string of length 1 to String.lastIndexOf(). |
| 4280 It is more efficient to use the integer implementations of String.lastIndexOf(). |
| 4281 f. e. call <code>myString.lastIndexOf('.')</code> instead of <code>myString.last
IndexOf(".")</code></p> |
| 4282 |
| 4283 |
4247 <h3><a name="IMA_INEFFICIENT_MEMBER_ACCESS">IMA: Method accesses a private membe
r variable of owning class (IMA_INEFFICIENT_MEMBER_ACCESS)</a></h3> | 4284 <h3><a name="IMA_INEFFICIENT_MEMBER_ACCESS">IMA: Method accesses a private membe
r variable of owning class (IMA_INEFFICIENT_MEMBER_ACCESS)</a></h3> |
4248 | 4285 |
4249 | 4286 |
4250 <p> | 4287 <p> |
4251 This method of an inner class reads from or writes to a private member var
iable of the owning class, | 4288 This method of an inner class reads from or writes to a private member var
iable of the owning class, |
4252 or calls a private method of the owning class. The compiler must generate
a special method to access this | 4289 or calls a private method of the owning class. The compiler must generate
a special method to access this |
4253 private member, causing this to be less efficient. Relaxing the protection
of the member variable or method | 4290 private member, causing this to be less efficient. Relaxing the protection
of the member variable or method |
4254 will allow the compiler to treat this as a normal access. | 4291 will allow the compiler to treat this as a normal access. |
4255 </p> | 4292 </p> |
4256 | 4293 |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4833 <p> | 4870 <p> |
4834 An argument not of type Boolean is being formatted with a %b format specifier. T
his won't throw an | 4871 An argument not of type Boolean is being formatted with a %b format specifier. T
his won't throw an |
4835 exception; instead, it will print true for any nonnull value, and false for null
. | 4872 exception; instead, it will print true for any nonnull value, and false for null
. |
4836 This feature of format strings is strange, and may not be what you intended. | 4873 This feature of format strings is strange, and may not be what you intended. |
4837 </p> | 4874 </p> |
4838 | 4875 |
4839 | 4876 |
4840 <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> | 4877 <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> |
4841 | 4878 |
4842 | 4879 |
4843 <p> | 4880 <p> |
4844 An inner class is invoking a method that could be resolved to either a inherited
method or a method defined in an outer class. | 4881 An inner class is invoking a method that could be resolved to either a inherited
method or a method defined in an outer class. |
4845 For example, you invoke <code>foo(17)</code>, which is defined in both a supercl
ass and in an outer method. | 4882 For example, you invoke <code>foo(17)</code>, which is defined in both a supercl
ass and in an outer method. |
4846 By the Java semantics, | 4883 By the Java semantics, |
4847 it will be resolved to invoke the inherited method, but this may not be want | 4884 it will be resolved to invoke the inherited method, but this may not be want |
4848 you intend. | 4885 you intend. |
4849 </p> | 4886 </p> |
4850 <p>If you really intend to invoke the inherited method, | 4887 <p>If you really intend to invoke the inherited method, |
4851 invoke it by invoking the method on super (e.g., invoke super.foo(17)), and | 4888 invoke it by invoking the method on super (e.g., invoke super.foo(17)), and |
4852 thus it will be clear to other readers of your code and to FindBugs | 4889 thus it will be clear to other readers of your code and to FindBugs |
4853 that you want to invoke the inherited method, not the method in the outer class. | 4890 that you want to invoke the inherited method, not the method in the outer class. |
4854 </p> | 4891 </p> |
4855 <p>If you call <code>this.foo(17)</code>, then the inherited method will be invo
ked. However, since FindBugs only looks at | 4892 <p>If you call <code>this.foo(17)</code>, then the inherited method will be invo
ked. However, since FindBugs only looks at |
4856 classfiles, it | 4893 classfiles, it |
4857 can't tell the difference between an invocation of <code>this.foo(17)</code> and
<code>foo(17)</code>, it will still | 4894 can't tell the difference between an invocation of <code>this.foo(17)</code> and
<code>foo(17)</code>, it will still |
4858 complain about a potential ambiguous invocation. | 4895 complain about a potential ambiguous invocation. |
4859 </p> | 4896 </p> |
4860 | 4897 |
4861 | 4898 |
4862 <h3><a name="IC_INIT_CIRCULARITY">IC: Initialization circularity (IC_INIT_CIRCUL
ARITY)</a></h3> | 4899 <h3><a name="IC_INIT_CIRCULARITY">IC: Initialization circularity (IC_INIT_CIRCUL
ARITY)</a></h3> |
4863 | 4900 |
4864 | 4901 |
4865 <p> A circularity was detected in the static initializers of the two | 4902 <p> A circularity was detected in the static initializers of the two |
4866 classes referenced by the bug instance. Many kinds of unexpected | 4903 classes referenced by the bug instance. Many kinds of unexpected |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5015 check against null. Although this is valid, it might be a mistake (perhaps yo
u | 5052 check against null. Although this is valid, it might be a mistake (perhaps yo
u |
5016 intended to refer to a different variable, or perhaps the earlier check to see i
f the | 5053 intended to refer to a different variable, or perhaps the earlier check to see i
f the |
5017 variable is null should have been a check to see if it was nonnull). | 5054 variable is null should have been a check to see if it was nonnull). |
5018 </p> | 5055 </p> |
5019 | 5056 |
5020 | 5057 |
5021 <h3><a name="NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION">NP: Method tightens nullne
ss annotation on parameter (NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION)</a></h3> | 5058 <h3><a name="NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION">NP: Method tightens nullne
ss annotation on parameter (NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION)</a></h3> |
5022 | 5059 |
5023 <p> | 5060 <p> |
5024 A method should always implement the contract of a method it overrides.
Thus, if a method takes a parameter | 5061 A method should always implement the contract of a method it overrides.
Thus, if a method takes a parameter |
5025 » that is marked as @Nullable, you shouldn't override that method in a sub
class with a method where that parameter is @Nonnull. | 5062 that is marked as @Nullable, you shouldn't override that method in a subclas
s with a method where that parameter is @Nonnull. |
5026 » Doing so violates the contract that the method should handle a null para
meter. | 5063 Doing so violates the contract that the method should handle a null paramete
r. |
5027 </p> | 5064 </p> |
5028 | 5065 |
5029 <h3><a name="NP_METHOD_RETURN_RELAXING_ANNOTATION">NP: Method relaxes nullness a
nnotation on return value (NP_METHOD_RETURN_RELAXING_ANNOTATION)</a></h3> | 5066 <h3><a name="NP_METHOD_RETURN_RELAXING_ANNOTATION">NP: Method relaxes nullness a
nnotation on return value (NP_METHOD_RETURN_RELAXING_ANNOTATION)</a></h3> |
5030 | 5067 |
5031 <p> | 5068 <p> |
5032 A method should always implement the contract of a method it overrides.
Thus, if a method takes is annotated | 5069 A method should always implement the contract of a method it overrides.
Thus, if a method takes is annotated |
5033 » as returning a @Nonnull value, | 5070 as returning a @Nonnull value, |
5034 » you shouldn't override that method in a subclass with a method annotated
as returning a @Nullable or @CheckForNull value. | 5071 you shouldn't override that method in a subclass with a method annotated as
returning a @Nullable or @CheckForNull value. |
5035 » Doing so violates the contract that the method shouldn't return null. | 5072 Doing so violates the contract that the method shouldn't return null. |
5036 </p> | 5073 </p> |
5037 | 5074 |
5038 <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> | 5075 <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> |
5039 | 5076 |
5040 | 5077 |
5041 <p> The return value from a method is dereferenced without a null check, | 5078 <p> The return value from a method is dereferenced without a null check, |
5042 and the return value of that method is one that should generally be checked | 5079 and the return value of that method is one that should generally be checked |
5043 for null. This may lead to a <code>NullPointerException</code> when the code is
executed. | 5080 for null. This may lead to a <code>NullPointerException</code> when the code is
executed. |
5044 </p> | 5081 </p> |
5045 | 5082 |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5491 <script language="JavaScript" type="text/javascript"> | 5528 <script language="JavaScript" type="text/javascript"> |
5492 <!---//hide script from old browsers | 5529 <!---//hide script from old browsers |
5493 document.write( "Last updated "+ document.lastModified + "." ); | 5530 document.write( "Last updated "+ document.lastModified + "." ); |
5494 //end hiding contents ---> | 5531 //end hiding contents ---> |
5495 </script> | 5532 </script> |
5496 <p> Send comments to <a class="sidebar" href="mailto:findbugs@cs.umd.edu">findbu
gs@cs.umd.edu</a> | 5533 <p> Send comments to <a class="sidebar" href="mailto:findbugs@cs.umd.edu">findbu
gs@cs.umd.edu</a> |
5497 <p> | 5534 <p> |
5498 <A href="http://sourceforge.net"><IMG src="http://sourceforge.net/sflogo.php?gro
up_id=96405&type=5" width="210" height="62" border="0" alt="SourceForge.net
Logo" /></A> | 5535 <A href="http://sourceforge.net"><IMG src="http://sourceforge.net/sflogo.php?gro
up_id=96405&type=5" width="210" height="62" border="0" alt="SourceForge.net
Logo" /></A> |
5499 </td></tr></table> | 5536 </td></tr></table> |
5500 </body></html> | 5537 </body></html> |
OLD | NEW |