Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > 153ba4f922480f6ff5c2f77936d5ea02 > files > 36

findbugs-3.0.1-14.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>FindBugs Bug Descriptions</title>
<link rel="stylesheet" type="text/css" href="findbugs.css"/>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
</head><body>

<table width="100%"><tr>

<td bgcolor="#b9b9fe" valign="top" align="left" width="20%"> 
<table width="100%" cellspacing="0" border="0"> 
<tr><td><a class="sidebar" href="index.html"><img src="umdFindbugs.png" alt="FindBugs"></a></td></tr> 

<tr><td>&nbsp;</td></tr>

<tr><td><b>Docs and Info</b></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="findbugs2.html">FindBugs 2.0</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="demo.html">Demo and data</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="users.html">Users and supporters</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="http://findbugs.blogspot.com/">FindBugs blog</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="factSheet.html">Fact sheet</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="manual/index.html">Manual</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="ja/manual/index.html">Manual(ja/&#26085;&#26412;&#35486;)</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="FAQ.html">FAQ</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="bugDescriptions.html">Bug descriptions</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="bugDescriptions_ja.html">Bug descriptions(ja/&#26085;&#26412;&#35486;)</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="bugDescriptions_fr.html">Bug descriptions(fr)</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="mailingLists.html">Mailing lists</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="publications.html">Documents and Publications</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="links.html">Links</a></font></td></tr> 

<tr><td>&nbsp;</td></tr>

<tr><td><a class="sidebar" href="downloads.html"><b>Downloads</b></a></td></tr> 

<tr><td>&nbsp;</td></tr>

<tr><td><a class="sidebar" href="http://www.cafeshops.com/findbugs"><b>FindBugs Swag</b></a></td></tr>

<tr><td>&nbsp;</td></tr>

<tr><td><b>Development</b></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="http://sourceforge.net/p/findbugs/bugs/">Open bugs</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="reportingBugs.html">Reporting bugs</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="contributing.html">Contributing</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="team.html">Dev team</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="api/index.html">API</a> <a class="sidebar" href="api/overview-summary.html">[no frames]</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="Changes.html">Change log</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="http://sourceforge.net/projects/findbugs">SF project page</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="http://code.google.com/p/findbugs/source/browse/">Browse source</a></font></td></tr> 
<tr><td><font size="-1">&nbsp;<a class="sidebar" href="http://code.google.com/p/findbugs/source/list">Latest code changes</a></font></td></tr> 
</table> 
</td>
<td align="left" valign="top">
<h1>FindBugs Bug Descriptions</h1>
<p>This document lists the standard bug patterns reported by
<a href="http://findbugs.sourceforge.net">FindBugs</a> version 3.0.1-dev-20190123.</p>
<h2>Summary</h2>
<table width="100%">
<tr bgcolor="#b9b9fe"><th>Description</th><th>Category</th></tr>
<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>
<tr bgcolor="#ffffff"><td><a href="#BIT_SIGNED_CHECK">BIT: Check for sign of bitwise operation</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#CN_IDIOM">CN: La classe impl??mente Cloneable mais ne d??finit et n'utilise pas la m??thode clone()</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#CN_IDIOM_NO_SUPER_CALL">CN: La m??thode clone() n'appelle pas super.clone()</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE">CN: Class defines clone() but doesn't implement Cloneable</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#CNT_ROUGH_CONSTANT_VALUE">CNT: Rough value of known constant found</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#CO_ABSTRACT_SELF">Co: Une classe abstraite d??finit une m??thode compareTo() covariante</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#CO_COMPARETO_INCORRECT_FLOATING">Co: compareTo()/compare() incorrectly handles float or double value</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#CO_COMPARETO_RESULTS_MIN_VALUE">Co: compareTo()/compare() returns Integer.MIN_VALUE</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#CO_SELF_NO_OBJECT">Co: D??finition d'une m??thode compareTo() covariante</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DE_MIGHT_DROP">DE: La m??thode peut d??clencher une exception</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DE_MIGHT_IGNORE">DE: La m??thode peut ignorer une exception</a></td><td>Bad practice</td></tr>
<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>
<tr bgcolor="#ffffff"><td><a href="#DMI_RANDOM_USED_ONLY_ONCE">DMI: Random object created and used only once</a></td><td>Bad practice</td></tr>
<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>
<tr bgcolor="#ffffff"><td><a href="#DM_EXIT">Dm: La m??thode invoque System.exit(...)</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DM_RUN_FINALIZERS_ON_EXIT">Dm: M??thode invoquant runFinalizersOnExit, l'une des plus dangeureuses m??thodes des librairies Java</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#ES_COMPARING_PARAMETER_STRING_WITH_EQ">ES: Comparison of String parameter using == or !=</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#ES_COMPARING_STRINGS_WITH_EQ">ES: Comparaison d'objets String utilisant == ou !=</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#EQ_ABSTRACT_SELF">Eq: Une classe abstraite d??finit une m??thode equals() covariante</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS">Eq: Equals checks for incompatible operand</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#EQ_COMPARETO_USE_OBJECT_EQUALS">Eq: Class defines compareTo(...) and uses Object.equals()</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#EQ_GETCLASS_AND_CLASS_CONSTANT">Eq: equals method fails for subtypes</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#EQ_SELF_NO_OBJECT">Eq: D??finition d'une m??thode equals() covariante</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#FI_EMPTY">FI: Un finaliseur vide devrait ??tre supprim??</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#FI_EXPLICIT_INVOCATION">FI: Invocation explicite d'un finaliseur</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#FI_FINALIZER_NULLS_FIELDS">FI: Finalizer nulls fields</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#FI_FINALIZER_ONLY_NULLS_FIELDS">FI: Finalizer only nulls fields</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#FI_MISSING_SUPER_CALL">FI: Le finaliseur n'appelle pas le finaliseur de la super-classe</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#FI_NULLIFY_SUPER">FI: Un finaliseur rend inutile celui de sa super-classe</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#FI_USELESS">FI: Le finaliseur ne fait rien sauf appeler celui de la super-classe</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_USES_NEWLINE">FS: Format string should use %n rather than \n</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#GC_UNCHECKED_TYPE_IN_GENERIC_CALL">GC: Unchecked type in generic call</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#HE_EQUALS_NO_HASHCODE">HE: La classe d??finit equals() mais pas hashCode()</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#HE_EQUALS_USE_HASHCODE">HE: La classe d??finit equals() et utilise Object.hashCode()</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#HE_HASHCODE_NO_EQUALS">HE: La classe d??finit hashCode() mais pas equals()</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#HE_HASHCODE_USE_OBJECT_EQUALS">HE: La classe d??finit hashCode() et utilise Object.equals()</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#HE_INHERITS_EQUALS_USE_HASHCODE">HE: La classe h??rite de equals() et utilise Object.hashCode()</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#IC_SUPERCLASS_USES_SUBCLASS_DURING_INITIALIZATION">IC: Classe m??re utilisant une sous-classe durant son initialisation</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#IMSE_DONT_CATCH_IMSE">IMSE: Interception douteuse d'une IllegalMonitorStateException</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#ISC_INSTANTIATE_STATIC_CLASS">ISC: Instantiation inutile d'une classe qui n'a que des m??thodes statiques</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#IT_NO_SUCH_ELEMENT">It: La m??thode next() de Iterator ne peut pas d??clencher une exception NoSuchElement</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION">J2EE: Stockage d'un objet non serialisable dans une session Http</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS">JCIP: Les champs d'une classe immuable devraient ??tre finaux.</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#ME_ENUM_FIELD_SETTER">ME: Public enum method unconditionally sets its field</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#ME_MUTABLE_ENUM_FIELD">ME: Enum field is public and mutable</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NP_BOOLEAN_RETURN_NULL">NP: Method with Boolean return type returns explicit null</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NP_CLONE_COULD_RETURN_NULL">NP: Clone method may return null</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT">NP: M??thode equals() ne v??rifiant pas la nullit??</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NP_TOSTRING_COULD_RETURN_NULL">NP: toString method may return null</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NM_CLASS_NAMING_CONVENTION">Nm: Nom de classe devant commencer par une majuscule</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NM_CLASS_NOT_EXCEPTION">Nm: Cette classe ne d??rive pas d'Exception, m??me si son nom le sous-entend</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NM_CONFUSING">Nm: Noms de m??thodes ambigus</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NM_FIELD_NAMING_CONVENTION">Nm: Nom de champ devant commencer par une minuscule</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER">Nm: Use of identifier that is a keyword in later versions of Java</a></td><td>Bad practice</td></tr>
<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>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NM_METHOD_NAMING_CONVENTION">Nm: Nom de m??thode devant commencer par une minuscule</a></td><td>Bad practice</td></tr>
<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 practice</td></tr>
<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>
<tr bgcolor="#ffffff"><td><a href="#NM_VERY_CONFUSING_INTENTIONAL">Nm: Very confusing method names (but perhaps intentional)</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NM_WRONG_PACKAGE_INTENTIONAL">Nm: Method doesn't override method in superclass due to wrong package for parameter</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#ODR_OPEN_DATABASE_RESOURCE">ODR: La m??thode peut ne pas fermer une ressource base de donn??es</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH">ODR: La m??thode peut ne pas fermer une ressource base de donn??es sur une exception</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#OS_OPEN_STREAM">OS: La m??thode peut ne pas fermer un flux</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#OS_OPEN_STREAM_EXCEPTION_PATH">OS: La m??thode peut oublier de fermer un flux en cas d'exception</a></td><td>Bad practice</td></tr>
<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>
<tr bgcolor="#eeeeee"><td><a href="#RC_REF_COMPARISON_BAD_PRACTICE">RC: Suspicious reference comparison to constant</a></td><td>Bad practice</td></tr>
<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>
<tr bgcolor="#eeeeee"><td><a href="#RR_NOT_CHECKED">RR: La m??thode ignore le r??sultat de InputStream.read()</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SR_NOT_CHECKED">RR: La m??thode ignore le r??sultat de InputStream.skip()</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#RV_NEGATING_RESULT_OF_COMPARETO">RV: Negating the result of compareTo()/compare()</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#RV_RETURN_VALUE_IGNORED_BAD_PRACTICE">RV: Method ignores exceptional return value</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SI_INSTANCE_BEFORE_FINALS_ASSIGNED">SI: Initialiseur statique de classe cr??ant une instance avant que tous les champs static final soient aliment??s</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SW_SWING_METHODS_INVOKED_IN_SWING_THREAD">SW: Certaines m??thodes Swing ne doivent ??tre invoqu??es qu'?? partir du thread Swing</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SE_BAD_FIELD">Se: Champ d'instance non transient et non s??rialisable dans une classe s??rialisable</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SE_BAD_FIELD_INNER_CLASS">Se: Non-serializable class has a serializable inner class</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SE_BAD_FIELD_STORE">Se: Valeur non s??rialisable stock??e dans un champ d'instance de classe s??rialisable</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SE_COMPARATOR_SHOULD_BE_SERIALIZABLE">Se: Comparateur n'impl??mentant pas Serializable</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SE_INNER_CLASS">Se: Serializable inner class</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SE_NONFINAL_SERIALVERSIONID">Se: serialVersionUID n'est pas final</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SE_NONLONG_SERIALVERSIONID">Se: serialVersionUID n'est pas de type long</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SE_NONSTATIC_SERIALVERSIONID">Se: serialVersionUID n'est pas static</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SE_NO_SUITABLE_CONSTRUCTOR">Se: La classe est Serializable mais sa super-classe ne poss??de pas de constructeur par d??faut visible</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION">Se: La classe est Externalizable mais ne d??finit pas de constructeur par d??faut</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SE_READ_RESOLVE_MUST_RETURN_OBJECT">Se: La m??thode readResolve doit retourner un Object</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SE_TRANSIENT_FIELD_NOT_RESTORED">Se: Champ "transient" non positionn?? lors de la d??s??rialisation</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SE_NO_SERIALVERSIONID">SnVI: La classe est Serializable, mais ne d??finit pas serialVersionUID</a></td><td>Bad practice</td></tr>
<tr bgcolor="#ffffff"><td><a href="#UI_INHERITANCE_UNSAFE_GETRESOURCE">UI: L'utilisation de GetResource peut-??tre instable si la classe est ??tendue</a></td><td>Bad practice</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#BC_IMPOSSIBLE_CAST">BC: Transtypage impossible</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#BC_IMPOSSIBLE_DOWNCAST">BC: Impossible downcast</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY">BC: Impossible downcast of toArray() result</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#BC_IMPOSSIBLE_INSTANCEOF">BC: instanceof renverra toujours faux</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#BIT_ADD_OF_SIGNED_BYTE">BIT: Bitwise add of signed byte value</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#BIT_AND">BIT: Masques binaires incompatibles</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#BIT_AND_ZZ">BIT: Masques binaires incompatibles</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#BIT_IOR">BIT: Masques binaires incompatibles</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#BIT_IOR_OF_SIGNED_BYTE">BIT: Ou binaire d'un octet sign??</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#BIT_SIGNED_CHECK_HIGH_BIT">BIT: Check for sign of bitwise operation</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#BOA_BADLY_OVERRIDDEN_ADAPTER">BOA: La classe surcharge mal une m??thode impl??ment??e dans une superclasse Adapter</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#BSHIFT_WRONG_ADD_PRIORITY">BSHIFT: Possible bad parsing of shift operation</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#ICAST_BAD_SHIFT_AMOUNT">BSHIFT: D??calage d'un int hors de proportion (0..31)</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DLS_DEAD_LOCAL_INCREMENT_IN_RETURN">DLS: Useless increment in return statement</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DLS_DEAD_STORE_OF_CLASS_LITERAL">DLS: Dead store of class literal</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DLS_OVERWRITTEN_INCREMENT">DLS: Incr??mentation annul??e</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DMI_ARGUMENTS_WRONG_ORDER">DMI: Reversed method arguments</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DMI_BAD_MONTH">DMI: Valeur constante pour un mois en dehors de l'intervalle attendu de 0 ?? 11</a></td><td>Correctness</td></tr>
<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>
<tr bgcolor="#ffffff"><td><a href="#DMI_CALLING_NEXT_FROM_HASNEXT">DMI: M??thode hasNext() appelant next()</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES">DMI: Collections should not contain themselves</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DMI_DOH">DMI: D'oh! A nonsensical method invocation</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DMI_INVOKING_HASHCODE_ON_ARRAY">DMI: Invocation of hashCode on an array</a></td><td>Correctness</td></tr>
<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>
<tr bgcolor="#eeeeee"><td><a href="#DMI_VACUOUS_SELF_COLLECTION_CALL">DMI: Vacuous call to collections</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION">Dm: La r??flexion ne peut pas ??tre utilis??e pour v??rifier la pr??sence d'une annotation avec la r??tention par d??faut</a></td><td>Correctness</td></tr>
<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 ScheduledThreadPoolExecutor</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS">Dm: Creation of ScheduledThreadPoolExecutor with zero core threads</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD">Dm: Useless/vacuous call to EasyMock method</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DM_INVALID_MIN_MAX">Dm: Incorrect combination of Math.max and Math.min</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#EC_ARRAY_AND_NONARRAY">EC: Utilisation de equals() pour comparer un tableau et un objet</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#EC_BAD_ARRAY_COMPARE">EC: Appel ?? equals() sur un tableau ??quivalent ?? ==</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#EC_INCOMPATIBLE_ARRAY_COMPARE">EC: equals(...) used to compare incompatible arrays</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#EC_NULL_ARG">EC: Appel de equals() avec un argument ?? null</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#EC_UNRELATED_CLASS_AND_INTERFACE">EC: Appel de equals() comparant une classe et une interface sans relation</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#EC_UNRELATED_INTERFACES">EC: Appel de equals() comparant diff??rentes interfaces</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#EC_UNRELATED_TYPES">EC: Appel de equals() comparant des types diff??rents</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#EC_UNRELATED_TYPES_USING_POINTER_EQUALITY">EC: Using pointer equality to compare different types</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#EQ_ALWAYS_FALSE">Eq: equals method always returns false</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#EQ_ALWAYS_TRUE">Eq: equals method always returns true</a></td><td>Correctness</td></tr>
<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>
<tr bgcolor="#ffffff"><td><a href="#EQ_DONT_DEFINE_EQUALS_FOR_ENUM">Eq: Covariant equals() method defined for enum</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#EQ_OTHER_NO_OBJECT">Eq: equals() method defined that doesn't override equals(Object)</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#EQ_OTHER_USE_OBJECT">Eq: equals() method defined that doesn't override Object.equals(Object)</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC">Eq: equals method overrides equals in superclass and may not be symmetric</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#EQ_SELF_USE_OBJECT">Eq: D??finition d'une m??thode equals() covariante, Object.equals(Object) est h??rit??</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER">FE: Test d'??galit?? avec NaN erron??</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_BAD_ARGUMENT">FS: Format string placeholder incompatible with passed argument</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_BAD_CONVERSION">FS: The type of a supplied argument doesn't match format specifier</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED">FS: MessageFormat supplied where printf style format expected</a></td><td>Correctness</td></tr>
<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>
<tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_ILLEGAL">FS: Illegal format string</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#VA_FORMAT_STRING_MISSING_ARGUMENT">FS: Format string references missing argument</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT">FS: No previous argument for format string</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#GC_UNRELATED_TYPES">GC: No relationship between generic parameter and method argument</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_CLASS">HE: Signature declares use of unhashable class in hashed construct</a></td><td>Correctness</td></tr>
<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>
<tr bgcolor="#ffffff"><td><a href="#ICAST_INT_2_LONG_AS_INSTANT">ICAST: int value converted to long and used as absolute time</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL">ICAST: Valeur enti??re transtyp??e en nombre flottant pass??e ?? Math.ceil</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND">ICAST: Valeur enti??re transtyp??e en flottant puis transmise ?? Math.round</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#IJU_ASSERT_METHOD_INVOKED_FROM_RUN_METHOD">IJU: JUnit assertion in run method will not be noticed by JUnit</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#IJU_BAD_SUITE_METHOD">IJU: TestCase declares a bad suite method </a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#IJU_NO_TESTS">IJU: TestCase sans tests</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#IJU_SETUP_NO_SUPER">IJU: Une classe d??rivant de TestCase impl??mente setUp() sans appeler super.setUp()</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#IJU_SUITE_NOT_STATIC">IJU: Une classe d??rivant de TestCase impl??mente une m??thode suite() non statique</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#IJU_TEARDOWN_NO_SUPER">IJU: Une classe d??rivant de TestCase impl??mente tearDown() sans appeler super.tearDown()</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#IL_CONTAINER_ADDED_TO_ITSELF">IL: Un conteneur est ajout?? ?? lui-m??me</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#IL_INFINITE_LOOP">IL: Boucle apparemment inifinie</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#IL_INFINITE_RECURSIVE_LOOP">IL: Boucle r??cursive infinie</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#IM_MULTIPLYING_RESULT_OF_IREM">IM: Multiplication d'un entier avec le r??sulat entier d'un modulo</a></td><td>Correctness</td></tr>
<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>
<tr bgcolor="#ffffff"><td><a href="#INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE">INT: Bad comparison of nonnegative value with negative constant or zero</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#INT_BAD_COMPARISON_WITH_SIGNED_BYTE">INT: Bad comparison of signed byte</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#IO_APPENDING_TO_OBJECT_OUTPUT_STREAM">IO: Doomed attempt to append to an object output stream</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN">IP: Un param??tre est r??-??crit avant d'??tre utilis??</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#MF_CLASS_MASKS_FIELD">MF: La classe d??finit un champ qui masque un champ d'une classe m??re</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#MF_METHOD_MASKS_FIELD">MF: La m??thode d??finit une variable qui masque un champ</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NP_ALWAYS_NULL">NP: D??r??f??rencement d'un pointeur null dans la m??thode</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NP_ALWAYS_NULL_EXCEPTION">NP: D??r??f??rencement d'un pointeur null dans le chemin d'exception d'une m??thode</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NP_ARGUMENT_MIGHT_BE_NULL">NP: M??thode ne testant pas les param??tres ?? null</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NP_CLOSING_NULL">NP: close() invoked on a value that is always null</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NP_GUARANTEED_DEREF">NP: Null d??r??f??renc??</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH">NP: Value is null and guaranteed to be dereferenced on exception path</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR">NP: Non-null field is not initialized</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NP_NONNULL_PARAM_VIOLATION">NP: Appel de m??thode transmettant null ?? un param??tre d??clar?? @NonNull</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NP_NONNULL_RETURN_VIOLATION">NP: M??thode renvoyer null mais d??clar??e @NonNull</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NP_NULL_INSTANCEOF">NP: A known null value is checked to see if it is an instance of a type</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NP_NULL_ON_SOME_PATH">NP: Possible d??r??f??rencement d'un pointeur null dans une m??thode</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NP_NULL_ON_SOME_PATH_EXCEPTION">NP: Possible d??r??f??rencement d'un pointeur null dans le chemin d'exception d'une m??thode</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NP_NULL_PARAM_DEREF">NP: M??thode passant null ?? un param??tre d??r??f??renc?? inconditionnellement</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS">NP: Appel de m??thode passant null ?? un param??tre d??r??f??renc?? inconditionnellement</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NP_NULL_PARAM_DEREF_NONVIRTUAL">NP: Appel ?? une m??thode non virtuelle passant null ?? un param??tre d??r??f??renc?? de fa??on inconditionnelle</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NP_OPTIONAL_RETURN_NULL">NP: Method with Optional return type returns explicit null</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NP_STORE_INTO_NONNULL_FIELD">NP: Stocke une valeur null dans un champ annot?? NonNull</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NP_UNWRITTEN_FIELD">NP: Lecture d'un champ jamais ??crit</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NM_BAD_EQUAL">Nm: La classe d??finit equal() ; ne devrait-ce pas ??tre equals() ?</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NM_LCASE_HASHCODE">Nm: La classe d??finit hashcode() ; ne devrait-ce pas ??tre hashCode() ?</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NM_LCASE_TOSTRING">Nm: La classe d??finit tostring() ; ne devrait-ce pas ??tre toString() ?</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NM_METHOD_CONSTRUCTOR_CONFUSION">Nm: Confusion apparente entre une m??thode et un constructeur</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NM_VERY_CONFUSING">Nm: Noms de m??thodes tr??s ambigus</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NM_WRONG_PACKAGE">Nm: Method doesn't override method in superclass due to wrong package for parameter</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT">QBA: M??thode assignant une valeur bol??enne fixe dans une expression bool??enne</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#RANGE_ARRAY_INDEX">RANGE: Array index is out of bounds</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#RANGE_ARRAY_LENGTH">RANGE: Array length is out of bounds</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#RANGE_ARRAY_OFFSET">RANGE: Array offset is out of bounds</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#RANGE_STRING_INDEX">RANGE: String index is out of bounds</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#RC_REF_COMPARISON">RC: Comparaison de r??f??rences suspecte</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE">RCN: Test de nullit?? d'une valeur pr??alablement d??r??f??renc??e</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION">RE: Syntaxe d'expression r??guli??re invalide</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION">RE: File.separator used for regular expression</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#RE_POSSIBLE_UNINTENDED_PATTERN">RE: "." utilis?? dans une expression r??guli??re</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#RV_01_TO_INT">RV: Les valeurs al??atoires entre 0 et 1 sont r??duites ?? l'entier 0</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#RV_ABSOLUTE_VALUE_OF_HASHCODE">RV: Bad attempt to compute absolute value of signed 32-bit hashcode </a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#RV_ABSOLUTE_VALUE_OF_RANDOM_INT">RV: Bad attempt to compute absolute value of signed random integer</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE">RV: Code checks for specific values returned by compareTo</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#RV_EXCEPTION_NOT_THROWN">RV: Exception created and dropped rather than thrown</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#RV_RETURN_VALUE_IGNORED">RV: La m??thode ignore une valeur de retour</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#RpC_REPEATED_CONDITIONAL_TEST">RpC: Repeated conditional tests</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SA_FIELD_SELF_ASSIGNMENT">SA: Auto-alimentation d'un champs</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SA_FIELD_SELF_COMPARISON">SA: Self comparison of field with itself</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SA_FIELD_SELF_COMPUTATION">SA: Nonsensical self computation involving a field (e.g., x & x)</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SA_LOCAL_SELF_ASSIGNMENT_INSTEAD_OF_FIELD">SA: Self assignment of local rather than assignment to field</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SA_LOCAL_SELF_COMPARISON">SA: Self comparison of value with itself</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SA_LOCAL_SELF_COMPUTATION">SA: Nonsensical self computation involving a variable (e.g., x & x)</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH">SF: Dead store due to switch statement fall through</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW">SF: Dead store due to switch statement fall through to throw</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SIC_THREADLOCAL_DEADLY_EMBRACE">SIC: Deadly embrace of non-static inner class and thread local</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SIO_SUPERFLUOUS_INSTANCEOF">SIO: V??rification de type inutile avec l'op??rateur instanceof</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SQL_BAD_PREPARED_STATEMENT_ACCESS">SQL: M??thode essayant au param??tre d'indice 0 d'un PreparedStatement</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SQL_BAD_RESULTSET_ACCESS">SQL: M??thode essayant d'acc??der ?? un champ de ResultSet d'indice 0</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#STI_INTERRUPTED_ON_CURRENTTHREAD">STI: Utilisation superflue d'un appel ?? currentThread() pour appeler interrupted()</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#STI_INTERRUPTED_ON_UNKNOWNTHREAD">STI: Thread.interrupted() appel??e par erreur sur un objet Thread arbitraire</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SE_METHOD_MUST_BE_PRIVATE">Se: M??thode devant ??tre priv??e pour que la s??rialisation fonctionne</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SE_READ_RESOLVE_IS_STATIC">Se: The readResolve method must not be declared as a static method.  </a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#TQ_ALWAYS_VALUE_USED_WHERE_NEVER_REQUIRED">TQ: Value annotated as carrying a type qualifier used where a value that must not carry that qualifier is required</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#TQ_COMPARING_VALUES_WITH_INCOMPATIBLE_TYPE_QUALIFIERS">TQ: Comparing values with incompatible type qualifiers</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#TQ_MAYBE_SOURCE_VALUE_REACHES_ALWAYS_SINK">TQ: Value that might not carry a type qualifier is always used in a way requires that type qualifier</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#TQ_MAYBE_SOURCE_VALUE_REACHES_NEVER_SINK">TQ: Value that might carry a type qualifier is always used in a way prohibits it from having that type qualifier</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#TQ_NEVER_VALUE_USED_WHERE_ALWAYS_REQUIRED">TQ: Value annotated as never carrying a type qualifier used where value carrying that qualifier is required</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#TQ_UNKNOWN_VALUE_USED_WHERE_ALWAYS_STRICTLY_REQUIRED">TQ: Value without a type qualifier used where a value is required to have that qualifier</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS">UMAC: M??thode non appelable d??finie dans une classe anonyme</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#UR_UNINIT_READ">UR: Lecture d'un champ non initialis?? dans un constructeur</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR">UR: Uninitialized read of field method called from constructor of superclass</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY">USELESS_STRING: Invocation of toString on an unnamed array</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DMI_INVOKING_TOSTRING_ON_ARRAY">USELESS_STRING: Invocation de toString sur un tableau</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY">USELESS_STRING: Array formatted in useless way using format string</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#UWF_NULL_FIELD">UwF: Champ uniquement mis ?? null</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#UWF_UNWRITTEN_FIELD">UwF: Champ jamais ??crit</a></td><td>Correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG">VA: Tableau de primitives pass?? ?? une fonction attendant un nombre variable d'objets en argument</a></td><td>Correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#LG_LOST_LOGGER_DUE_TO_WEAK_REFERENCE">LG: Potential lost logger changes due to weak reference in OpenJDK</a></td><td>Experimental</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#OBL_UNSATISFIED_OBLIGATION">OBL: Method may fail to clean up stream or resource</a></td><td>Experimental</td></tr>
<tr bgcolor="#ffffff"><td><a href="#OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE">OBL: Method may fail to clean up stream or resource on checked exception</a></td><td>Experimental</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DM_CONVERT_CASE">Dm: La m??thode appelle les String.toUpperCase() ou String.toLowerCase ; utilisez plut??t la version param??tr??e par une Locale</a></td><td>Internationalization</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DM_DEFAULT_ENCODING">Dm: Reliance on default encoding</a></td><td>Internationalization</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED">DP: Les chargeurs de classes ne doivent ??tre cr????s qu'?? partir de block doPrivileged</a></td><td>Malicious code vulnerability</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DP_DO_INSIDE_DO_PRIVILEGED">DP: M??thode invoqu??e alors qu'elle ne devrait l'??tre qu'?? partir d'un block doPrivileged</a></td><td>Malicious code vulnerability</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#EI_EXPOSE_REP">EI: Une m??thode peut exposer sa repr??sentation interne en renvoyant une r??f??rence ?? un objet modifiable</a></td><td>Malicious code vulnerability</td></tr>
<tr bgcolor="#ffffff"><td><a href="#EI_EXPOSE_REP2">EI2: Une m??thode expose sa repr??sentation interne en incorporant une r??f??rence ?? un objet modifiable</a></td><td>Malicious code vulnerability</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#FI_PUBLIC_SHOULD_BE_PROTECTED">FI: Un finaliseur devrait ??tre prot??g??, pas public</a></td><td>Malicious code vulnerability</td></tr>
<tr bgcolor="#ffffff"><td><a href="#EI_EXPOSE_STATIC_REP2">MS: Une m??thode peut exposer un ??tat interne statique en stockant un objet modifiable dans un champs statique</a></td><td>Malicious code vulnerability</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#MS_CANNOT_BE_FINAL">MS: Un champ n'est pas final et ne peut pas ??tre prot??g?? face ?? du code malveillant</a></td><td>Malicious code vulnerability</td></tr>
<tr bgcolor="#ffffff"><td><a href="#MS_EXPOSE_REP">MS: Une m??thode statique publique risque d'exposer une repr??sentation interne en renvoyant un tableau</a></td><td>Malicious code vulnerability</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#MS_FINAL_PKGPROTECT">MS: Le champ devrait ??tre ?? la fois final et package protected</a></td><td>Malicious code vulnerability</td></tr>
<tr bgcolor="#ffffff"><td><a href="#MS_MUTABLE_ARRAY">MS: Un champ est un tableau modifiable</a></td><td>Malicious code vulnerability</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#MS_MUTABLE_COLLECTION">MS: Field is a mutable collection</a></td><td>Malicious code vulnerability</td></tr>
<tr bgcolor="#ffffff"><td><a href="#MS_MUTABLE_COLLECTION_PKGPROTECT">MS: Field is a mutable collection which should be package protected</a></td><td>Malicious code vulnerability</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#MS_MUTABLE_HASHTABLE">MS: Un champ modifiable est une Hashtable</a></td><td>Malicious code vulnerability</td></tr>
<tr bgcolor="#ffffff"><td><a href="#MS_OOI_PKGPROTECT">MS: Le champ devrait ??tre sorti de l'interface et mis en package protected</a></td><td>Malicious code vulnerability</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#MS_PKGPROTECT">MS: Un champ devrait ??tre package protected</a></td><td>Malicious code vulnerability</td></tr>
<tr bgcolor="#ffffff"><td><a href="#MS_SHOULD_BE_FINAL">MS: Un champ n'est pas final alors qu'il devrait l'??tre</a></td><td>Malicious code vulnerability</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#MS_SHOULD_BE_REFACTORED_TO_BE_FINAL">MS: Field isn't final but should be refactored to be so</a></td><td>Malicious code vulnerability</td></tr>
<tr bgcolor="#ffffff"><td><a href="#AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION">AT: Sequence of calls to concurrent abstraction may not be atomic</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DC_DOUBLECHECK">DC: Possible double v??rification d'un champ</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DC_PARTIALLY_CONSTRUCTED">DC: Possible exposure of partially initialized object</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DL_SYNCHRONIZATION_ON_BOOLEAN">DL: Synchronization on Boolean</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE">DL: Synchronization on boxed primitive</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DL_SYNCHRONIZATION_ON_SHARED_CONSTANT">DL: Synchronization on interned String </a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE">DL: Synchronization on boxed primitive values</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DM_MONITOR_WAIT_ON_CONDITION">Dm: Wait() appel?? sur une Condition</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DM_USELESS_THREAD">Dm: Thread cr???? avec la m??thode run vide par d??faut</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#ESync_EMPTY_SYNC">ESync: Bloc synchronis?? vide</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#IS2_INCONSISTENT_SYNC">IS: Synchronisation incoh??rente</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#IS_FIELD_NOT_GUARDED">IS: Champ non prot??g?? contre les acc??s concurrents</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#JLM_JSR166_LOCK_MONITORENTER">JLM: Synchronisation effectu??e sur un Lock java.util.concurrent</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#JLM_JSR166_UTILCONCURRENT_MONITORENTER">JLM: Synchronization performed on util.concurrent instance</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT">JLM: Using monitor style wait methods on util.concurrent abstraction</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#LI_LAZY_INIT_STATIC">LI: Initialisation paresseuse incorrecte d'un champ statique</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#LI_LAZY_INIT_UPDATE_STATIC">LI: Incorrect lazy initialization and update of static field</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD">ML: Synchronization on field in futile attempt to guard that field</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#ML_SYNC_ON_UPDATED_FIELD">ML: La m??thode se synchronise sur un champ mis ?? jour</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#MSF_MUTABLE_SERVLET_FIELD">MSF: Mutable servlet field</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#MWN_MISMATCHED_NOTIFY">MWN: notify() non appareill??</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#MWN_MISMATCHED_WAIT">MWN: wait() non appareill??</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NN_NAKED_NOTIFY">NN: Appel notify() isol?? dans une m??thode</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NP_SYNC_AND_NULL_CHECK_FIELD">NP: Synchronize and null check on the same field.</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NO_NOTIFY_NOT_NOTIFYALL">No: Utilisation de notify() plut??t que notifyAll() dans une m??thode</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#RS_READOBJECT_SYNC">RS: Seule la m??thode readObject() est synchronis??e</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED">RV: Return value of putIfAbsent ignored, value passed to putIfAbsent reused</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#RU_INVOKE_RUN">Ru: Invocation de run() sur un thread (Vouliez-vous plut??t dire start() ?)</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SC_START_IN_CTOR">SC: Un constructeur invoque Thread.start()</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SP_SPIN_ON_FIELD">SP: M??thode bouclant sur un champ</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE">STCAL: Call to static Calendar</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE">STCAL: Call to static DateFormat</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#STCAL_STATIC_CALENDAR_INSTANCE">STCAL: Static Calendar field</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE">STCAL: Static DateFormat</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SWL_SLEEP_WITH_LOCK_HELD">SWL: Appel de la m??thode Thread.sleep() avec un verrou</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#TLW_TWO_LOCK_WAIT">TLW: wait() avec deux verrous en attente</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#UG_SYNC_SET_UNSYNC_GET">UG: M??thode getXXX non synchronis??e, m??thode setXXX synchronis??e</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#UL_UNRELEASED_LOCK">UL: La m??thode ne lib??re pas un verrou dans tous les chemins d'ex??cution</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#UL_UNRELEASED_LOCK_EXCEPTION_PATH">UL: La m??thode ne lib??re pas un verrou dans tous les chemins d'exception</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#UW_UNCOND_WAIT">UW: M??thode contenant un wait() non conditionn??</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#VO_VOLATILE_INCREMENT">VO: An increment to a volatile field isn't atomic</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#VO_VOLATILE_REFERENCE_TO_ARRAY">VO: Une r??f??rence volatile ?? un tableau ne traite pas les ??l??ments du tableau comme volatiles</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL">WL: Synchronization on getClass rather than class literal</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#WS_WRITEOBJECT_SYNC">WS: Seule la m??thode writeObject() est synchronis??e</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#WA_AWAIT_NOT_IN_LOOP">Wa: Condition.await() en dehors d'une boucle</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#WA_NOT_IN_LOOP">Wa: M??thode contenant un wait() en dehors d'une boucle</a></td><td>Multithreaded correctness</td></tr>
<tr bgcolor="#ffffff"><td><a href="#BX_BOXING_IMMEDIATELY_UNBOXED">Bx: Primitive value is boxed and then immediately unboxed</a></td><td>Performance</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#BX_BOXING_IMMEDIATELY_UNBOXED_TO_PERFORM_COERCION">Bx: Primitive value is boxed then unboxed to perform primitive coercion</a></td><td>Performance</td></tr>
<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>Performance</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#BX_UNBOXING_IMMEDIATELY_REBOXED">Bx: Boxed value is unboxed and then immediately reboxed</a></td><td>Performance</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DM_BOXED_PRIMITIVE_FOR_COMPARE">Bx: Boxing a primitive to compare</a></td><td>Performance</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DM_BOXED_PRIMITIVE_FOR_PARSING">Bx: Boxing/unboxing to parse a primitive</a></td><td>Performance</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DM_BOXED_PRIMITIVE_TOSTRING">Bx: M??thode allouant une primitive boxed pour appeler toString</a></td><td>Performance</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DM_FP_NUMBER_CTOR">Bx: Method invokes inefficient floating-point Number constructor; use static valueOf instead</a></td><td>Performance</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DM_NUMBER_CTOR">Bx: Method invokes inefficient Number constructor; use static valueOf instead</a></td><td>Performance</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DMI_BLOCKING_METHODS_ON_URL">Dm: The equals and hashCode methods of URL are blocking</a></td><td>Performance</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DMI_COLLECTION_OF_URLS">Dm: Maps and sets of URLs can be performance hogs</a></td><td>Performance</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DM_BOOLEAN_CTOR">Dm: La m??thode invoque le constructeur inutile Boolean() ; utilisez Boolean.valueOf(...) ?? la place</a></td><td>Performance</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DM_GC">Dm: Ramasse-miettes explicite ; extr??mement douteux sauf dans du code de banc d'essai</a></td><td>Performance</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DM_NEW_FOR_GETCLASS">Dm: M??thode allouant un objet juste pour obtenir la classe</a></td><td>Performance</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DM_NEXTINT_VIA_NEXTDOUBLE">Dm: Utiliser la m??thode nextInt de Random plut??t que nextDouble pour g??n??rer un entier al??atoire</a></td><td>Performance</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DM_STRING_CTOR">Dm: La m??thode invoque le constructeur inutile String(String) ; utilisez juste l'argument</a></td><td>Performance</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DM_STRING_TOSTRING">Dm: La m??thode appel toString() sur un objet String ; utilisez directement l'objet String</a></td><td>Performance</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DM_STRING_VOID_CTOR">Dm: La m??thode invoque le constructeur inutile String() ; utilisez juste ""</a></td><td>Performance</td></tr>
<tr bgcolor="#ffffff"><td><a href="#HSC_HUGE_SHARED_STRING_CONSTANT">HSC: Huge string constants is duplicated across multiple class files</a></td><td>Performance</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SBSC_USE_STRINGBUFFER_CONCATENATION">SBSC: La m??thode concat??ne des cha??nes au moyen de + en boucle</a></td><td>Performance</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SIC_INNER_SHOULD_BE_STATIC">SIC: Devrait ??tre une classe interne statique</a></td><td>Performance</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SIC_INNER_SHOULD_BE_STATIC_ANON">SIC: Peut-??tre transform??e en classe interne statique nomm??e</a></td><td>Performance</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SIC_INNER_SHOULD_BE_STATIC_NEEDS_THIS">SIC: Pourrait-??tre transform??e en classe interne statique</a></td><td>Performance</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SS_SHOULD_BE_STATIC">SS: Champ non lu : devrait-il ??tre statique ?</a></td><td>Performance</td></tr>
<tr bgcolor="#ffffff"><td><a href="#UM_UNNECESSARY_MATH">UM: Appel d'une m??thode statique de la classe Math sur une valeur constante</a></td><td>Performance</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#UPM_UNCALLED_PRIVATE_METHOD">UPM: M??thode priv??e jamais appel??e</a></td><td>Performance</td></tr>
<tr bgcolor="#ffffff"><td><a href="#URF_UNREAD_FIELD">UrF: Champ inutilis??</a></td><td>Performance</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#UUF_UNUSED_FIELD">UuF: Champ inutilis??</a></td><td>Performance</td></tr>
<tr bgcolor="#ffffff"><td><a href="#WMI_WRONG_MAP_ITERATOR">WMI: Utilisation inefficace d'un it??rateur sur keySet au lieu de entrySet</a></td><td>Performance</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DMI_CONSTANT_DB_PASSWORD">Dm: Hardcoded constant database password</a></td><td>Security</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DMI_EMPTY_DB_PASSWORD">Dm: Empty database password</a></td><td>Security</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#HRS_REQUEST_PARAMETER_TO_COOKIE">HRS: HTTP cookie formed from untrusted input</a></td><td>Security</td></tr>
<tr bgcolor="#ffffff"><td><a href="#HRS_REQUEST_PARAMETER_TO_HTTP_HEADER">HRS: HTTP Response splitting vulnerability</a></td><td>Security</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#PT_ABSOLUTE_PATH_TRAVERSAL">PT: Absolute path traversal in servlet</a></td><td>Security</td></tr>
<tr bgcolor="#ffffff"><td><a href="#PT_RELATIVE_PATH_TRAVERSAL">PT: Relative path traversal in servlet</a></td><td>Security</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE">SQL: Une cha??ne non constante est pass??e ?? la m??thode execute d'une commande SQL</a></td><td>Security</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING">SQL: Une requ??te est pr??par??e ?? partir d'une chaine non constante</a></td><td>Security</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#XSS_REQUEST_PARAMETER_TO_JSP_WRITER">XSS: JSP reflected cross site scripting vulnerability</a></td><td>Security</td></tr>
<tr bgcolor="#ffffff"><td><a href="#XSS_REQUEST_PARAMETER_TO_SEND_ERROR">XSS: Servlet reflected cross site scripting vulnerability in error page</a></td><td>Security</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER">XSS: Servlet reflected cross site scripting vulnerability</a></td><td>Security</td></tr>
<tr bgcolor="#ffffff"><td><a href="#BC_BAD_CAST_TO_ABSTRACT_COLLECTION">BC: Transtypage douteux d'un type Collection vers une classe abstraite</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#BC_BAD_CAST_TO_CONCRETE_COLLECTION">BC: Transtypage douteux vers une collection concr??te</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#BC_UNCONFIRMED_CAST">BC: Transtypage non v??rifi??/non confirm??</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#BC_UNCONFIRMED_CAST_OF_RETURN_VALUE">BC: Unchecked/unconfirmed cast of return value from method</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#BC_VACUOUS_INSTANCEOF">BC: instanceof renverra toujours vrai</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT">BSHIFT: D??calage ?? droite non sign?? et transtypage short/byte</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#CI_CONFUSED_INHERITANCE">CI: Classe finale d??clarant un champ prot??g??</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DB_DUPLICATE_BRANCHES">DB: M??thode utilsant le m??me code pour deux branches</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DB_DUPLICATE_SWITCH_CLAUSES">DB: M??thode utilisant le m??me code pour deux clauses switch</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DLS_DEAD_LOCAL_STORE">DLS: Alimentation ?? perte d'une variable locale</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DLS_DEAD_LOCAL_STORE_IN_RETURN">DLS: Useless assignment in return statement</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DLS_DEAD_LOCAL_STORE_OF_NULL">DLS: Alimentation ?? null d'une variable</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD">DLS: Dead store to local variable that shadows field</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DMI_HARDCODED_ABSOLUTE_FILENAME">DMI: Chemin absolu cod?? en dur dans le code</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DMI_NONSERIALIZABLE_OBJECT_WRITTEN">DMI: Objet non s??rialisable ??crit dans un ObjectOutput</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#DMI_USELESS_SUBSTRING">DMI: Appel de substring(0) qui retourne la valeur originale</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED">Dm: Thread passed where Runnable expected</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#EQ_DOESNT_OVERRIDE_EQUALS">Eq: Class doesn't override equals in superclass</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#EQ_UNUSUAL">Eq: Unusual equals method </a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#FE_FLOATING_POINT_EQUALITY">FE: Test d'??galit?? en virgule flottante.</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN">FS: Non-Boolean argument formatted using %b format specifier</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD">IA: Appel ambigu d'une m??thode h??rit?? ou externe</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#IC_INIT_CIRCULARITY">IC: Initialisation circulaire</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#ICAST_IDIV_CAST_TO_DOUBLE">ICAST: R??sultat d'une division enti??re transtyp?? en nombre flottant</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#ICAST_INTEGER_MULTIPLY_CAST_TO_LONG">ICAST: R??sultat d'une multiplication enti??re transtyp??e en long</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#IM_AVERAGE_COMPUTATION_COULD_OVERFLOW">IM: Possibilit?? de d??bordement du calcul d'une moyenne</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#IM_BAD_CHECK_FOR_ODD">IM: Test d'impaire ne fonctionnant pas avec les n??gatifs</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#INT_BAD_REM_BY_1">INT: Reste entier modulo 1</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#INT_VACUOUS_BIT_OPERATION">INT: Vacuous bit mask operation on integer value</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#INT_VACUOUS_COMPARISON">INT: Comparaison inutile de valeurs enti??res</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#MTIA_SUSPECT_SERVLET_INSTANCE_FIELD">MTIA: La classe h??rite de Servlet et utilise les variables de l'instance.</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#MTIA_SUSPECT_STRUTS_INSTANCE_FIELD">MTIA: La classe h??rite d'une classe action Struts et utilise les variables de l'instance.</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NP_DEREFERENCE_OF_READLINE_VALUE">NP: Dereference of the result of readLine() without nullcheck</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NP_IMMEDIATE_DEREFERENCE_OF_READLINE">NP: D??r??f??rencement imm??diat du r??sultat d'un readLine()</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NP_LOAD_OF_KNOWN_NULL_VALUE">NP: Chargement d'une valeur connue pour ??tre ?? null</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION">NP: Method tightens nullness annotation on parameter</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NP_METHOD_RETURN_RELAXING_ANNOTATION">NP: Method relaxes nullness annotation on return value</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE">NP: Pointeur ?? null renvoy?? par une m??thode qui risque d'??tre d??r??f??renc??</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE">NP: Possible null pointer dereference on branch that might be infeasible</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE">NP: Parameter must be non-null but is marked as nullable</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD">NP: Read of unwritten public or protected field</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#NS_DANGEROUS_NON_SHORT_CIRCUIT">NS: Potentially dangerous use of non-short-circuit logic</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#NS_NON_SHORT_CIRCUIT">NS: Utilisation discutable de logique binaire</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#PZLA_PREFER_ZERO_LENGTH_ARRAYS">PZLA: Envisagez de renvoyer un tableau vide plut??t que null</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#QF_QUESTIONABLE_FOR_LOOP">QF: Incr??mentation compliqu??e, subtile au incorrecte dans une boucle for</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE">RCN: Comparaison redondante d'une valeur non nulle avec null</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES">RCN: Comparaison redondante de deux valeurs nulles</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE">RCN: Test de nullit?? redondant sur une valeur non nulle</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE">RCN: Test de nullit?? redondant sur une valeur connue pour ??tre ?? null</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#REC_CATCH_EXCEPTION">REC: java.lang.Exception est intercept?? alors qu'Exception n'est jamais lanc??</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#RI_REDUNDANT_INTERFACES">RI: Classe impl??mentant la m??me interface que sa super-classe</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#RV_CHECK_FOR_POSITIVE_INDEXOF">RV: M??thode v??rifiant que le r??sultat d'un String.indexOf() est positif</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#RV_DONT_JUST_NULL_CHECK_READLINE">RV: M??thode ignorant le r??sultat d'un readLine() apr??s avoir v??rifi?? qu'il est non nul</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#RV_REM_OF_HASHCODE">RV: Reste d'un hashCode pouvant ??tre n??gatif</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#RV_REM_OF_RANDOM_INT">RV: Reste d'un entier sign?? 32 bits al??eatoire</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#RV_RETURN_VALUE_IGNORED_INFERRED">RV: Method ignores return value, is this OK?</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT">RV: Return value of method without side effect is ignored</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SA_FIELD_DOUBLE_ASSIGNMENT">SA: Double assignment of field</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SA_LOCAL_DOUBLE_ASSIGNMENT">SA: Double assignment of local variable </a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SA_LOCAL_SELF_ASSIGNMENT">SA: Auto-alimentation d'une variable locale</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SF_SWITCH_FALLTHROUGH">SF: Un switch comporte un cas qui d??borde sur le suivant</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SF_SWITCH_NO_DEFAULT">SF: Switch statement found where default case is missing</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD">ST: Ecriture d'un champ statique depuis la m??thode d'une instance</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#SE_PRIVATE_READ_RESOLVE_NOT_INHERITED">Se: Private readResolve method not inherited by subclasses</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#SE_TRANSIENT_FIELD_OF_NONSERIALIZABLE_CLASS">Se: Transient field of class that isn't Serializable. </a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_ALWAYS_SINK">TQ: Value required to have type qualifier, but marked as unknown</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_NEVER_SINK">TQ: Value required to not have type qualifier, but marked as unknown</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#UC_USELESS_CONDITION">UC: Condition has no effect</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#UC_USELESS_CONDITION_TYPE">UC: Condition has no effect due to the variable type</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#UC_USELESS_OBJECT">UC: Useless object created</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#UC_USELESS_OBJECT_STACK">UC: Useless object created on stack</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#UC_USELESS_VOID_METHOD">UC: Useless non-empty void method</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#UCF_USELESS_CONTROL_FLOW">UCF: Instruction de contr??le du flux inutile</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#UCF_USELESS_CONTROL_FLOW_NEXT_LINE">UCF: Useless control flow to next line</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD">UrF: Unread public/protected field</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD">UuF: Unused public or protected field</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR">UwF: Champ non initialis?? dans le constructeur</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#eeeeee"><td><a href="#UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD">UwF: Unwritten public or protected field</a></td><td>Dodgy code</td></tr>
<tr bgcolor="#ffffff"><td><a href="#XFB_XML_FACTORY_BYPASS">XFB: M??thode instanciant directement une impl??mentation sp??cifique des interfaces XML</a></td><td>Dodgy code</td></tr>
</table>
<h2>Descriptions</h2>
<h3><a name="BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS">BC: Equals method should not assume anything about the type of its argument (BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS)</a></h3>


<p>
The <code>equals(Object o)</code> method shouldn't make any assumptions
about the type of <code>o</code>. It should simply return
false if <code>o</code> is not the same type as <code>this</code>.
</p>

    
<h3><a name="BIT_SIGNED_CHECK">BIT: Check for sign of bitwise operation (BIT_SIGNED_CHECK)</a></h3>


<p> This method compares an expression such as</p>
<pre>((event.detail &amp; SWT.SELECTED) &gt; 0)</pre>.
<p>Using bit arithmetic and then comparing with the greater than operator can
lead to unexpected results (of course depending on the value of
SWT.SELECTED). If SWT.SELECTED is a negative number, this is a candidate
for a bug. Even when SWT.SELECTED is not negative, it seems good practice
to use '!= 0' instead of '&gt; 0'.
</p>
<p>
<em>Boris Bokowski</em>
</p>

    
<h3><a name="CN_IDIOM">CN: La classe impl??mente Cloneable mais ne d??finit et n'utilise pas la m??thode clone() (CN_IDIOM)</a></h3>


<p>La classe impl??mente <code>Cloneable</code> sans d??finir ou utiliser la m??thode <code>clone()</code>.</p>

  
<h3><a name="CN_IDIOM_NO_SUPER_CALL">CN: La m??thode clone() n'appelle pas super.clone() (CN_IDIOM_NO_SUPER_CALL)</a></h3>


<p>Cette classe d??finit une m??thode <code>clone()</code> qui n'appelle pas <code>super.clone()</code>, et n'est pas finale. Si cette classe ("<i>A</i>") est ??tendue par une classe fille ("<i>B</i>"), et que la classe fille <i>B</i> appelle <code>super.clone()</code>, alors il est probable que la m??thode <code>clone()</code> de <i>B</i> retournera un objet de type <i>A</i>, ce qui viole le contrat standard de <code>clone()</code>.</p>
<p>Si toutes les m??thodes <code>clone()</code> appellent <code>super.clone()</code>, elles ont alors la garantie d'utiliser <code>Object.clone()</code>, qui retourne toujours un objet du type correct.</p>

  
<h3><a name="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE">CN: Class defines clone() but doesn't implement Cloneable (CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE)</a></h3>


<p> This class defines a clone() method but the class doesn't implement Cloneable.
There are some situations in which this is OK (e.g., you want to control how subclasses
can clone themselves), but just make sure that this is what you intended.
</p>

    
<h3><a name="CNT_ROUGH_CONSTANT_VALUE">CNT: Rough value of known constant found (CNT_ROUGH_CONSTANT_VALUE)</a></h3>

      
    <p>It's recommended to use the predefined library constant for code clarity and better precision.</p>

    
<h3><a name="CO_ABSTRACT_SELF">Co: Une classe abstraite d??finit une m??thode compareTo() covariante (CO_ABSTRACT_SELF)</a></h3>


<p>Cette classe d??finit une version covariante de <code>compareTo()</code>. Pour surcharger correctement la m??thode <code>compareTo()</code> de l'interface <code>Comparable</code>, le param??tre de <code>compareTo()</code> doit ??tre du type <code>java.lang.Object</code>.</p>

  
<h3><a name="CO_COMPARETO_INCORRECT_FLOATING">Co: compareTo()/compare() incorrectly handles float or double value (CO_COMPARETO_INCORRECT_FLOATING)</a></h3>


  <p>This method compares double or float values using pattern like this: val1 &gt; val2 ? 1 : val1 &lt; val2 ? -1 : 0.
This pattern works incorrectly for -0.0 and NaN values which may result in incorrect sorting result or broken collection 
(if compared values are used as keys). Consider using Double.compare or Float.compare static methods which handle all 
the special cases correctly.</p>

    
<h3><a name="CO_COMPARETO_RESULTS_MIN_VALUE">Co: compareTo()/compare() returns Integer.MIN_VALUE (CO_COMPARETO_RESULTS_MIN_VALUE)</a></h3>


  <p> In some situation, this compareTo or compare method returns
the  constant Integer.MIN_VALUE, which is an exceptionally bad practice.
  The only thing that matters about the return value of compareTo is the sign of the result.
    But people will sometimes negate the return value of compareTo, expecting that this will negate
    the sign of the result. And it will, except in the case where the value returned is Integer.MIN_VALUE.
    So just return -1 rather than Integer.MIN_VALUE.

    
<h3><a name="CO_SELF_NO_OBJECT">Co: D??finition d'une m??thode compareTo() covariante (CO_SELF_NO_OBJECT)</a></h3>


<p>Cette classe d??finit une version covariante de <code>compareTo()</code>. Pour correctement surcharger la m??thode <code>compareTo() </code>de l'interface <code>Comparable</code>, le param??tre de <code>compareTo()</code> doit ??tre du type <code>java.lang.Object</code>.</p>

  
<h3><a name="DE_MIGHT_DROP">DE: La m??thode peut d??clencher une exception (DE_MIGHT_DROP)</a></h3>


<p>Cette m??thode peut d??clencher une exception. En g??n??ral, les exceptions doivent ??tre g??r??es ou transmises hors de la m??thode.</p>

  
<h3><a name="DE_MIGHT_IGNORE">DE: La m??thode peut ignorer une exception (DE_MIGHT_IGNORE)</a></h3>


<p>Cette m??thode peut ignorer une exception. En g??n??ral, les exceptions doivent ??tre g??r??es ou transmises hors de la m??thode.</p>

  
<h3><a name="DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS">DMI: Adding elements of an entry set may fail due to reuse of Entry objects (DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS)</a></h3>

     
     <p> The entrySet() method is allowed to return a view of the
     underlying Map in which a single Entry object is reused and returned
     during the iteration.  As of Java 1.6, both IdentityHashMap
     and EnumMap did so. When iterating through such a Map,
     the Entry value is only valid until you advance to the next iteration.
     If, for example, you try to pass such an entrySet to an addAll method,
     things will go badly wrong.
    </p>
     
    
<h3><a name="DMI_RANDOM_USED_ONLY_ONCE">DMI: Random object created and used only once (DMI_RANDOM_USED_ONLY_ONCE)</a></h3>


<p> This code creates a java.util.Random object, uses it to generate one random number, and then discards
the Random object. This produces mediocre quality random numbers and is inefficient.
If possible, rewrite the code so that the Random object is created once and saved, and each time a new random number
is required invoke a method on the existing Random object to obtain it.
</p>

<p>If it is important that the generated Random numbers not be guessable, you <em>must</em> not create a new Random for each random
number; the values are too easily guessable. You should strongly consider using a java.security.SecureRandom instead
(and avoid allocating a new SecureRandom for each random number needed).
</p>

    
<h3><a name="DMI_USING_REMOVEALL_TO_CLEAR_COLLECTION">DMI: Don't use removeAll to clear a collection (DMI_USING_REMOVEALL_TO_CLEAR_COLLECTION)</a></h3>

     
     <p> If you want to remove all elements from a collection <code>c</code>, use <code>c.clear</code>,
not <code>c.removeAll(c)</code>. Calling  <code>c.removeAll(c)</code> to clear a collection
is less clear, susceptible to errors from typos, less efficient and
for some collections, might throw a <code>ConcurrentModificationException</code>.
    </p>
     
    
<h3><a name="DM_EXIT">Dm: La m??thode invoque System.exit(...) (DM_EXIT)</a></h3>


<p>Invoquer <code>System.exit()</code> arr??te toute la JVM. Cela ne doit ??tre fait que lorsque c'est n??cessaire. De tels appels rendent difficile ou impossible l'invocation de votre code par d'autre code. Envisagez de d??clencher une <code>RuntimeException</code> ?? la place.</p>

  
<h3><a name="DM_RUN_FINALIZERS_ON_EXIT">Dm: M??thode invoquant runFinalizersOnExit, l'une des plus dangeureuses m??thodes des librairies Java (DM_RUN_FINALIZERS_ON_EXIT)</a></h3>


<p>N'appelez jamais <code>System.runFinalizersOnExit</code> ou <code>Runtime.runFinalizersOnExit</code> pour quelque raison que ce soit : elles font partie des m??thodes les plus dangeureuses des librairies Java</p>
<p>Joshua Bloch</p>

  
<h3><a name="ES_COMPARING_PARAMETER_STRING_WITH_EQ">ES: Comparison of String parameter using == or != (ES_COMPARING_PARAMETER_STRING_WITH_EQ)</a></h3>


  <p>This code compares a <code>java.lang.String</code> parameter for reference
equality using the == or != operators. Requiring callers to
pass only String constants or interned strings to a method is unnecessarily
fragile, and rarely leads to measurable performance gains. Consider
using the <code>equals(Object)</code> method instead.</p>

    
<h3><a name="ES_COMPARING_STRINGS_WITH_EQ">ES: Comparaison d'objets String utilisant == ou != (ES_COMPARING_STRINGS_WITH_EQ)</a></h3>


<p>Ce code compare des objets <code>java.lang.String</code> au moyen de l'??galit?? par r??f??rence des op??rateurs <code>==</code> ou <code>!=</code>. A moins que les deux cha??nes ne soient des constantes dans le fichier source ou aient ??t?? internalis??es au moyen de la m??thode <code>String.intern()</code>, deux cha??nes identiques peuvent ??tre repr??sent??es par deux objets <code>String</code> diff??rents. Envisagez d'utiliser la m??thode <code>equals(Object)</code> ?? la place.</p>

  
<h3><a name="EQ_ABSTRACT_SELF">Eq: Une classe abstraite d??finit une m??thode equals() covariante (EQ_ABSTRACT_SELF)</a></h3>


<p>Cette classe d??finit une version covariante de la m??thode <code>equals()</code>. Pour surcharger correctement la m??thode <code>equals()</code> de <code>java.lang.Object</code>, le param??tre de <code>equals()</code> doit ??tre du type <code>java.lang.Object</code>.</p>

  
<h3><a name="EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS">Eq: Equals checks for incompatible operand (EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS)</a></h3>


  <p> This equals method is checking to see if the argument is some incompatible type
(i.e., a class that is neither a supertype nor subtype of the class that defines
the equals method). For example, the Foo class might have an equals method
that looks like:
</p>
<pre>
public boolean equals(Object o) {
  if (o instanceof Foo)
    return name.equals(((Foo)o).name);
  else if (o instanceof String)
    return name.equals(o);
  else return false;
</pre>

<p>This is considered bad practice, as it makes it very hard to implement an equals method that
is symmetric and transitive. Without those properties, very unexpected behavoirs are possible.
</p>

    
<h3><a name="EQ_COMPARETO_USE_OBJECT_EQUALS">Eq: Class defines compareTo(...) and uses Object.equals() (EQ_COMPARETO_USE_OBJECT_EQUALS)</a></h3>


  <p> This class defines a <code>compareTo(...)</code> method but inherits its
  <code>equals()</code> method from <code>java.lang.Object</code>.
    Generally, the value of compareTo should return zero if and only if
    equals returns true. If this is violated, weird and unpredictable
    failures will occur in classes such as PriorityQueue.
    In Java 5 the PriorityQueue.remove method uses the compareTo method,
    while in Java 6 it uses the equals method.</p>

<p>From the JavaDoc for the compareTo method in the Comparable interface:
<blockquote>
It is strongly recommended, but not strictly required that <code>(x.compareTo(y)==0) == (x.equals(y))</code>.
Generally speaking, any class that implements the Comparable interface and violates this condition
should clearly indicate this fact. The recommended language
is "Note: this class has a natural ordering that is inconsistent with equals."
</blockquote></p>

    
<h3><a name="EQ_GETCLASS_AND_CLASS_CONSTANT">Eq: equals method fails for subtypes (EQ_GETCLASS_AND_CLASS_CONSTANT)</a></h3>


  <p> This class has an equals method that will be broken if it is inherited by subclasses.
It compares a class literal with the class of the argument (e.g., in class <code>Foo</code>
it might check if <code>Foo.class == o.getClass()</code>).
It is better to check if <code>this.getClass() == o.getClass()</code>.
</p>

    
<h3><a name="EQ_SELF_NO_OBJECT">Eq: D??finition d'une m??thode equals() covariante (EQ_SELF_NO_OBJECT)</a></h3>


<p>Cette classe d??finit une version covariante de <code>equals()</code>. Pour surcharger correctement la m??thode <code>equals()</code> de <code>java.lang.Object</code>, le param??tre de <code>equals()</code> doit ??tre du type <code>java.lang.Object</code>.</p>

  
<h3><a name="FI_EMPTY">FI: Un finaliseur vide devrait ??tre supprim?? (FI_EMPTY)</a></h3>


<p>Les m??thodes <code>finalize()</code> vides sont inutiles, donc elles devraient ??tre supprim??es.</p>

  
<h3><a name="FI_EXPLICIT_INVOCATION">FI: Invocation explicite d'un finaliseur (FI_EXPLICIT_INVOCATION)</a></h3>


<p>Cette m??thode contient un appel explicite ?? la m??thode <code>finalize()</code> d'un objet. Les m??thodes <code>finalize()</code> ??tant sens??es n'??tre appel??es qu'une fois, et uniquement par la JVM, c'est une mauvaise id??e.</p>

  
<h3><a name="FI_FINALIZER_NULLS_FIELDS">FI: Finalizer nulls fields (FI_FINALIZER_NULLS_FIELDS)</a></h3>


  <p> This finalizer nulls out fields.  This is usually an error, as it does not aid garbage collection,
  and the object is going to be garbage collected anyway.</p>

    
<h3><a name="FI_FINALIZER_ONLY_NULLS_FIELDS">FI: Finalizer only nulls fields (FI_FINALIZER_ONLY_NULLS_FIELDS)</a></h3>


  <p> This finalizer does nothing except null out fields. This is completely pointless, and requires that
the object be garbage collected, finalized, and then garbage collected again. You should just remove the finalize
method.</p>

    
<h3><a name="FI_MISSING_SUPER_CALL">FI: Le finaliseur n'appelle pas le finaliseur de la super-classe (FI_MISSING_SUPER_CALL)</a></h3>


<p>Cette m??thode <code>finalize()</code> n'appelle pas la m??thode <code>finalize()</code> de sa classe m??re ; donc toutes les actions d??finies au niveau de la classe m??re seront ignor??es. Ajoutez un appel ?? <code>super.finalize()</code>.</p>

  
<h3><a name="FI_NULLIFY_SUPER">FI: Un finaliseur rend inutile celui de sa super-classe (FI_NULLIFY_SUPER)</a></h3>


<p>Cette m??thode <code>finalize()</code> vide rend explicitement inutile tout finaliseur d??fini dans les super-classes. Toute action d??finie dans un finaliseur d'une superclasse sera ignor??e. A moins que cela ne soit voulu, supprimer cette m??thode.</p>

  
<h3><a name="FI_USELESS">FI: Le finaliseur ne fait rien sauf appeler celui de la super-classe (FI_USELESS)</a></h3>


<p>La seule chose que cette m??thode <code>finalize()</code> fait est d'appeler la m??thode <code>finalize()</code> de la super-classe, ce qui la rend redondante. Supprimez la.</p>

  
<h3><a name="VA_FORMAT_STRING_USES_NEWLINE">FS: Format string should use %n rather than \n (VA_FORMAT_STRING_USES_NEWLINE)</a></h3>


<p>
This format string include a newline character (\n). In format strings, it is generally
 preferable better to use %n, which will produce the platform-specific line separator.
</p>

     
<h3><a name="GC_UNCHECKED_TYPE_IN_GENERIC_CALL">GC: Unchecked type in generic call (GC_UNCHECKED_TYPE_IN_GENERIC_CALL)</a></h3>

     
     <p> This call to a generic collection method passes an argument
    while compile type Object where a specific type from
    the generic type parameters is expected.
    Thus, neither the standard Java type system nor static analysis
    can provide useful information on whether the
    object being passed as a parameter is of an appropriate type.
    </p>
     
    
<h3><a name="HE_EQUALS_NO_HASHCODE">HE: La classe d??finit equals() mais pas hashCode() (HE_EQUALS_NO_HASHCODE)</a></h3>


<p>Cette classe surcharge <code>equals(Object)</code>, mais pas <code>hashCode()</code>. C'est pourquoi la classe peut violer le contrat indiquant que des objets ??gaux doivent avoir des codes de hachage identiques.</p>

  
<h3><a name="HE_EQUALS_USE_HASHCODE">HE: La classe d??finit equals() et utilise Object.hashCode() (HE_EQUALS_USE_HASHCODE)</a></h3>


<p>Cette classe surcharge <code>equals(Object)</code>, pas <code>hashCode()</code>, et h??rite de l'impl??mentation de <code>hashCode()</code> issue de <code>java.lang.Object</code> (qui renvoie le code de hachage d'identit??, une valeur arbitraire assign??e ?? l'objet par la JVM). C'est pourquoi la classe a des chances de violer le contrat impliquant que des objets ??gaux doivent avoir des codes de hachage identiques.</p>
<p>Si vous ne pensez pas que des instances de cette classe soient un jour ins??r??s dans des<code>HashMap</code>/<code>Hashtable</code>, l'impl??mentation recommend??e est du type :</p>
<p><pre>
public int hashCode() {
  assert false : "hashCode not designed";
  return 42; // any arbitrary constant will do 
}
</pre></p>

  
<h3><a name="HE_HASHCODE_NO_EQUALS">HE: La classe d??finit hashCode() mais pas equals() (HE_HASHCODE_NO_EQUALS)</a></h3>


<p>Cette classe d??finit une m??thode <code>hashCode()</code> mais pas de m??thode <code>equals()</code>. C'est pourquoi cette classe peut violer le contrat indiquant que des objets identiques doivent avoir des codes de hachage identiques.</p>

  
<h3><a name="HE_HASHCODE_USE_OBJECT_EQUALS">HE: La classe d??finit hashCode() et utilise Object.equals() (HE_HASHCODE_USE_OBJECT_EQUALS)</a></h3>


<p>Cette classe d??finit une m??thode <code>hashCode()</code> mais h??rite la m??thode <code>equals()</code> de <code>java.lang.Object</code> (qui d??finit l'??galit?? par comparaison des r??f??rences des objets). Bien que cela satisfasse certainement le contrat indiquant que les objets ??gaux doivent avoir des codes de hachage ??gaux, ce n'est certainement pas ce qui ??tait voulu lors de la surcharge de la m??thode <code>hashCode()</code> (Surcharger <code>hashCode()</code> implique que l'identit?? des objets soit bas??e sur des crit??res plus compliqu??s qu'une simple ??galit??s des r??f??rences.)</p>
<p>Si vous ne pensez pas que des instances de cette classe soient un jour ins??r??es dans des <code>HashMap</code>/<code>HashTable</code>, l'impl??mentation recommend??e de <code>hashCode</code> est :</p>
<p><pre>
public int hashCode() {
  assert false : "hashCode not designed";
  return 42; // any arbitrary constant will do 
  }
</pre></p>

  
<h3><a name="HE_INHERITS_EQUALS_USE_HASHCODE">HE: La classe h??rite de equals() et utilise Object.hashCode() (HE_INHERITS_EQUALS_USE_HASHCODE)</a></h3>


<p>Cette classe h??rite de la m??thode <code>equals((Object)</code> d'une super-classe abstraite, et de la m??thode <code>hashCode()</code> de l'objet <code>java.lang.Object</code> (qui renvoi le code de hachage d'identit??, une valeur arbitraire assign??e ?? l'objet par la JVM). C'est pourquoi la classe viole probablement le contrat indiquant que des objets ??gaux doivent avoir des codes de hachage identiques.</p>
<p>Si vous ne souhaitez pas d??finir une m??thode <code>hashCode()</code> et/ou ne pensez pas que l'objet puisse un jour ??tre mis dans des <code>HashMap</code>/<code>Hashtable</code>, d??finissez une m??thode <code>hashCode()</code> d??clenchant une <code>UnsupportedOperationException</code>.</p>

  
<h3><a name="IC_SUPERCLASS_USES_SUBCLASS_DURING_INITIALIZATION">IC: Classe m??re utilisant une sous-classe durant son initialisation (IC_SUPERCLASS_USES_SUBCLASS_DURING_INITIALIZATION)</a></h3>


<p>Durant l'intialisation, une classe utilise activement l'une de ses sous-classes. Cette sous-classe ne sera pas encore initialis??e lors de la premi??re utilisation. Par exemple, dans le code suivant, <code>foo</code> sera ?? <code>null</code>.</p>
<p><code><pre>
public class CircularClassInitialization {
    static class InnerClassSingleton extends CircularClassInitialization {
        static InnerClassSingleton singleton = new InnerClassSingleton();
    }
    static CircularClassInitialization foo = InnerClassSingleton.singleton;
}
</pre></code></p>

  
<h3><a name="IMSE_DONT_CATCH_IMSE">IMSE: Interception douteuse d'une IllegalMonitorStateException (IMSE_DONT_CATCH_IMSE)</a></h3>


<p><code>IllegalMonitorStateException</code> n'est g??n??ralement d??clench??e que dans le cas d'une faille dans la conception du code (appeler <code>wait()</code> ou <code>notify()</code> sur un objet dont on ne poss??de pas le verrou).</p>

  
<h3><a name="ISC_INSTANTIATE_STATIC_CLASS">ISC: Instantiation inutile d'une classe qui n'a que des m??thodes statiques (ISC_INSTANTIATE_STATIC_CLASS)</a></h3>


<p>Cette classe alloue un objet bas?? sur une classe qui n'a que des m??thodes statiques. Cet objet n'a pas besoin d'??tre cr????, acc??dez directement aux m??thodes en utilisant le nom de la classe.</p>

  
<h3><a name="IT_NO_SUCH_ELEMENT">It: La m??thode next() de Iterator ne peut pas d??clencher une exception NoSuchElement (IT_NO_SUCH_ELEMENT)</a></h3>


<p>Cette classe impl??mente l'interface <code>java.util.Iterator</code>. N??anmoins, sa m??thode <code>next()</code> n'est pas capable de d??clencher <code>java.util.NoSuchElementException</code>. La m??thode <code>next()</code> devrait ??tre modifi??e pour d??clencher <code>NoSuchElementException</code> si elle est appel??e alors qu'il n'y a plus d'??l??ments ?? renvoyer.</p>

  
<h3><a name="J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION">J2EE: Stockage d'un objet non serialisable dans une session Http (J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION)</a></h3>


<p>Ce code semble stocker un objet non s??rialisable dans un <code>HttpSession</code>. Une erreur se produira si cette session est rendue passive ou migr??e.</p>

  
<h3><a name="JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS">JCIP: Les champs d'une classe immuable devraient ??tre finaux. (JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS)</a></h3>


La classe est annot??e avec <code>net.jcip.annotations.Immutable</code>, et la r??gle li??e ?? cette annotation r??clame que tous les champs soient marqu??s <code>final</code>.

  
<h3><a name="ME_ENUM_FIELD_SETTER">ME: Public enum method unconditionally sets its field (ME_ENUM_FIELD_SETTER)</a></h3>


  <p>This public method declared in public enum unconditionally sets enum field, thus this field can be changed by malicious code 
  or by accident from another package. Though mutable enum fields may be used for lazy initialization, it's a bad practice to expose them to the outer world.
  Consider removing this method or declaring it package-private.</p>

    
<h3><a name="ME_MUTABLE_ENUM_FIELD">ME: Enum field is public and mutable (ME_MUTABLE_ENUM_FIELD)</a></h3>


  <p>A mutable public field is defined inside a public enum, thus can be changed by malicious code or by accident from another package.
  Though mutable enum fields may be used for lazy initialization, it's a bad practice to expose them to the outer world.
  Consider declaring this field final and/or package-private.</p>

    
<h3><a name="NP_BOOLEAN_RETURN_NULL">NP: Method with Boolean return type returns explicit null (NP_BOOLEAN_RETURN_NULL)</a></h3>

       
       <p>
    A method that returns either Boolean.TRUE, Boolean.FALSE or null is an accident waiting to happen.
    This method can be invoked as though it returned a value of type boolean, and
    the compiler will insert automatic unboxing of the Boolean value. If a null value is returned,
    this will result in a NullPointerException.
       </p>
       
       
<h3><a name="NP_CLONE_COULD_RETURN_NULL">NP: Clone method may return null (NP_CLONE_COULD_RETURN_NULL)</a></h3>

      
      <p>
    This clone method seems to return null in some circumstances, but clone is never
    allowed to return a null value.  If you are convinced this path is unreachable, throw an AssertionError
    instead.
      </p>
      
   
<h3><a name="NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT">NP: M??thode equals() ne v??rifiant pas la nullit?? (NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT)</a></h3>


<p>Cette impl??mentation de <code>equals(Object)</code> ne respecte pas le contrat d??fini par <code>java.lang.Object.equals()</code> car elle ne v??rifie la nullit?? du param??tre re??u en argument. Toutes les m??thodes <code>equals()</code> doivent renvoyer <code>false</code> quand elles re??oivent une valeur ?? <code>null</code>.</p>

  
<h3><a name="NP_TOSTRING_COULD_RETURN_NULL">NP: toString method may return null (NP_TOSTRING_COULD_RETURN_NULL)</a></h3>

      
      <p>
    This toString method seems to return null in some circumstances. A liberal reading of the
    spec could be interpreted as allowing this, but it is probably a bad idea and could cause
    other code to break. Return the empty string or some other appropriate string rather than null.
      </p>
      
   
<h3><a name="NM_CLASS_NAMING_CONVENTION">Nm: Nom de classe devant commencer par une majuscule (NM_CLASS_NAMING_CONVENTION)</a></h3>


<p>Les noms de classe doivent ??tre en minuscules avec la premi??re lettre de chaque mot en majuscules. Essayez de conserver vos noms de classes simples et explicites. Utilisez des mots entiers et ??vitez acronymes et abbr??viations (?? moins que l'abbr??viation soit plus largement utilis??e que la forme longue, comme "URL" ou "HTML").</p>

  
<h3><a name="NM_CLASS_NOT_EXCEPTION">Nm: Cette classe ne d??rive pas d'Exception, m??me si son nom le sous-entend (NM_CLASS_NOT_EXCEPTION)</a></h3>


<p>Cette classe n'est pas d??riv??e d'une autre <code>Exception</code> alors que son nom se termine par 'Exception'. Ceci risque de porter ?? confusion les utilisateurs de cette classe.</p>

  
<h3><a name="NM_CONFUSING">Nm: Noms de m??thodes ambigus (NM_CONFUSING)</a></h3>


<p>Les m??thodes indiqu??es ont des noms qui ne diff??rent que par les majuscules.</p>

  
<h3><a name="NM_FIELD_NAMING_CONVENTION">Nm: Nom de champ devant commencer par une minuscule (NM_FIELD_NAMING_CONVENTION)</a></h3>


<p>Les noms de champs qui ne sont pas finaux devraient ??tre en minuscules avec la premi??re lettre des mots, apr??s le premier, en majuscule.</p>

  
<h3><a name="NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER">Nm: Use of identifier that is a keyword in later versions of Java (NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER)</a></h3>


<p>The identifier is a word that is reserved as a keyword in later versions of Java, and your code will need to be changed
in order to compile it in later versions of Java.</p>


    
<h3><a name="NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER">Nm: Use of identifier that is a keyword in later versions of Java (NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER)</a></h3>


<p>This identifier is used as a keyword in later versions of Java. This code, and
any code that references this API,
will need to be changed in order to compile it in later versions of Java.</p>


    
<h3><a name="NM_METHOD_NAMING_CONVENTION">Nm: Nom de m??thode devant commencer par une minuscule (NM_METHOD_NAMING_CONVENTION)</a></h3>


<p>Les noms de m??thodes devraient ??tre des verbes en minuscules, avec la premi??re lettre des mots, apr??s le premier, en majuscules.</p>

  
<h3><a name="NM_SAME_SIMPLE_NAME_AS_INTERFACE">Nm: Class names shouldn't shadow simple name of implemented interface (NM_SAME_SIMPLE_NAME_AS_INTERFACE)</a></h3>


  <p> This class/interface has a simple name that is identical to that of an implemented/extended interface, except
that the interface is in a different package (e.g., <code>alpha.Foo</code> extends <code>beta.Foo</code>).
This can be exceptionally confusing, create lots of situations in which you have to look at import statements
to resolve references and creates many
opportunities to accidentally define methods that do not override methods in their superclasses.
</p>

    
<h3><a name="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS">Nm: Class names shouldn't shadow simple name of superclass (NM_SAME_SIMPLE_NAME_AS_SUPERCLASS)</a></h3>


  <p> This class has a simple name that is identical to that of its superclass, except
that its superclass is in a different package (e.g., <code>alpha.Foo</code> extends <code>beta.Foo</code>).
This can be exceptionally confusing, create lots of situations in which you have to look at import statements
to resolve references and creates many
opportunities to accidentally define methods that do not override methods in their superclasses.
</p>

    
<h3><a name="NM_VERY_CONFUSING_INTENTIONAL">Nm: Very confusing method names (but perhaps intentional) (NM_VERY_CONFUSING_INTENTIONAL)</a></h3>


  <p> The referenced methods have names that differ only by capitalization.
This is very confusing because if the capitalization were
identical then one of the methods would override the other. From the existence of other methods, it
seems that the existence of both of these methods is intentional, but is sure is confusing.
You should try hard to eliminate one of them, unless you are forced to have both due to frozen APIs.
</p>

    
<h3><a name="NM_WRONG_PACKAGE_INTENTIONAL">Nm: Method doesn't override method in superclass due to wrong package for parameter (NM_WRONG_PACKAGE_INTENTIONAL)</a></h3>


  <p> The method in the subclass doesn't override a similar method in a superclass because the type of a parameter doesn't exactly match
the type of the corresponding parameter in the superclass. For example, if you have:</p>

<blockquote>
<pre>
import alpha.Foo;
public class A {
  public int f(Foo x) { return 17; }
}
----
import beta.Foo;
public class B extends A {
  public int f(Foo x) { return 42; }
  public int f(alpha.Foo x) { return 27; }
}
</pre>
</blockquote>

<p>The <code>f(Foo)</code> method defined in class <code>B</code> doesn't
override the
<code>f(Foo)</code> method defined in class <code>A</code>, because the argument
types are <code>Foo</code>'s from different packages.
</p>

<p>In this case, the subclass does define a method with a signature identical to the method in the superclass,
so this is presumably understood. However, such methods are exceptionally confusing. You should strongly consider
removing or deprecating the method with the similar but not identical signature.
</p>

    
<h3><a name="ODR_OPEN_DATABASE_RESOURCE">ODR: La m??thode peut ne pas fermer une ressource base de donn??es (ODR_OPEN_DATABASE_RESOURCE)</a></h3>


<p>Cette m??thode cr??e une ressource base de donn??es (telle qu'une connexion ou un <code>RowSet</code>), ne l'affecte ?? aucun champ, ne la passe ?? aucune autre m??thode, ne la renvoie pas, et ne semble pas la fermer dans tous les chemins d'ex??cution. Ne pas fermer une ressource base de donn??es dans tous les chemins d'ex??cution peut entra??ner de faibles performances et poser des probl??mes de communication entre la base de donn??es et l'application.</p>

  
<h3><a name="ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH">ODR: La m??thode peut ne pas fermer une ressource base de donn??es sur une exception (ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH)</a></h3>


<p>Cette m??thode cr??e une ressource base de donn??es (telle qu'une connexion ou un <code>RowSet</code>), ne l'affecte ?? aucun champ, ne la passe ?? aucune autre m??thode, ne la renvoie pas, et ne semble pas la fermer dans tous les chemins d'exception. Ne pas fermer une ressource base de donn??es peut entra??ner de faibles performances et poser des probl??mes de communication entre la base de donn??es et l'application.</p>

  
<h3><a name="OS_OPEN_STREAM">OS: La m??thode peut ne pas fermer un flux (OS_OPEN_STREAM)</a></h3>


<p>La m??thode cr??e un objet de flux d'E/S, ne l'assigne ?? aucun champ, ne le passe ?? aucune m??thode, ne le renvoit pas et ne semble pas le fermer dans tous les chemins d'ex??cution. Ceci peut entra??ner le blocage d'un descripteur de fichier. C'est g??n??ralement une bonne id??e d'utiliser un bloc <code>finally</code> pour s'assurer de la fermeture des flux.</p>

  
<h3><a name="OS_OPEN_STREAM_EXCEPTION_PATH">OS: La m??thode peut oublier de fermer un flux en cas d'exception (OS_OPEN_STREAM_EXCEPTION_PATH)</a></h3>


<p>La m??thode cr??e un flux d'E/S, ne l'affecte ?? aucun champ, ne le passe ?? aucune m??thode, ne le renvoit pas, et ne semble pas le fermer dans tous les chemins d'exception possibles. Ceci peut provoquer le blocage d'un descripteur de fichier. C'est g??n??ralement une bonne id??e d'utiliser un bloc <code>finally</code> pour garantir la fermeture des flux.</p>

  
<h3><a name="PZ_DONT_REUSE_ENTRY_OBJECTS_IN_ITERATORS">PZ: Don't reuse entry objects in iterators (PZ_DONT_REUSE_ENTRY_OBJECTS_IN_ITERATORS)</a></h3>

     
     <p> The entrySet() method is allowed to return a view of the
     underlying Map in which an Iterator and Map.Entry. This clever
     idea was used in several Map implementations, but introduces the possibility
     of nasty coding mistakes. If a map <code>m</code> returns
     such an iterator for an entrySet, then
     <code>c.addAll(m.entrySet())</code> will go badly wrong. All of
     the Map implementations in OpenJDK 1.7 have been rewritten to avoid this,
     you should to.
    </p>
     
    
<h3><a name="RC_REF_COMPARISON_BAD_PRACTICE">RC: Suspicious reference comparison to constant (RC_REF_COMPARISON_BAD_PRACTICE)</a></h3>


<p> This method compares a reference value to a constant using the == or != operator,
where the correct way to compare instances of this type is generally
with the equals() method.
It is possible to create distinct instances that are equal but do not compare as == since
they are different objects.
Examples of classes which should generally
not be compared by reference are java.lang.Integer, java.lang.Float, etc.</p>

    
<h3><a name="RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN">RC: Suspicious reference comparison of Boolean values (RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN)</a></h3>


<p> This method compares two Boolean values using the == or != operator.
Normally, there are only two Boolean values (Boolean.TRUE and Boolean.FALSE),
but it is possible to create other Boolean objects using the <code>new Boolean(b)</code>
constructor. It is best to avoid such objects, but if they do exist,
then checking Boolean objects for equality using == or != will give results
than are different than you would get using <code>.equals(...)</code>
</p>

    
<h3><a name="RR_NOT_CHECKED">RR: La m??thode ignore le r??sultat de InputStream.read() (RR_NOT_CHECKED)</a></h3>


<p>Cette m??thode ignore le code retour d'une des variantes de <code>java.io.InputStream.read()</code> qui peut renvoyer de multiples octets. Si la valeur renvoy??e n'est pas v??rifi??e, l'appelant ne sera pas capable de g??rer correctement le cas ou moins d'octets que pr??vu auront ??t?? lus. C'est un bogue particuli??rement insidieux car dans la plupart des programmes les lectures renvoient effectivement souvent le nombre d'octets demand??, les plantages restant sporadiques.</p>

  
<h3><a name="SR_NOT_CHECKED">RR: La m??thode ignore le r??sultat de InputStream.skip() (SR_NOT_CHECKED)</a></h3>


<p>Cette m??thode ignore la valeur renvoy??e par <code>java.io.InputStream.skip()</code>, qui peut sauter de multiples octets. Si la valeur renvoy??e n'est pas v??rifi??e, l'appelant n'est pas capable de g??rer correctement les cas ou moins d'octets que pr??vu auront ??t?? saut??s. C'est un type de bogue particuli??rement insidieux car la plupart du temps le bon nombre d'octet sera effectivement saut??, et les plantages seront sporadiques. N??anmoins, sur les flux bufferis??s, <code>skip()</code> ne s'applique qu'aux donn??es du buffer et ??choue fr??quemment ?? sauter le nombre d'octets demand??.</p>

  
<h3><a name="RV_NEGATING_RESULT_OF_COMPARETO">RV: Negating the result of compareTo()/compare() (RV_NEGATING_RESULT_OF_COMPARETO)</a></h3>


  <p> This code negatives the return value of a compareTo or compare method.
This is a questionable or bad programming practice, since if the return
value is Integer.MIN_VALUE, negating the return value won't
negate the sign of the result. You can achieve the same intended result
by reversing the order of the operands rather than by negating the results.
</p>

    
<h3><a name="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE">RV: Method ignores exceptional return value (RV_RETURN_VALUE_IGNORED_BAD_PRACTICE)</a></h3>


   <p> This method returns a value that is not checked. The return value should be checked
since it can indicate an unusual or unexpected function execution. For
example, the <code>File.delete()</code> method returns false
if the file could not be successfully deleted (rather than
throwing an Exception).
If you don't check the result, you won't notice if the method invocation
signals unexpected behavior by returning an atypical return value.
</p>

    
<h3><a name="SI_INSTANCE_BEFORE_FINALS_ASSIGNED">SI: Initialiseur statique de classe cr??ant une instance avant que tous les champs static final soient aliment??s (SI_INSTANCE_BEFORE_FINALS_ASSIGNED)</a></h3>


<p>L'initialiseur <code>static</code> de la classe cr??e une instance de la classe avant que tous les champs <code>static final</code> soient aliment??s.</p>

  
<h3><a name="SW_SWING_METHODS_INVOKED_IN_SWING_THREAD">SW: Certaines m??thodes Swing ne doivent ??tre invoqu??es qu'?? partir du thread Swing (SW_SWING_METHODS_INVOKED_IN_SWING_THREAD)</a></h3>


<p>(<a href="http://java.sun.com/developer/JDCTechTips/2003/tt1208.html#1">Conseil technique JDC</a>) : les m??thodes Swing <code>show()</code>, <code>setVisible()</code> et <code>pack()</code> cr??ent les ressources associ??es ?? la fen??tre. En m??me temps que la cr??ation de ces ressources, le syst??me cr??e le processus Swing de r??partition de ??v??nements.</p>
<p>Ceci pose probl??me car le processus de r??partition des ??v??nements peut notifier des ??couteurs alors que <code>pack()</code> et <code>validate()</code> sont toujours en cours de traitement. Cette situation peut conduire ?? ce que deux processus essayent d'acc??der en m??me temps au composant, ce qui est une faille s??rieuse qui peut provoquer des interblocages et autres probl??mes de synchronisation.</p>
<p>Un appel ?? <code>pack()</code> provoque l'initialisation du composant. Quand ils s'initialisent (sans ??tre forc??ment visibles), les composants peuvent ??mettre des ??v??nements vers le processus de r??partition des ??v??nements de Swing.</p>

  
<h3><a name="SE_BAD_FIELD">Se: Champ d'instance non transient et non s??rialisable dans une classe s??rialisable (SE_BAD_FIELD)</a></h3>


<p>Cette classe <code>Serializable</code> d??finit un champ d'instance non primitif qui n'est ni <code>transient</code>, ni <code>Serializable</code> ou <code>java.lang.Object</code>, et qui ne semble pas impl??menter l'interface <code>Externalizable</code> ou les m??thodes <code>readObject()</code> et <code>writeObject()</code>. Les objets de cette classe ne seront pas d??s??rialis??s correctement si un objet non <code>Serializable</code> est stock?? dans ce champ.</p>

  
<h3><a name="SE_BAD_FIELD_INNER_CLASS">Se: Non-serializable class has a serializable inner class (SE_BAD_FIELD_INNER_CLASS)</a></h3>


<p> This Serializable class is an inner class of a non-serializable class.
Thus, attempts to serialize it will also attempt to associate instance of the outer
class with which it is associated, leading to a runtime error.
</p>
<p>If possible, making the inner class a static inner class should solve the
problem. Making the outer class serializable might also work, but that would
mean serializing an instance of the inner class would always also serialize the instance
of the outer class, which it often not what you really want.

    
<h3><a name="SE_BAD_FIELD_STORE">Se: Valeur non s??rialisable stock??e dans un champ d'instance de classe s??rialisable (SE_BAD_FIELD_STORE)</a></h3>


<p>Une valeur non s??rialisable est stock??e dans un champ non <code>transient</code> d'une classe s??rialisable.</p>

  
<h3><a name="SE_COMPARATOR_SHOULD_BE_SERIALIZABLE">Se: Comparateur n'impl??mentant pas Serializable (SE_COMPARATOR_SHOULD_BE_SERIALIZABLE)</a></h3>


<p>Cette classe impl??mente l'interface <code>Comparator</code>. Vous devriez v??rifier si elle doit ou pas ??galement impl??menter l'interface <code>Serializable</code>. Si un comparateur est utilis?? pour construire une collection tri??e, telle que <code>TreeMap</code>, alors le <code>TreeMap</code> ne sera s??rialisable uniquement si le compareteur l'est aussi. Puisque la plupart des comparateurs ont de petits voire aucun ??tats, les rendre s??rialisables est g??n??ralement une technique de programmation d??fensive simple et b??n??fique.</p>

  
<h3><a name="SE_INNER_CLASS">Se: Serializable inner class (SE_INNER_CLASS)</a></h3>


<p> This Serializable class is an inner class.  Any attempt to serialize
it will also serialize the associated outer instance. The outer instance is serializable,
so this won't fail, but it might serialize a lot more data than intended.
If possible, making the inner class a static inner class (also known as a nested class) should solve the
problem.

    
<h3><a name="SE_NONFINAL_SERIALVERSIONID">Se: serialVersionUID n'est pas final (SE_NONFINAL_SERIALVERSIONID)</a></h3>


<p>Cette classe d??finit un champ <code>serialVersionUID</code> qui n'est pas <code>final</code>. Ce champ devrait ??tre rendu <code>final</code> si son but est de pr??ciser l'identifiant de version utilis?? pour la s??rialisation.</p>

  
<h3><a name="SE_NONLONG_SERIALVERSIONID">Se: serialVersionUID n'est pas de type long (SE_NONLONG_SERIALVERSIONID)</a></h3>


<p>Cette classe d??finit un champ <code>serialVersionUID</code> qui n'est pas de type <code>long</code>. Ce champ devrait ??tre de type <code>long</code> si son but est de pr??ciser l'identifiant de version utilis?? pour la s??rialisation.</p>

  
<h3><a name="SE_NONSTATIC_SERIALVERSIONID">Se: serialVersionUID n'est pas static (SE_NONSTATIC_SERIALVERSIONID)</a></h3>


<p>Cette classe d??finit un champ <code>serialVersionUID</code> qui n'est pas statique. Le champ devrait ??tre rendu statique si son but est de pr??ciser l'identifiant de version utilis?? pour la s??rialisation.</p>

  
<h3><a name="SE_NO_SUITABLE_CONSTRUCTOR">Se: La classe est Serializable mais sa super-classe ne poss??de pas de constructeur par d??faut visible (SE_NO_SUITABLE_CONSTRUCTOR)</a></h3>


<p>Cette classe impl??mente l'interface <code>Serializable</code> mais pas sa super-classe. Quand un tel objet est d??s??rialis??, les champs de la classe m??re doivent ??tre initialis??s en invoquant le constructeur par d??faut de la super-classe. Comme la super-classe n'en a pas, s??rialisation et d??s??rialisation ??choueront ?? l'ex??cution.</p>

  
<h3><a name="SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION">Se: La classe est Externalizable mais ne d??finit pas de constructeur par d??faut (SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION)</a></h3>


<p>Cette classe impl??mente l'interface <code>Externalizable</code>, mais ne d??finit pas de constructeur par d??faut. Quand les objets <code>Externalizable</code> sont d??serialis??s, ils doivent d'abord ??tre construit au moyen du constructeur par d??faut. Cette classe n'en ayant pas, s??rialisation et d??s??rialisation ??choueront ?? l'ex??cution.</p>

  
<h3><a name="SE_READ_RESOLVE_MUST_RETURN_OBJECT">Se: La m??thode readResolve doit retourner un Object (SE_READ_RESOLVE_MUST_RETURN_OBJECT)</a></h3>


<p>Pour que la m??thode <code>readResolve</code> soit prise en compte pas le m??canisme de s??rialisation, elle doit avoir Object comme type de retour.</p>

  
<h3><a name="SE_TRANSIENT_FIELD_NOT_RESTORED">Se: Champ "transient" non positionn?? lors de la d??s??rialisation (SE_TRANSIENT_FIELD_NOT_RESTORED)</a></h3>


<p>Cette classe contient un champ qui est mis-??-jour ?? de nombreux endrois dans la classe, et qui semble faire parti du d??marrage de la classe. Mais, ce champ ??tant marqu?? comme <code>transient</code> et n'??tant pas aliment?? par les m??thodes <code>readObject</code> et <code>readResolve</code>, il contiendra la valeur par d??faut dans toutes les instances d??s??rialis??es de la classe.</p>

  
<h3><a name="SE_NO_SERIALVERSIONID">SnVI: La classe est Serializable, mais ne d??finit pas serialVersionUID (SE_NO_SERIALVERSIONID)</a></h3>


<p>Cette classe impl??mente l'interface <code>Serializable</code> mais ne d??finit pas de champ <code>serialVersionUID</code>. Une modification aussi simple qu'ajouter une r??f??rence vers un objet <code>.class</code> ajoutera des champs synth??tiques ?? la classe, ce qui malheureusement changera la valeur implicite de <code>serialVersionUID</code> (Ex. : ajouter une r??f??rence ?? <code>String.class</code> g??n??rera un champ statique <code>class$java$lang$String</code>). De plus, diff??rents compilateurs source vers bytecode peuvent utiliser diff??rentes conventions de nommage pour les variables synth??tiques g??n??r??es pour r??f??rencer les objets classes et les classes internes. Afin de garantir l'interop??rabilit?? de <code>Serializable</code> suivant les versions, pensez ?? ajouter un champ <code>serialVersionUID</code> explicite.</p>

  
<h3><a name="UI_INHERITANCE_UNSAFE_GETRESOURCE">UI: L'utilisation de GetResource peut-??tre instable si la classe est ??tendue (UI_INHERITANCE_UNSAFE_GETRESOURCE)</a></h3>


<p>Appeler <code>this.getClass().getResource(...)</code> peut rendre des r??sultats diff??rents de ceux attendus si la classe est ??tendue par une classe d'un autre paquetage.</p>

  
<h3><a name="BC_IMPOSSIBLE_CAST">BC: Transtypage impossible (BC_IMPOSSIBLE_CAST)</a></h3>


<p>Ce trantypage lancera toujours une exception <code>ClassCastException</code>.</p>

  
<h3><a name="BC_IMPOSSIBLE_DOWNCAST">BC: Impossible downcast (BC_IMPOSSIBLE_DOWNCAST)</a></h3>


<p>
This cast will always throw a ClassCastException.
The analysis believes it knows
the precise type of the value being cast, and the attempt to
downcast it to a subtype will always fail by throwing a ClassCastException.
</p>

    
<h3><a name="BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY">BC: Impossible downcast of toArray() result (BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY)</a></h3>


<p>
This code is casting the result of calling <code>toArray()</code> on a collection
to a type more specific than <code>Object[]</code>, as in:</p>
<pre>
String[] getAsArray(Collection&lt;String&gt; c) {
  return (String[]) c.toArray();
  }
</pre>
<p>This will usually fail by throwing a ClassCastException. The <code>toArray()</code>
of almost all collections return an <code>Object[]</code>. They can't really do anything else,
since the Collection object has no reference to the declared generic type of the collection.
<p>The correct way to do get an array of a specific type from a collection is to use
  <code>c.toArray(new String[]);</code>
  or <code>c.toArray(new String[c.size()]);</code> (the latter is slightly more efficient).
<p>There is one common/known exception exception to this. The <code>toArray()</code>
method of lists returned by <code>Arrays.asList(...)</code> will return a covariantly
typed array. For example, <code>Arrays.asArray(new String[] { "a" }).toArray()</code>
will return a <code>String []</code>. FindBugs attempts to detect and suppress
such cases, but may miss some.
</p>

    
<h3><a name="BC_IMPOSSIBLE_INSTANCEOF">BC: instanceof renverra toujours faux (BC_IMPOSSIBLE_INSTANCEOF)</a></h3>


<p>Ce test <code>instanceof</code> renverra toujours faux. M??me s'il est s??r, assurez-vous qu'il ne s'agisse pas d'une erreur logique ou d'une mauvaise compr??hension.</p>

  
<h3><a name="BIT_ADD_OF_SIGNED_BYTE">BIT: Bitwise add of signed byte value (BIT_ADD_OF_SIGNED_BYTE)</a></h3>


<p> Adds a byte value and a value which is known to have the 8 lower bits clear.
Values loaded from a byte array are sign extended to 32 bits
before any any bitwise operations are performed on the value.
Thus, if <code>b[0]</code> contains the value <code>0xff</code>, and
<code>x</code> is initially 0, then the code
<code>((x &lt;&lt; 8) + b[0])</code>  will sign extend <code>0xff</code>
to get <code>0xffffffff</code>, and thus give the value
<code>0xffffffff</code> as the result.
</p>

<p>In particular, the following code for packing a byte array into an int is badly wrong: </p>
<pre>
int result = 0;
for(int i = 0; i &lt; 4; i++)
  result = ((result &lt;&lt; 8) + b[i]);
</pre>

<p>The following idiom will work instead: </p>
<pre>
int result = 0;
for(int i = 0; i &lt; 4; i++)
  result = ((result &lt;&lt; 8) + (b[i] &amp; 0xff));
</pre>


    
<h3><a name="BIT_AND">BIT: Masques binaires incompatibles (BIT_AND)</a></h3>


<p>Cette m??thode compare une expression de la forme (a <code>&amp;</code> C) avec D, qui est toujours in??gale en raison des valeurs sp??cifiques des constantes C et D. Cela peut indiquer une faute de frappe ou une erreur logique.</p>

  
<h3><a name="BIT_AND_ZZ">BIT: Masques binaires incompatibles (BIT_AND_ZZ)</a></h3>


<p>Cette m??thode compare une expression de la forme (a <code>&amp;</code> 0) avec 0, qui est toujours ??gale. Ceci peut indiquer une faute de frappe ou une erreur logique.</p>

  
<h3><a name="BIT_IOR">BIT: Masques binaires incompatibles (BIT_IOR)</a></h3>


<p>Cette m??thode compare une expression de la forme (a <code>|</code> C) avec D, qui est toujours in??gale en raison des valeurs sp??cifiques des constantes C et D. Ceci peut indiquer une erreur logique ou une faute de frappe.</p>
<p>Typiquement, ce bogue arrive quand du code essaye d'effectuer un test d'apparition d'un bit mais utilise l'op??rateur OU ("<code>|</code>") au lieu de l'op??rateur ET ("<code>&amp;</code>").</p>

  
<h3><a name="BIT_IOR_OF_SIGNED_BYTE">BIT: Ou binaire d'un octet sign?? (BIT_IOR_OF_SIGNED_BYTE)</a></h3>


<p>Charge une valeur ?? partir d'un tableau d'octets et effectue un ou binaire sur cette valeur. Les valeurs venant d'un tableau d'octet sont sign??es et risquent donc de ne pas se comporter comme pr??vue.</p>

  
<h3><a name="BIT_SIGNED_CHECK_HIGH_BIT">BIT: Check for sign of bitwise operation (BIT_SIGNED_CHECK_HIGH_BIT)</a></h3>


<p> This method compares an expression such as</p>
<pre>((event.detail &amp; SWT.SELECTED) &gt; 0)</pre>.
<p>Using bit arithmetic and then comparing with the greater than operator can
lead to unexpected results (of course depending on the value of
SWT.SELECTED). If SWT.SELECTED is a negative number, this is a candidate
for a bug. Even when SWT.SELECTED is not negative, it seems good practice
to use '!= 0' instead of '&gt; 0'.
</p>
<p>
<em>Boris Bokowski</em>
</p>

    
<h3><a name="BOA_BADLY_OVERRIDDEN_ADAPTER">BOA: La classe surcharge mal une m??thode impl??ment??e dans une superclasse Adapter (BOA_BADLY_OVERRIDDEN_ADAPTER)</a></h3>


<p>Cette m??thode surcharge une m??thode provenant d'une classe m??re qui est un <code>Adapter</code> qui impl??mente un <code>Listener</code> d??fini dans le paquetage <code>java.awt.event</code> ou <code>javax.swing.event</code>. En cons??quence, cette m??thode ne sera pas appel??e quand l'??v??nement se produira.</p>

  
<h3><a name="BSHIFT_WRONG_ADD_PRIORITY">BSHIFT: Possible bad parsing of shift operation (BSHIFT_WRONG_ADD_PRIORITY)</a></h3>


<p>
The code performs an operation like (x &lt;&lt; 8 + y). Although this might be correct, probably it was meant 
to perform (x &lt;&lt; 8) + y, but shift operation has
a lower precedence, so it's actually parsed as x &lt;&lt; (8 + y).
</p>

    
<h3><a name="ICAST_BAD_SHIFT_AMOUNT">BSHIFT: D??calage d'un int hors de proportion (0..31) (ICAST_BAD_SHIFT_AMOUNT)</a></h3>


<p>Un d??calage de n bits est effectu?? avec n hors des limites (0..31). Ceci r??sulte en l'utilisation des 5 bits inf??rieurs de l'entier pour d??cider de la valeur du d??calage. Ce n'est sans doute pas l'effet recherch?? et est pour le moins source de confusion.</p>

  
<h3><a name="DLS_DEAD_LOCAL_INCREMENT_IN_RETURN">DLS: Useless increment in return statement (DLS_DEAD_LOCAL_INCREMENT_IN_RETURN)</a></h3>

      
<p>This statement has a return such as <code>return x++;</code>.
A postfix increment/decrement does not impact the value of the expression,
so this increment/decrement has no effect.
Please verify that this statement does the right thing.
</p>

    
<h3><a name="DLS_DEAD_STORE_OF_CLASS_LITERAL">DLS: Dead store of class literal (DLS_DEAD_STORE_OF_CLASS_LITERAL)</a></h3>


<p>
This instruction assigns a class literal to a variable and then never uses it.
<a href="//java.sun.com/j2se/1.5.0/compatibility.html#literal">The behavior of this differs in Java 1.4 and in Java 5.</a>
In Java 1.4 and earlier, a reference to <code>Foo.class</code> would force the static initializer
for <code>Foo</code> to be executed, if it has not been executed already.
In Java 5 and later, it does not.
</p>
<p>See Sun's <a href="//java.sun.com/j2se/1.5.0/compatibility.html#literal">article on Java SE compatibility</a>
for more details and examples, and suggestions on how to force class initialization in Java 5.
</p>

    
<h3><a name="DLS_OVERWRITTEN_INCREMENT">DLS: Incr??mentation annul??e (DLS_OVERWRITTEN_INCREMENT)</a></h3>


<p>Ce code incr??mente une valeur (ex., <code>i++</code>) et en annule imm??diatement l'effet. Par exemple, <code>i = i++</code> r????crit de fa??on imm??diate la valeur incr??ment??e avec la valeur originale.</p>

  
<h3><a name="DMI_ARGUMENTS_WRONG_ORDER">DMI: Reversed method arguments (DMI_ARGUMENTS_WRONG_ORDER)</a></h3>


<p> The arguments to this method call seem to be in the wrong order.
For example, a call <code>Preconditions.checkNotNull("message", message)</code>
has reserved arguments: the value to be checked is the first argument.
</p>

    
<h3><a name="DMI_BAD_MONTH">DMI: Valeur constante pour un mois en dehors de l'intervalle attendu de 0 ?? 11 (DMI_BAD_MONTH)</a></h3>


<p>Ce code passe une constante mois en dehors de l'intervalle de 0 ?? 11.</p>

  
<h3><a name="DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE">DMI: BigDecimal constructed from double that isn't represented precisely (DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE)</a></h3>

      
    <p>
This code creates a BigDecimal from a double value that doesn't translate well to a
decimal number.
For example, one might assume that writing new BigDecimal(0.1) in Java creates a BigDecimal which is exactly equal to 0.1 (an unscaled value of 1, with a scale of 1), but it is actually equal to 0.1000000000000000055511151231257827021181583404541015625.
You probably want to use the BigDecimal.valueOf(double d) method, which uses the String representation
of the double to create the BigDecimal (e.g., BigDecimal.valueOf(0.1) gives 0.1).
</p>


    
<h3><a name="DMI_CALLING_NEXT_FROM_HASNEXT">DMI: M??thode hasNext() appelant next() (DMI_CALLING_NEXT_FROM_HASNEXT)</a></h3>


<p>La m??thode <code>hasNext()</code> appelle la m??thode <code>next()</code>. C'est tr??s probablement faux puisque la m??thode <code>hasNext()</code> n'est pas changer l'??tat de l'it??rateur tandis que la m??thode <code>next()</code> doit changer cet ??tat.</p>

  
<h3><a name="DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES">DMI: Collections should not contain themselves (DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES)</a></h3>

     
     <p> This call to a generic collection's method would only make sense if a collection contained
itself (e.g., if <code>s.contains(s)</code> were true). This is unlikely to be true and would cause
problems if it were true (such as the computation of the hash code resulting in infinite recursion).
It is likely that the wrong value is being passed as a parameter.
    </p>
     
    
<h3><a name="DMI_DOH">DMI: D'oh! A nonsensical method invocation (DMI_DOH)</a></h3>

      
    <p>
This partical method invocation doesn't make sense, for reasons that should be apparent from inspection.
</p>


    
<h3><a name="DMI_INVOKING_HASHCODE_ON_ARRAY">DMI: Invocation of hashCode on an array (DMI_INVOKING_HASHCODE_ON_ARRAY)</a></h3>


<p>
The code invokes hashCode on an array. Calling hashCode on
an array returns the same value as System.identityHashCode, and ingores
the contents and length of the array. If you need a hashCode that
depends on the contents of an array <code>a</code>,
use <code>java.util.Arrays.hashCode(a)</code>.

</p>

    
<h3><a name="DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT">DMI: Double.longBitsToDouble invoked on an int (DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT)</a></h3>


<p> The Double.longBitsToDouble method is invoked, but a 32 bit int value is passed
    as an argument. This almostly certainly is not intended and is unlikely
    to give the intended result.
</p>

    
<h3><a name="DMI_VACUOUS_SELF_COLLECTION_CALL">DMI: Vacuous call to collections (DMI_VACUOUS_SELF_COLLECTION_CALL)</a></h3>

     
     <p> This call doesn't make sense. For any collection <code>c</code>, calling <code>c.containsAll(c)</code> should
always be true, and <code>c.retainAll(c)</code> should have no effect.
    </p>
     
    
<h3><a name="DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION">Dm: La r??flexion ne peut pas ??tre utilis??e pour v??rifier la pr??sence d'une annotation avec la r??tention par d??faut (DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION)</a></h3>


<p>A moins qu'une annotation ait elle m??me ??t?? annot??e avec une <code>@Retention</code> diff??rente de la r??tention "source uniquement" par d??faut, l'annotation n'est pas conserv??e dans le fichier .class et ne peut pas ??tre utilis??e par r??flexion (par exemple avec la m??thode <code>isAnnotationPresent()</code>).</p>

  
<h3><a name="DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR">Dm: Futile attempt to change max pool size of ScheduledThreadPoolExecutor (DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR)</a></h3>

      
    <p>(<a href="http://java.sun.com/javase/6/docs/api/java/util/concurrent/ScheduledThreadPoolExecutor.html">Javadoc</a>)
While ScheduledThreadPoolExecutor inherits from ThreadPoolExecutor, a few of the inherited tuning methods are not useful for it. In particular, because it acts as a fixed-sized pool using corePoolSize threads and an unbounded queue, adjustments to maximumPoolSize have no useful effect.
    </p>


    
<h3><a name="DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS">Dm: Creation of ScheduledThreadPoolExecutor with zero core threads (DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS)</a></h3>

      
    <p>(<a href="http://java.sun.com/javase/6/docs/api/java/util/concurrent/ScheduledThreadPoolExecutor.html#ScheduledThreadPoolExecutor(int)">Javadoc</a>)
A ScheduledThreadPoolExecutor with zero core threads will never execute anything; changes to the max pool size are ignored.
</p>


    
<h3><a name="DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD">Dm: Useless/vacuous call to EasyMock method (DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD)</a></h3>

      
    <p>This call doesn't pass any objects to the EasyMock method, so the call doesn't do anything.
</p>


    
<h3><a name="DM_INVALID_MIN_MAX">Dm: Incorrect combination of Math.max and Math.min (DM_INVALID_MIN_MAX)</a></h3>


  <p>This code tries to limit the value bounds using the construct like Math.min(0, Math.max(100, value)). However the order of
  the constants is incorrect: it should be Math.min(100, Math.max(0, value)). As the result this code always produces the same result
  (or NaN if the value is NaN).</p>

    
<h3><a name="EC_ARRAY_AND_NONARRAY">EC: Utilisation de equals() pour comparer un tableau et un objet (EC_ARRAY_AND_NONARRAY)</a></h3>


<p>Cette m??thode appelle <code>equals(Object o)</code> pour comparer un tableau et une r??f??rence qui ne semble pas ??tre un tableau. Si les choses compar??es sont de type diff??rents, il est garanti qu'elles seront non ??gales et la comparaison est probablement une erreur. M??me si les deux sont des tableaux, la m??thode <code>equals()</code> d??termine seulement si les deux tableaux sont le m??me objet. Pour comparer le contenu de deux tableaux, utilisez <code>java.util.Arrays.equals(Object[], Object[])</code>.</p>

  
<h3><a name="EC_BAD_ARRAY_COMPARE">EC: Appel ?? equals() sur un tableau ??quivalent ?? == (EC_BAD_ARRAY_COMPARE)</a></h3>


<p>Cette m??thode invoque la m??thode <code>equals(Object o)</code> d'un tableau. Comme les tableaux ne surchargent pas la m??thode <code>equals()</code> de <code>Object</code>, cet appel revient ?? comparer les adresses. Pour comparer les contenus de tableaux, utilisez <code>java.util.Arrays.equals(Object[], Object[])</code>.</p>

  
<h3><a name="EC_INCOMPATIBLE_ARRAY_COMPARE">EC: equals(...) used to compare incompatible arrays (EC_INCOMPATIBLE_ARRAY_COMPARE)</a></h3>


<p>
This method invokes the .equals(Object o) to compare two arrays, but the arrays of
of incompatible types (e.g., String[] and StringBuffer[], or String[] and int[]).
They will never be equal. In addition, when equals(...) is used to compare arrays it
only checks to see if they are the same array, and ignores the contents of the arrays.
</p>

    
<h3><a name="EC_NULL_ARG">EC: Appel de equals() avec un argument ?? null (EC_NULL_ARG)</a></h3>


<p>Cette m??thode appelle <code>equals(Object)</code>, passant une valeur ?? <code>null</code> comme argument. D'apr??s le contrat de la m??thode <code>equals()</code>, cet appel devrait syst??matiquement renvoyer <code>false</code>.</p>

  
<h3><a name="EC_UNRELATED_CLASS_AND_INTERFACE">EC: Appel de equals() comparant une classe et une interface sans relation (EC_UNRELATED_CLASS_AND_INTERFACE)</a></h3>


<p>Cette m??thode appelle <code>equals(Object)</code> sur deux r??f??rences, l'une de classe, l'autre d'interface, alors que ni la classe, ni aucune de ses sous classes abstraites n'impl??mente l'interface. Les objets compar??s ne font donc probablement pas partie de la m??me hi??rarchie de classe ?? l'ex??cution (?? moins que certaines classes de l'application n'est pas ??t?? analys??es ou soient charg??es dynamiquement ?? l'ex??cution). En accord avec le contrat de <code>equals()</code>, des objets de classes diff??rentes doivent toujours ??tre non ??gaux, donc le r??sultat de cette comparaison par <code>java.lang.Object.equals(Object)</code> renverra syst??matiquement <code>false</code> ?? l'ex??cution.</p>

  
<h3><a name="EC_UNRELATED_INTERFACES">EC: Appel de equals() comparant diff??rentes interfaces (EC_UNRELATED_INTERFACES)</a></h3>


<p>Cette m??thode appelle <code>equals(Object)</code> pour deux r??f??rences d'interfaces sans rapport, aucune n'??tant un sous-type de l'autre et aucune classe non abstraite impl??mentant les deux interfaces. Les objets compar??s ne sont donc probablement pas de la m??me classe ?? l'??x??cution (au moins que certaines classes de l'application n'aient pas ??t?? analys??es ou qu'il y ait des chargements dynamiques). D'apr??s le contrat de <code>equals()</code>, les objets de classes diff??rentes devraient toujours ??tre in??gaux.</p>

  
<h3><a name="EC_UNRELATED_TYPES">EC: Appel de equals() comparant des types diff??rents (EC_UNRELATED_TYPES)</a></h3>


<p>Cette m??thode appelle <code>equals(Object)</code> pour deux r??f??rences de type diff??rents, sans sous-classe commune. Les objets compar??s ne sont donc probablement pas de la m??me classe ?? l'??x??cution (au moins que certaines classes de l'application n'aient pas ??t?? analys??es ou qu'il y ait des chargements dynamiques). D'apr??s le contrat de <code>equals()</code>, les objets de classes diff??rentes devraient toujours ??tre in??gaux, c'est pourquoi la comparaison a de fortes chances de toujours renvoyer <code>false</code> ?? l'ex??cution.</p>

  
<h3><a name="EC_UNRELATED_TYPES_USING_POINTER_EQUALITY">EC: Using pointer equality to compare different types (EC_UNRELATED_TYPES_USING_POINTER_EQUALITY)</a></h3>


<p> This method uses using pointer equality to compare two references that seem to be of
different types.  The result of this comparison will always be false at runtime.
</p>

    
<h3><a name="EQ_ALWAYS_FALSE">Eq: equals method always returns false (EQ_ALWAYS_FALSE)</a></h3>


  <p> This class defines an equals method that always returns false. This means that an object is not equal to itself, and it is impossible to create useful Maps or Sets of this class. More fundamentally, it means
that equals is not reflexive, one of the requirements of the equals method.</p>
<p>The likely intended semantics are object identity: that an object is equal to itself. This is the behavior inherited from class <code>Object</code>. If you need to override an equals inherited from a different
superclass, you can use use:</p>
<pre>
public boolean equals(Object o) { return this == o; }
</pre>

    
<h3><a name="EQ_ALWAYS_TRUE">Eq: equals method always returns true (EQ_ALWAYS_TRUE)</a></h3>


  <p> This class defines an equals method that always returns true. This is imaginative, but not very smart.
Plus, it means that the equals method is not symmetric.
</p>

    
<h3><a name="EQ_COMPARING_CLASS_NAMES">Eq: equals method compares class names rather than class objects (EQ_COMPARING_CLASS_NAMES)</a></h3>


  <p> This method checks to see if two objects are the same class by checking to see if the names
of their classes are equal. You can have different classes with the same name if they are loaded by
different class loaders. Just check to see if the class objects are the same.
</p>

    
<h3><a name="EQ_DONT_DEFINE_EQUALS_FOR_ENUM">Eq: Covariant equals() method defined for enum (EQ_DONT_DEFINE_EQUALS_FOR_ENUM)</a></h3>


  <p> This class defines an enumeration, and equality on enumerations are defined
using object identity. Defining a covariant equals method for an enumeration
value is exceptionally bad practice, since it would likely result
in having two different enumeration values that compare as equals using
the covariant enum method, and as not equal when compared normally.
Don't do it.
</p>

    
<h3><a name="EQ_OTHER_NO_OBJECT">Eq: equals() method defined that doesn't override equals(Object) (EQ_OTHER_NO_OBJECT)</a></h3>


  <p> This class defines an <code>equals()</code>
  method, that doesn't override the normal <code>equals(Object)</code> method
  defined in the base <code>java.lang.Object</code> class.&nbsp; Instead, it
  inherits an <code>equals(Object)</code> method from a superclass.
  The class should probably define a <code>boolean equals(Object)</code> method.
  </p>

    
<h3><a name="EQ_OTHER_USE_OBJECT">Eq: equals() method defined that doesn't override Object.equals(Object) (EQ_OTHER_USE_OBJECT)</a></h3>


  <p> This class defines an <code>equals()</code>
  method, that doesn't override the normal <code>equals(Object)</code> method
  defined in the base <code>java.lang.Object</code> class.&nbsp;
  The class should probably define a <code>boolean equals(Object)</code> method.
  </p>

    
<h3><a name="EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC">Eq: equals method overrides equals in superclass and may not be symmetric (EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC)</a></h3>


  <p> This class defines an equals method that overrides an equals method in a superclass. Both equals methods
methods use <code>instanceof</code> in the determination of whether two objects are equal. This is fraught with peril,
since it is important that the equals method is symmetrical (in other words, <code>a.equals(b) == b.equals(a)</code>).
If B is a subtype of A, and A's equals method checks that the argument is an instanceof A, and B's equals method
checks that the argument is an instanceof B, it is quite likely that the equivalence relation defined by these
methods is not symmetric.
</p>

    
<h3><a name="EQ_SELF_USE_OBJECT">Eq: D??finition d'une m??thode equals() covariante, Object.equals(Object) est h??rit?? (EQ_SELF_USE_OBJECT)</a></h3>


<p>Cette classe d??finit une version covariante de la m??thode <code>equals()</code>, mais appelle la m??thode normale <code>equals(Object)</code> d??finie dans la classe de base <code>java.lang.Object</code>. La classe devrait probablement d??finir une version non covariante de <code>equals()</code>. (C'est-??-dire une m??thode avec la signature <code>boolean equals(java.lang.Object)</code>.</p>

  
<h3><a name="FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER">FE: Test d'??galit?? avec NaN erron?? (FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER)</a></h3>


<p>Ce code v??rifie si une valeur flottante est ??gale ?? la valeur sp??ciale "Not A Number" (Ex. : <code>if (x == Double.NaN)</code>). La s??mantique de <code>NaN</code> fait que, par d??finition, aucune valeur n'est ??gale ?? <code>Nan</code>, y compris <code>NaN</code>. Donc <code>x == Double.NaN</code> renvoi syst??matiquement <code>false</code>.</p>
<p>Pour savoir si la valeur contenu dans <code>x</code> est la valeur particuli??re "Not A Number", utilisez <code>Double.isNaN(x)</code> (ou <code>Float.isNaN(x)</code> si <code>x</code> est en simple pr??cision).</p>

  
<h3><a name="VA_FORMAT_STRING_BAD_ARGUMENT">FS: Format string placeholder incompatible with passed argument (VA_FORMAT_STRING_BAD_ARGUMENT)</a></h3>


<p>
The format string placeholder is incompatible with the corresponding
argument. For example,
<code>
  System.out.println("%d\n", "hello");
</code>
<p>The %d placeholder requires a numeric argument, but a string value is
passed instead.
A runtime exception will occur when
this statement is executed.
</p>

     
<h3><a name="VA_FORMAT_STRING_BAD_CONVERSION">FS: The type of a supplied argument doesn't match format specifier (VA_FORMAT_STRING_BAD_CONVERSION)</a></h3>


<p>
One of the arguments is uncompatible with the corresponding format string specifier.
As a result, this will generate a runtime exception when executed.
For example, <code>String.format("%d", "1")</code> will generate an exception, since
the String "1" is incompatible with the format specifier %d.
</p>

     
<h3><a name="VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED">FS: MessageFormat supplied where printf style format expected (VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED)</a></h3>


<p>
A method is called that expects a Java printf format string and a list of arguments.
However, the format string doesn't contain any format specifiers (e.g., %s) but
does contain message format elements (e.g., {0}).  It is likely
that the code is supplying a MessageFormat string when a printf-style format string
is required. At runtime, all of the arguments will be ignored
and the format string will be returned exactly as provided without any formatting.
</p>

     
<h3><a name="VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED">FS: More arguments are passed than are actually used in the format string (VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED)</a></h3>


<p>
A format-string method with a variable number of arguments is called,
but more arguments are passed than are actually used by the format string.
This won't cause a runtime exception, but the code may be silently omitting
information that was intended to be included in the formatted string.
</p>

     
<h3><a name="VA_FORMAT_STRING_ILLEGAL">FS: Illegal format string (VA_FORMAT_STRING_ILLEGAL)</a></h3>


<p>
The format string is syntactically invalid,
and a runtime exception will occur when
this statement is executed.
</p>

     
<h3><a name="VA_FORMAT_STRING_MISSING_ARGUMENT">FS: Format string references missing argument (VA_FORMAT_STRING_MISSING_ARGUMENT)</a></h3>


<p>
Not enough arguments are passed to satisfy a placeholder in the format string.
A runtime exception will occur when
this statement is executed.
</p>

     
<h3><a name="VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT">FS: No previous argument for format string (VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT)</a></h3>


<p>
The format string specifies a relative index to request that the argument for the previous format specifier
be reused. However, there is no previous argument.
For example,
</p>
<p><code>formatter.format("%&lt;s %s", "a", "b")</code>
</p>
<p>would throw a MissingFormatArgumentException when executed.
</p>

     
<h3><a name="GC_UNRELATED_TYPES">GC: No relationship between generic parameter and method argument (GC_UNRELATED_TYPES)</a></h3>

     
     <p> This call to a generic collection method contains an argument
     with an incompatible class from that of the collection's parameter
    (i.e., the type of the argument is neither a supertype nor a subtype
        of the corresponding generic type argument).
     Therefore, it is unlikely that the collection contains any objects
    that are equal to the method argument used here.
    Most likely, the wrong value is being passed to the method.</p>
    <p>In general, instances of two unrelated classes are not equal.
    For example, if the <code>Foo</code> and <code>Bar</code> classes
    are not related by subtyping, then an instance of <code>Foo</code>
        should not be equal to an instance of <code>Bar</code>.
    Among other issues, doing so will likely result in an equals method
    that is not symmetrical. For example, if you define the <code>Foo</code> class
    so that a <code>Foo</code> can be equal to a <code>String</code>,
    your equals method isn't symmetrical since a <code>String</code> can only be equal
    to a <code>String</code>.
    </p>
    <p>In rare cases, people do define nonsymmetrical equals methods and still manage to make
    their code work. Although none of the APIs document or guarantee it, it is typically
    the case that if you check if a <code>Collection&lt;String&gt;</code> contains
    a <code>Foo</code>, the equals method of argument (e.g., the equals method of the
    <code>Foo</code> class) used to perform the equality checks.
    </p>
     
    
<h3><a name="HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_CLASS">HE: Signature declares use of unhashable class in hashed construct (HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_CLASS)</a></h3>


  <p> A method, field or class declares a generic signature where a non-hashable class
is used in context where a hashable class is required.
A class that declares an equals method but inherits a hashCode() method
from Object is unhashable, since it doesn't fulfill the requirement that
equal objects have equal hashCodes.
</p>

    
<h3><a name="HE_USE_OF_UNHASHABLE_CLASS">HE: Use of class without a hashCode() method in a hashed data structure (HE_USE_OF_UNHASHABLE_CLASS)</a></h3>


  <p> A class defines an equals(Object)  method but not a hashCode() method,
and thus doesn't fulfill the requirement that equal objects have equal hashCodes.
An instance of this class is used in a hash data structure, making the need to
fix this problem of highest importance.

    
<h3><a name="ICAST_INT_2_LONG_AS_INSTANT">ICAST: int value converted to long and used as absolute time (ICAST_INT_2_LONG_AS_INSTANT)</a></h3>


<p>
This code converts a 32-bit int value to a 64-bit long value, and then
passes that value for a method parameter that requires an absolute time value.
An absolute time value is the number
of milliseconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT.
For example, the following method, intended to convert seconds since the epoch into a Date, is badly
broken:</p>
<pre>
Date getDate(int seconds) { return new Date(seconds * 1000); }
</pre>
<p>The multiplication is done using 32-bit arithmetic, and then converted to a 64-bit value.
When a 32-bit value is converted to 64-bits and used to express an absolute time
value, only dates in December 1969 and January 1970 can be represented.</p>

<p>Correct implementations for the above method are:</p>

<pre>
// Fails for dates after 2037
Date getDate(int seconds) { return new Date(seconds * 1000L); }

// better, works for all dates
Date getDate(long seconds) { return new Date(seconds * 1000); }
</pre>

    
<h3><a name="ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL">ICAST: Valeur enti??re transtyp??e en nombre flottant pass??e ?? Math.ceil (ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL)</a></h3>


<p>Ce code convertit une valeur enti??re en nombre flottant ?? double pr??cision et passe le r??sultat ?? la m??thode <code>Math.ceil()</code>, qui arrondit un nombre flottant ?? sa valeur enti??re imm??diatement sup??rieure. Cette op??ration n'a pas de raison d'??tre, puisque le transtypage d'un entier en double donne un nombre sans valeur apr??s la virgule. Il est vraissemblable que l'op??ration qui a cr???? la valeur pour la passer ?? <code>Math.ceil</code> visait l'utilisation de l'arithm??tique sur un nombre flottant en double pr??cision.</p>

  
<h3><a name="ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND">ICAST: Valeur enti??re transtyp??e en flottant puis transmise ?? Math.round (ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND)</a></h3>


<p>Ce code converti une valeur enti??re en flottant simple pr??cision puis la passe ?? la m??thode <code>Math.round()</code> qui renvoi l'<code>int</code> ou le <code>long</code> le plus proche de son param??tre. Cette op??ration doit toujours revenir ?? ne rien faire, puisque le transtypage d'un entier en un flottant devrait syst??matiquement donner un flottant sans partie d??cimale. Il est probable que l'op??ration g??rant la valeur pass??e ?? <code>Math.round()</code> devrait ??tre effectu??e en arithm??tique flottante.</p>

  
<h3><a name="IJU_ASSERT_METHOD_INVOKED_FROM_RUN_METHOD">IJU: JUnit assertion in run method will not be noticed by JUnit (IJU_ASSERT_METHOD_INVOKED_FROM_RUN_METHOD)</a></h3>


<p> A JUnit assertion is performed in a run method. Failed JUnit assertions
just result in exceptions being thrown.
Thus, if this exception occurs in a thread other than the thread that invokes
the test method, the exception will terminate the thread but not result
in the test failing.
</p>

    
<h3><a name="IJU_BAD_SUITE_METHOD">IJU: TestCase declares a bad suite method  (IJU_BAD_SUITE_METHOD)</a></h3>


<p> Class is a JUnit TestCase and defines a suite() method.
However, the suite method needs to be declared as either</p>
<pre>public static junit.framework.Test suite()</pre>
or
<pre>public static junit.framework.TestSuite suite()</pre>

    
<h3><a name="IJU_NO_TESTS">IJU: TestCase sans tests (IJU_NO_TESTS)</a></h3>


<p>La classe JUnit <code>TestCase</code> n'impl??mente aucune m??thode de test.</p>

  
<h3><a name="IJU_SETUP_NO_SUPER">IJU: Une classe d??rivant de TestCase impl??mente setUp() sans appeler super.setUp() (IJU_SETUP_NO_SUPER)</a></h3>


<p>La classe d??rive de la classe <code>TestCase</code> de JUnit est impl??mente la m??thode <code>setUp()</code>. La m??thode <code>setUp()</code> devrait appeler <code>super.setUp()</code>, mais ne le fait pas.</p>

  
<h3><a name="IJU_SUITE_NOT_STATIC">IJU: Une classe d??rivant de TestCase impl??mente une m??thode suite() non statique (IJU_SUITE_NOT_STATIC)</a></h3>


<p>La classe d??rive de <code>TestCase</code> de JUnit et impl??mente une m??thode <code>suite()</code>. La m??thode <code>suite()</code> devrait-??tre d??clar??e comme ??tant <code>static</code>, ce qui n'est pas fait.</p>

  
<h3><a name="IJU_TEARDOWN_NO_SUPER">IJU: Une classe d??rivant de TestCase impl??mente tearDown() sans appeler super.tearDown() (IJU_TEARDOWN_NO_SUPER)</a></h3>


<p>La classe d??rive de la classe <code>TestCase</code> de JUnit et impl??mente la m??thode <code>tearDown()</code>. La m??thode <code>tearDown()</code> devrait appeler <code>super.tearDown()</code>, mais ne le fait pas.</p>

  
<h3><a name="IL_CONTAINER_ADDED_TO_ITSELF">IL: Un conteneur est ajout?? ?? lui-m??me (IL_CONTAINER_ADDED_TO_ITSELF)</a></h3>


<p>Un conteneur est ajout?? ?? lui-m??me. Il en r??sulte que le calcul du code de hachage de cet ensemble provequera une <code>StackOverflowEception</code>.</p>

  
<h3><a name="IL_INFINITE_LOOP">IL: Boucle apparemment inifinie (IL_INFINITE_LOOP)</a></h3>


<p>Cette boucle ne semble pas avoir un moyen de se terminer (autrement que, peut ??tre, en d??clenchant une exception).</p>

  
<h3><a name="IL_INFINITE_RECURSIVE_LOOP">IL: Boucle r??cursive infinie (IL_INFINITE_RECURSIVE_LOOP)</a></h3>


<p>Cette m??thode s'appelle elle-m??me sans condition. Cela semble indiquer une boucle r??cursive infinie qui se terminera sur un d??bordement de la pile.</p>

  
<h3><a name="IM_MULTIPLYING_RESULT_OF_IREM">IM: Multiplication d'un entier avec le r??sulat entier d'un modulo (IM_MULTIPLYING_RESULT_OF_IREM)</a></h3>


<p>Ce code mutilplie le r??sultat d'un modulo avec une constante enti??re. Fa??tes attention ?? la pr??c??dence des op??rateurs. Par exemple, <code>i % 60 * 1000</code> correspond ?? <code>(i % 60) * 1000</code>, non ?? <code>i % (60 * 1000)</code>.</p>

  
<h3><a name="INT_BAD_COMPARISON_WITH_INT_VALUE">INT: Bad comparison of int value with long constant (INT_BAD_COMPARISON_WITH_INT_VALUE)</a></h3>


<p> This code compares an int value with a long constant that is outside
the range of values that can be represented as an int value.
This comparison is vacuous and possibily to be incorrect.
</p>

    
<h3><a name="INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE">INT: Bad comparison of nonnegative value with negative constant or zero (INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE)</a></h3>


<p> This code compares a value that is guaranteed to be non-negative with a negative constant or zero.
</p>

    
<h3><a name="INT_BAD_COMPARISON_WITH_SIGNED_BYTE">INT: Bad comparison of signed byte (INT_BAD_COMPARISON_WITH_SIGNED_BYTE)</a></h3>


<p> Signed bytes can only have a value in the range -128 to 127. Comparing
a signed byte with a value outside that range is vacuous and likely to be incorrect.
To convert a signed byte <code>b</code> to an unsigned value in the range 0..255,
use <code>0xff &amp; b</code>
</p>

    
<h3><a name="IO_APPENDING_TO_OBJECT_OUTPUT_STREAM">IO: Doomed attempt to append to an object output stream (IO_APPENDING_TO_OBJECT_OUTPUT_STREAM)</a></h3>

      
      <p>
     This code opens a file in append mode and then wraps the result in an object output stream.
     This won't allow you to append to an existing object output stream stored in a file. If you want to be
     able to append to an object output stream, you need to keep the object output stream open.
      </p>
      <p>The only situation in which opening a file in append mode and the writing an object output stream
      could work is if on reading the file you plan to open it in random access mode and seek to the byte offset
      where the append started.
      </p>

      <p>
      TODO: example.
      </p>
      
    
<h3><a name="IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN">IP: Un param??tre est r??-??crit avant d'??tre utilis?? (IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN)</a></h3>


<p>La valeur initiale de ce param??tre est ignor??e, et le param??tre est ??cras??. Ceci indique g??n??ralement une erreur provenant de la croyance infond??e qu'une ??criture sur ce param??tre sera transmise ?? l'appelant.</p>

  
<h3><a name="MF_CLASS_MASKS_FIELD">MF: La classe d??finit un champ qui masque un champ d'une classe m??re (MF_CLASS_MASKS_FIELD)</a></h3>


<p>Cette classe d??finit un champ avec le m??me nom qu'un champ visible d'instance d'une classe m??re. C'est ambigu et peut entra??ner une erreur si des m??thodes mettent ?? jour ou acc??dent ?? un des champs alors qu'elles souhaitaient utiliser l'autre.</p>

  
<h3><a name="MF_METHOD_MASKS_FIELD">MF: La m??thode d??finit une variable qui masque un champ (MF_METHOD_MASKS_FIELD)</a></h3>


<p>Cette m??thode d??finit une variable locale ayant le m??me nom qu'un champ de la classe ou d'une classe m??re. Ceci peut pousser la m??thode ?? lire une valeur non initialis??e dans le champs, ?? le laisser non initialis?? ou les deux.</p>

  
<h3><a name="NP_ALWAYS_NULL">NP: D??r??f??rencement d'un pointeur null dans la m??thode (NP_ALWAYS_NULL)</a></h3>


<p>Un pointeur ?? <code>null</code> est d??r??f??renc?? ici. Ceci va mener ?? une <code>NullPointerException</code> quand le code sera ex??cut??.</p>

  
<h3><a name="NP_ALWAYS_NULL_EXCEPTION">NP: D??r??f??rencement d'un pointeur null dans le chemin d'exception d'une m??thode (NP_ALWAYS_NULL_EXCEPTION)</a></h3>


<p>Un pointeur ?? <code>null</code> dans le chemin d'exception est d??r??f??renc?? ici. Cela va mener ?? une <code>NullPointerException</code> quand le code sera ex??cut??. Notez que puisque FindBugs ne d??tecte pas les chemins d'exception irr??alisables, il est possible que cette alarme soit injustifi??e.</p>
<p>Notez aussi que FindBugs consid??re le choix par d??faut d'un <code>switch</code> comme ??tant dans le chemin d'exception, puisque ce choix est souvent irr??alisable.</p>

  
<h3><a name="NP_ARGUMENT_MIGHT_BE_NULL">NP: M??thode ne testant pas les param??tres ?? null (NP_ARGUMENT_MIGHT_BE_NULL)</a></h3>


<p>Un param??tre de cette m??thode a ??t?? identifi?? comme une valeur pouvant ??tre ?? <code>null</code>, mais qui est d??r??f??renc??e sans test de nullit??.</p>

  
<h3><a name="NP_CLOSING_NULL">NP: close() invoked on a value that is always null (NP_CLOSING_NULL)</a></h3>


<p> close() is being invoked on a value that is always null. If this statement is executed,
a null pointer exception will occur. But the big risk here you never close
something that should be closed.

    
<h3><a name="NP_GUARANTEED_DEREF">NP: Null d??r??f??renc?? (NP_GUARANTEED_DEREF)</a></h3>


<p>Cette m??thode contient une valeur ?? <code>null</code> qui est d??r??f??renc??e (sauf dans les chemins impliquant une RuntimeException).</p>

  
<h3><a name="NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH">NP: Value is null and guaranteed to be dereferenced on exception path (NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH)</a></h3>

          
              <p>
              There is a statement or branch on an exception path
                that if executed guarantees that
              a value is null at this point, and that
              value that is guaranteed to be dereferenced
              (except on forward paths involving runtime exceptions).
              </p>
          
      
<h3><a name="NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR">NP: Non-null field is not initialized (NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR)</a></h3>

       
       <p> The field is marked as non-null, but isn't written to by the constructor.
    The field might be initialized elsewhere during constructor, or might always
    be initialized before use.
       </p>
       
       
<h3><a name="NP_NONNULL_PARAM_VIOLATION">NP: Appel de m??thode transmettant null ?? un param??tre d??clar?? @NonNull (NP_NONNULL_PARAM_VIOLATION)</a></h3>


<p>Cette m??thode passe une valeur ?? <code>null</code> en param??tre d'une m??thode qui a d??clar?? ce param??tre comme <code>@NonNull</code>.</p>
<p>Notez que la m??thode avec l'annotation <code>@NonNull</code> peut ??tre dans une sous-classe de l'objet appel??.</p>

  
<h3><a name="NP_NONNULL_RETURN_VIOLATION">NP: M??thode renvoyer null mais d??clar??e @NonNull (NP_NONNULL_RETURN_VIOLATION)</a></h3>


<p>Cette m??thode peut renvoyer une valeur ?? <code>null</code> alors que cette m??thode (ou une m??thode d??riv??e d'une de ses classes m??re) est d??clar??e comme renvoyant <code>@NonNull</code>.</p>

  
<h3><a name="NP_NULL_INSTANCEOF">NP: A known null value is checked to see if it is an instance of a type (NP_NULL_INSTANCEOF)</a></h3>


<p>
This instanceof test will always return false, since the value being checked is guaranteed to be null.
Although this is safe, make sure it isn't
an indication of some misunderstanding or some other logic error.
</p>

    
<h3><a name="NP_NULL_ON_SOME_PATH">NP: Possible d??r??f??rencement d'un pointeur null dans une m??thode (NP_NULL_ON_SOME_PATH)</a></h3>


<p>Une valeur par r??f??rence d??r??f??renc??e ici peut-??tre ?? <code>null</code> ?? l'ex??cution. Cela peut conduire ?? une <code>NullPointerException</code> quand le code est ex??cut??.</p>

  
<h3><a name="NP_NULL_ON_SOME_PATH_EXCEPTION">NP: Possible d??r??f??rencement d'un pointeur null dans le chemin d'exception d'une m??thode (NP_NULL_ON_SOME_PATH_EXCEPTION)</a></h3>


<p>Une valeur par r??f??rence qui est ?? <code>null</code> dans un des chemins d'exception est d??r??f??renc??e ici. Ceci peut conduire ?? une <code>NullPointerException</code> ?? l'ex??cution du code. Notez que comme FindBugs ne rep??re pas les chemins d'exception irr??alisables, il est possible que cette alarme soit injustifi??e.</p>
<p>Notez ??galement que FindBugs consid??re le cas par d??faut d'un <code>switch</code> comme faisant partie du chemin d'exception puisque ce cas est souvent inattendu.</p>

  
<h3><a name="NP_NULL_PARAM_DEREF">NP: M??thode passant null ?? un param??tre d??r??f??renc?? inconditionnellement (NP_NULL_PARAM_DEREF)</a></h3>


<p>Cet appel de m??thode envoie <code>null</code> ?? une m??thode qui peut d??r??f??rencer ce param??tre de fa??on inconditionnelle.</p>

  
<h3><a name="NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS">NP: Appel de m??thode passant null ?? un param??tre d??r??f??renc?? inconditionnellement (NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS)</a></h3>


<p>Une valeur pouvant ??tre ?? <code>null</code> est pass??e lors d'un appel alors que toutes les m??thodes cibles possibles le d??r??f??rence inconditionnellement. Cela a de fortes chances de provoquer une <code>NullPointerException</code>.</p>

  
<h3><a name="NP_NULL_PARAM_DEREF_NONVIRTUAL">NP: Appel ?? une m??thode non virtuelle passant null ?? un param??tre d??r??f??renc?? de fa??on inconditionnelle (NP_NULL_PARAM_DEREF_NONVIRTUAL)</a></h3>


<p>Une valeur pouvant ??tre ?? <code>null</code> est pass??e ?? une m??thode qui d??r??f??rence ce param??tre de fa??on inconditionnelle. Cela peut se terminer en <code>NullPointerException</code>.</p>

  
<h3><a name="NP_OPTIONAL_RETURN_NULL">NP: Method with Optional return type returns explicit null (NP_OPTIONAL_RETURN_NULL)</a></h3>

       
       <p>
    The usage of Optional return type (java.util.Optional or com.google.common.base.Optiona) 
    always mean that explicit null returns were not desired by design.
    Returning a null value in such case is a contract violation and will most likely break clients code.
       </p>
       
       
<h3><a name="NP_STORE_INTO_NONNULL_FIELD">NP: Stocke une valeur null dans un champ annot?? NonNull (NP_STORE_INTO_NONNULL_FIELD)</a></h3>


<p>Une valeur qui pourrait ??tre ?? <code>null</code> est stock??e dans un champ qui a ??t?? annot?? comme <code>NonNull</code>.</p>

  
<h3><a name="NP_UNWRITTEN_FIELD">NP: Lecture d'un champ jamais ??crit (NP_UNWRITTEN_FIELD)</a></h3>


<p>Le programme d??r??f??rence un champ qui ne semble jamais aliment?? par une valeur non nulle. D??r??f??rencer cette valeur provoquera une <code>NullPointerException</code>.</p>

  
<h3><a name="NM_BAD_EQUAL">Nm: La classe d??finit equal() ; ne devrait-ce pas ??tre equals() ? (NM_BAD_EQUAL)</a></h3>


<p>Cette classe d??finit une m??thode <code>equal(Object)</code>. Cette m??thode ne surcharge pas la m??thode <code>equals(Object)</code> de <code>java.lang.Object</code>, surchage qui ??tait pourtant sans doute le but vis??.</p>

  
<h3><a name="NM_LCASE_HASHCODE">Nm: La classe d??finit hashcode() ; ne devrait-ce pas ??tre hashCode() ? (NM_LCASE_HASHCODE)</a></h3>


<p>Cette classe d??finit une m??thode nomm??e <code>hashcode()</code>. Cette m??thode ne surcharge pas la m??thode <code>hashCode()</code> de <code>java.lang.Object</code>, surchage qui ??tait pourtant sans doute le but vis??.</p>

  
<h3><a name="NM_LCASE_TOSTRING">Nm: La classe d??finit tostring() ; ne devrait-ce pas ??tre toString() ? (NM_LCASE_TOSTRING)</a></h3>


<p>Cette classe d??finit une m??thode appel??e <code>tostring()</code>. Cette m??thode ne surcharge pas la m??thode <code>toString()</code> de <code>java.lang.Object</code>, surchage qui ??tait pourtant sans doute le but vis??.</p>

  
<h3><a name="NM_METHOD_CONSTRUCTOR_CONFUSION">Nm: Confusion apparente entre une m??thode et un constructeur (NM_METHOD_CONSTRUCTOR_CONFUSION)</a></h3>


<p>Cette m??thode a le m??me nom que la classe dans laquelle elle est d??clar??e. Il est probable qu'elle devait ??tre un constructeur.
Si c'est bien le cas, retirez la d??claration d'une valeur de retour.</p>

  
<h3><a name="NM_VERY_CONFUSING">Nm: Noms de m??thodes tr??s ambigus (NM_VERY_CONFUSING)</a></h3>


<p>Les m??thodes indiqu??es ont des noms qui ne diff??rent que par les majuscules. C'est d'autant plus ambigu que les classes comportant ces m??thodes sont li??es par h??ritage.</p>

  
<h3><a name="NM_WRONG_PACKAGE">Nm: Method doesn't override method in superclass due to wrong package for parameter (NM_WRONG_PACKAGE)</a></h3>


  <p> The method in the subclass doesn't override a similar method in a superclass because the type of a parameter doesn't exactly match
the type of the corresponding parameter in the superclass. For example, if you have:</p>

<blockquote>
<pre>
import alpha.Foo;
public class A {
  public int f(Foo x) { return 17; }
}
----
import beta.Foo;
public class B extends A {
  public int f(Foo x) { return 42; }
}
</pre>
</blockquote>

<p>The <code>f(Foo)</code> method defined in class <code>B</code> doesn't
override the
<code>f(Foo)</code> method defined in class <code>A</code>, because the argument
types are <code>Foo</code>'s from different packages.
</p>

    
<h3><a name="QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT">QBA: M??thode assignant une valeur bol??enne fixe dans une expression bool??enne (QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT)</a></h3>


<p>Cette m??thode assigne une valeur bool??enne fixe (<code>true</code> ou <code>false</code>) ?? une variable bool??enne dans une expression <code>if</code> ou <code>while</code>. Il est probable que le but ??tait d'effectuer une comparaison bool??enne utilisant <code>==</code> et non pas une affectation avec <code>=</code>.</p>

  
<h3><a name="RANGE_ARRAY_INDEX">RANGE: Array index is out of bounds (RANGE_ARRAY_INDEX)</a></h3>


   <p> Array operation is performed, but array index is out of bounds, which will result in ArrayIndexOutOfBoundsException at runtime.</p>

    
<h3><a name="RANGE_ARRAY_LENGTH">RANGE: Array length is out of bounds (RANGE_ARRAY_LENGTH)</a></h3>


   <p> Method is called with array parameter and length parameter, but the length is out of bounds. This will result in IndexOutOfBoundsException at runtime. </p>

    
<h3><a name="RANGE_ARRAY_OFFSET">RANGE: Array offset is out of bounds (RANGE_ARRAY_OFFSET)</a></h3>


   <p> Method is called with array parameter and offset parameter, but the offset is out of bounds. This will result in IndexOutOfBoundsException at runtime. </p>

    
<h3><a name="RANGE_STRING_INDEX">RANGE: String index is out of bounds (RANGE_STRING_INDEX)</a></h3>


   <p> String method is called and specified string index is out of bounds. This will result in StringIndexOutOfBoundsException at runtime. </p>

    
<h3><a name="RC_REF_COMPARISON">RC: Comparaison de r??f??rences suspecte (RC_REF_COMPARISON)</a></h3>


<p>Cette m??thode compare deux r??f??rences avec l'op??rateur <code>==</code> ou <code>!=</code>, alors que la fa??on correcte de comparer les instances de ce type est g??n??ralement d'utiliser la m??thode <code>equals()</code>. Des exemples de classes qui ne doivent g??n??ralement pas ??tre compar??es par r??f??rence sont <code>java.lang.Integer</code>, <code>java.lang.Float</code>, etc...</p>

  
<h3><a name="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE">RCN: Test de nullit?? d'une valeur pr??alablement d??r??f??renc??e (RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE)</a></h3>


<p>Une valeur est test??e ici pour savoir si elle est ?? <code>null</code> alors que cette valeur ne peut pas ??tre ?? <code>null</code> puisqu'elle a ??t?? d??r??f??renc??e et qu'une <code>NullPointerException</code> se serait alors produite ?? ce moment. Ce code est en contradiction avec le d??r??f??rencement pr??alable au sujet de la capacit?? de cette valeur d'??tre ?? <code>null</code>. Soit le test est redondant, soit le d??r??f??rencement pr??alable est erron??.</p>

  
<h3><a name="RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION">RE: Syntaxe d'expression r??guli??re invalide (RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION)</a></h3>


<p>Le code utilise une expression r??guli??re qui est invalide selon la syntaxe des expressions r??guli??res. Lors de l'ex??cution, une exception <code>PatternSyntaxException</code> sera lanc??e.</p>

  
<h3><a name="RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION">RE: File.separator used for regular expression (RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION)</a></h3>


<p>
The code here uses <code>File.separator</code>
where a regular expression is required. This will fail on Windows
platforms, where the <code>File.separator</code> is a backslash, which is interpreted in a
regular expression as an escape character. Amoung other options, you can just use
<code>File.separatorChar=='\\' ? "\\\\" : File.separator</code> instead of
<code>File.separator</code>

</p>

    
<h3><a name="RE_POSSIBLE_UNINTENDED_PATTERN">RE: "." utilis?? dans une expression r??guli??re (RE_POSSIBLE_UNINTENDED_PATTERN)</a></h3>


<p>Une fonction <code>String</code> attendant une expression r??guli??re re??oit "." en param??tre. Est-ce voulu ? Par exemple, <code>s.replaceAll(".", "/")</code> renverra une chaine dont <b>chaque</b> caract??re aura ??t?? remplac?? par le caract??re '/'.</p>

  
<h3><a name="RV_01_TO_INT">RV: Les valeurs al??atoires entre 0 et 1 sont r??duites ?? l'entier 0 (RV_01_TO_INT)</a></h3>


<p>Une valeur al??atoire comprise entre 0 et 1 est r??duite ?? la valeur enti??re 0. Vous souhaitez probablement multiplier cette valeur al??atoire par quelque chose avant de la r??duire ?? un entier, ou utiliser la m??thode <code>Random.nextInt(n)</code>.</p>

  
<h3><a name="RV_ABSOLUTE_VALUE_OF_HASHCODE">RV: Bad attempt to compute absolute value of signed 32-bit hashcode  (RV_ABSOLUTE_VALUE_OF_HASHCODE)</a></h3>


<p> This code generates a hashcode and then computes
the absolute value of that hashcode.  If the hashcode
is <code>Integer.MIN_VALUE</code>, then the result will be negative as well (since
<code>Math.abs(Integer.MIN_VALUE) == Integer.MIN_VALUE</code>).
</p>
<p>One out of 2^32 strings have a hashCode of Integer.MIN_VALUE,
including "polygenelubricants" "GydZG_" and ""DESIGNING WORKHOUSES".
</p>

    
<h3><a name="RV_ABSOLUTE_VALUE_OF_RANDOM_INT">RV: Bad attempt to compute absolute value of signed random integer (RV_ABSOLUTE_VALUE_OF_RANDOM_INT)</a></h3>


<p> This code generates a random signed integer and then computes
the absolute value of that random integer.  If the number returned by the random number
generator is <code>Integer.MIN_VALUE</code>, then the result will be negative as well (since
<code>Math.abs(Integer.MIN_VALUE) == Integer.MIN_VALUE</code>). (Same problem arised for long values as well).
</p>

    
<h3><a name="RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE">RV: Code checks for specific values returned by compareTo (RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE)</a></h3>


   <p> This code invoked a compareTo or compare method, and checks to see if the return value is a specific value,
such as 1 or -1. When invoking these methods, you should only check the sign of the result, not for any specific
non-zero value. While many or most compareTo and compare methods only return -1, 0 or 1, some of them
will return other values.

    
<h3><a name="RV_EXCEPTION_NOT_THROWN">RV: Exception created and dropped rather than thrown (RV_EXCEPTION_NOT_THROWN)</a></h3>


   <p> This code creates an exception (or error) object, but doesn't do anything with it. For example,
something like </p>
<blockquote>
<pre>
if (x &lt; 0)
  new IllegalArgumentException("x must be nonnegative");
</pre>
</blockquote>
<p>It was probably the intent of the programmer to throw the created exception:</p>
<blockquote>
<pre>
if (x &lt; 0)
  throw new IllegalArgumentException("x must be nonnegative");
</pre>
</blockquote>

    
<h3><a name="RV_RETURN_VALUE_IGNORED">RV: La m??thode ignore une valeur de retour (RV_RETURN_VALUE_IGNORED)</a></h3>


<p>La valeur renvoy??e par cette m??thode devrait-??tre v??rifi??e. Une cause habituelle de cette alarme est d'invoquer une m??thode sur un objet constant en pensant que cela modifiera l'objet. Par exemple :</p>
<blockquote>
<pre>
String dateString = getHeaderField(name);
dateString.trim();
</pre>
</blockquote>
<p>Le programmeur semble croire que la m??thode <code>trim()</code> mettra ?? jour l'objet <code>String</code> r??f??renc?? par <code>dateString</code>. Mais, les objets <code>String</code> ??tant constants, la fonction renvoi une nouvelle valeur qui est ici ignor??e. Le code devrait ??tre corrig?? en :</p>
<blockquote>
<pre>
String dateString = getHeaderField(name);
dateString = dateString.trim();
</pre>
</blockquote>

  
<h3><a name="RpC_REPEATED_CONDITIONAL_TEST">RpC: Repeated conditional tests (RpC_REPEATED_CONDITIONAL_TEST)</a></h3>


<p>The code contains a conditional test is performed twice, one right after the other
(e.g., <code>x == 0 || x == 0</code>). Perhaps the second occurrence is intended to be something else
(e.g., <code>x == 0 || y == 0</code>).
</p>

    
<h3><a name="SA_FIELD_SELF_ASSIGNMENT">SA: Auto-alimentation d'un champs (SA_FIELD_SELF_ASSIGNMENT)</a></h3>


<p>Cette m??thode contient un champ s'auto-alimentant; par exemple :</p>
<pre>
int x;
public void foo() {
  x = x;
}
</pre>
<p>De telles affectations sont inutiles et peuvent indiquer une faute de frappe ou une erreur logique.</p>

  
<h3><a name="SA_FIELD_SELF_COMPARISON">SA: Self comparison of field with itself (SA_FIELD_SELF_COMPARISON)</a></h3>


<p> This method compares a field with itself, and may indicate a typo or
a logic error.  Make sure that you are comparing the right things.
</p>

    
<h3><a name="SA_FIELD_SELF_COMPUTATION">SA: Nonsensical self computation involving a field (e.g., x & x) (SA_FIELD_SELF_COMPUTATION)</a></h3>


<p> This method performs a nonsensical computation of a field with another
reference to the same field (e.g., x&x or x-x). Because of the nature
of the computation, this operation doesn't seem to make sense,
and may indicate a typo or
a logic error.  Double check the computation.
</p>

    
<h3><a name="SA_LOCAL_SELF_ASSIGNMENT_INSTEAD_OF_FIELD">SA: Self assignment of local rather than assignment to field (SA_LOCAL_SELF_ASSIGNMENT_INSTEAD_OF_FIELD)</a></h3>


<p> This method contains a self assignment of a local variable, and there
is a field with an identical name.
assignment appears to have been ; e.g.</p>
<pre>
  int foo;
  public void setFoo(int foo) {
    foo = foo;
  }
</pre>
<p>The assignment is useless. Did you mean to assign to the field instead?</p>

    
<h3><a name="SA_LOCAL_SELF_COMPARISON">SA: Self comparison of value with itself (SA_LOCAL_SELF_COMPARISON)</a></h3>


<p> This method compares a local variable with itself, and may indicate a typo or
a logic error.  Make sure that you are comparing the right things.
</p>

    
<h3><a name="SA_LOCAL_SELF_COMPUTATION">SA: Nonsensical self computation involving a variable (e.g., x & x) (SA_LOCAL_SELF_COMPUTATION)</a></h3>


<p> This method performs a nonsensical computation of a local variable with another
reference to the same variable (e.g., x&x or x-x). Because of the nature
of the computation, this operation doesn't seem to make sense,
and may indicate a typo or
a logic error.  Double check the computation.
</p>

    
<h3><a name="SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH">SF: Dead store due to switch statement fall through (SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH)</a></h3>


  <p> A value stored in the previous switch case is overwritten here due to a switch fall through. It is likely that
    you forgot to put a break or return at the end of the previous case.
</p>

    
<h3><a name="SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW">SF: Dead store due to switch statement fall through to throw (SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW)</a></h3>


  <p> A value stored in the previous switch case is ignored here due to a switch fall through to a place where
    an exception is thrown. It is likely that
    you forgot to put a break or return at the end of the previous case.
</p>

    
<h3><a name="SIC_THREADLOCAL_DEADLY_EMBRACE">SIC: Deadly embrace of non-static inner class and thread local (SIC_THREADLOCAL_DEADLY_EMBRACE)</a></h3>


  <p> This class is an inner class, but should probably be a static inner class.
  As it is, there is a serious danger of a deadly embrace between the inner class
  and the thread local in the outer class. Because the inner class isn't static,
  it retains a reference to the outer class.
  If the thread local contains a reference to an instance of the inner
  class, the inner and outer instance will both be reachable
  and not eligible for garbage collection.
</p>

    
<h3><a name="SIO_SUPERFLUOUS_INSTANCEOF">SIO: V??rification de type inutile avec l'op??rateur instanceof (SIO_SUPERFLUOUS_INSTANCEOF)</a></h3>


<p>V??rification de type effectu??e avec l'op??rateur <code>instanceof</code> alors que cela pourrait-??tre d??termin?? statiquement.</p>

  
<h3><a name="SQL_BAD_PREPARED_STATEMENT_ACCESS">SQL: M??thode essayant au param??tre d'indice 0 d'un PreparedStatement (SQL_BAD_PREPARED_STATEMENT_ACCESS)</a></h3>


<p>Un appel  ?? une m??thode <code>setXXX</code> d'un <code>PreparedStatement</code> est r??alis?? sur l'indice 0. Puisque les indices des param??tres d'un <code>PreparedStatement</code> commencent ?? 1, c'est toujours une erreur.</p>

  
<h3><a name="SQL_BAD_RESULTSET_ACCESS">SQL: M??thode essayant d'acc??der ?? un champ de ResultSet d'indice 0 (SQL_BAD_RESULTSET_ACCESS)</a></h3>


<p>Un appel ?? une m??thode <code>getXXX</code> ou <code>updateXXX</code> d'un <code>ResultSet</code> est r??alis?? pour l'indice 0. Puisque les indices de <code>ResultSet</code> commencent ?? 1, c'est toujours une erreur.</p>

  
<h3><a name="STI_INTERRUPTED_ON_CURRENTTHREAD">STI: Utilisation superflue d'un appel ?? currentThread() pour appeler interrupted() (STI_INTERRUPTED_ON_CURRENTTHREAD)</a></h3>


<p>Cette m??thode invoque <code>Thread.currentThread()</code> juste pour appeler la m??thode <code>interrupted()</code>. Comme <code>interrupted()</code> est une m??thode statique, il est plus simple et facile d'utiliser <code>Thread.interrupted()</code>.</p>

  
<h3><a name="STI_INTERRUPTED_ON_UNKNOWNTHREAD">STI: Thread.interrupted() appel??e par erreur sur un objet Thread arbitraire (STI_INTERRUPTED_ON_UNKNOWNTHREAD)</a></h3>


<p>Cette m??thode invoque <code>Thread.interrupted()</code> sur un objet <code>Thread</code> qui n'est pas le thread actif. Pusique la m??thode <code>interrupted()</code> est statique, la m??thode <code>interrupted()</code> sera appel??e sur un objet diff??rent de celui auquel l'auteur du code pensait.</p>

  
<h3><a name="SE_METHOD_MUST_BE_PRIVATE">Se: M??thode devant ??tre priv??e pour que la s??rialisation fonctionne (SE_METHOD_MUST_BE_PRIVATE)</a></h3>


<p>Cette classe impl??mente l'interface <code>Serializable</code> et d??fini une m??thode pour personnaliser la s??rialisation/d??s??rialisation. Mais cette m??thode n'??tant pas d??clar??e priv??e elle sera ignor??e silencieusement par les API de s??rialisation/d??s??rialisation.</p>

  
<h3><a name="SE_READ_RESOLVE_IS_STATIC">Se: The readResolve method must not be declared as a static method.   (SE_READ_RESOLVE_IS_STATIC)</a></h3>


  <p> In order for the readResolve method to be recognized by the serialization
mechanism, it must not be declared as a static method.
</p>

    
<h3><a name="TQ_ALWAYS_VALUE_USED_WHERE_NEVER_REQUIRED">TQ: Value annotated as carrying a type qualifier used where a value that must not carry that qualifier is required (TQ_ALWAYS_VALUE_USED_WHERE_NEVER_REQUIRED)</a></h3>

      
        <p>
        A value specified as carrying a type qualifier annotation is
        consumed in a location or locations requiring that the value not
        carry that annotation.
        </p>

        <p>
        More precisely, a value annotated with a type qualifier specifying when=ALWAYS
        is guaranteed to reach a use or uses where the same type qualifier specifies when=NEVER.
        </p>

        <p>
        For example, say that @NonNegative is a nickname for
        the type qualifier annotation @Negative(when=When.NEVER).
        The following code will generate this warning because
        the return statement requires a @NonNegative value,
        but receives one that is marked as @Negative.
        </p>
        <blockquote>
<pre>
public @NonNegative Integer example(@Negative Integer value) {
    return value;
}
</pre>
        </blockquote>
      
    
<h3><a name="TQ_COMPARING_VALUES_WITH_INCOMPATIBLE_TYPE_QUALIFIERS">TQ: Comparing values with incompatible type qualifiers (TQ_COMPARING_VALUES_WITH_INCOMPATIBLE_TYPE_QUALIFIERS)</a></h3>

      
        <p>
        A value specified as carrying a type qualifier annotation is
        compared with a value that doesn't ever carry that qualifier.
        </p>

        <p>
        More precisely, a value annotated with a type qualifier specifying when=ALWAYS
        is compared with a value that where the same type qualifier specifies when=NEVER.
        </p>

        <p>
        For example, say that @NonNegative is a nickname for
        the type qualifier annotation @Negative(when=When.NEVER).
        The following code will generate this warning because
        the return statement requires a @NonNegative value,
        but receives one that is marked as @Negative.
        </p>
        <blockquote>
<pre>
public boolean example(@Negative Integer value1, @NonNegative Integer value2) {
    return value1.equals(value2);
}
</pre>
        </blockquote>
      
    
<h3><a name="TQ_MAYBE_SOURCE_VALUE_REACHES_ALWAYS_SINK">TQ: Value that might not carry a type qualifier is always used in a way requires that type qualifier (TQ_MAYBE_SOURCE_VALUE_REACHES_ALWAYS_SINK)</a></h3>

      
      <p>
      A value that is annotated as possibility not being an instance of
    the values denoted by the type qualifier, and the value is guaranteed to be used
    in a way that requires values denoted by that type qualifier.
      </p>
      
    
<h3><a name="TQ_MAYBE_SOURCE_VALUE_REACHES_NEVER_SINK">TQ: Value that might carry a type qualifier is always used in a way prohibits it from having that type qualifier (TQ_MAYBE_SOURCE_VALUE_REACHES_NEVER_SINK)</a></h3>

      
      <p>
      A value that is annotated as possibility being an instance of
    the values denoted by the type qualifier, and the value is guaranteed to be used
    in a way that prohibits values denoted by that type qualifier.
      </p>
      
    
<h3><a name="TQ_NEVER_VALUE_USED_WHERE_ALWAYS_REQUIRED">TQ: Value annotated as never carrying a type qualifier used where value carrying that qualifier is required (TQ_NEVER_VALUE_USED_WHERE_ALWAYS_REQUIRED)</a></h3>

      
        <p>
        A value specified as not carrying a type qualifier annotation is guaranteed
        to be consumed in a location or locations requiring that the value does
        carry that annotation.
        </p>

        <p>
        More precisely, a value annotated with a type qualifier specifying when=NEVER
        is guaranteed to reach a use or uses where the same type qualifier specifies when=ALWAYS.
        </p>

        <p>
        TODO: example
        </p>
      
    
<h3><a name="TQ_UNKNOWN_VALUE_USED_WHERE_ALWAYS_STRICTLY_REQUIRED">TQ: Value without a type qualifier used where a value is required to have that qualifier (TQ_UNKNOWN_VALUE_USED_WHERE_ALWAYS_STRICTLY_REQUIRED)</a></h3>

      
        <p>
        A value is being used in a way that requires the value be annotation with a type qualifier.
    The type qualifier is strict, so the tool rejects any values that do not have
    the appropriate annotation.
        </p>

        <p>
        To coerce a value to have a strict annotation, define an identity function where the return value is annotated
    with the strict annotation.
    This is the only way to turn a non-annotated value into a value with a strict type qualifier annotation.
        </p>

      
    
<h3><a name="UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS">UMAC: M??thode non appelable d??finie dans une classe anonyme (UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS)</a></h3>


<p>Cette classe anonyme d??finie une m??thode qui n'est pas directement appel??e et qui ne surcharge pas une m??thode de la classe m??re. Puisque les m??thodes des autres classes ne peuvent pas directement invoquer les m??thodes des classes anonymes, il appara??t que cette m??thode est inaccessible. Cette m??thode est probablement du code mort, mais il est aussi possible qu'elle essaye de surcharger une m??thode d??clar??e dans la classe m??re et ??choue ?? le faire en raison d'une erreur de type ou autre.</p>

  
<h3><a name="UR_UNINIT_READ">UR: Lecture d'un champ non initialis?? dans un constructeur (UR_UNINIT_READ)</a></h3>


<p>Ce constructeur lit un champ qui n'a pas encore ??t?? initialis??. Une des causes les plus fr??quentes est l'utilisation accidentelle par le d??veloppeur du champ au lieu d'un des param??tres du constructeur.</p>

  
<h3><a name="UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR">UR: Uninitialized read of field method called from constructor of superclass (UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR)</a></h3>


  <p> This method is invoked in the constructor of of the superclass. At this point,
    the fields of the class have not yet initialized.</p>
<p>To make this more concrete, consider the following classes:</p>
<pre>abstract class A {
  int hashCode;
  abstract Object getValue();
  A() {
    hashCode = getValue().hashCode();
    }
  }
class B extends A {
  Object value;
  B(Object v) {
    this.value = v;
    }
  Object getValue() {
    return value;
  }
  }</pre>
<p>When a <code>B</code> is constructed,
the constructor for the <code>A</code> class is invoked
<em>before</em> the constructor for <code>B</code> sets <code>value</code>.
Thus, when the constructor for <code>A</code> invokes <code>getValue</code>,
an uninitialized value is read for <code>value</code>
</p>

    
<h3><a name="DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY">USELESS_STRING: Invocation of toString on an unnamed array (DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY)</a></h3>


<p>
The code invokes toString on an (anonymous) array.  Calling toString on an array generates a fairly useless result
such as [C@16f0472. Consider using Arrays.toString to convert the array into a readable
String that gives the contents of the array. See Programming Puzzlers, chapter 3, puzzle 12.
</p>

    
<h3><a name="DMI_INVOKING_TOSTRING_ON_ARRAY">USELESS_STRING: Invocation de toString sur un tableau (DMI_INVOKING_TOSTRING_ON_ARRAY)</a></h3>


<p>Le code invoque <code>toString</code> sur un tableau, ce qui va g??n??rer un r??sultat assez inutile du genre <code>[C@16f0472</code>. Envisagez d'utiliser <code>String.valueOf</code> pour convertir un tableau en une chaine lisible contenant les valeurs du tableau. Cf Programming Puzzlers, chapitre 3, probl??me 12.</p>

  
<h3><a name="VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY">USELESS_STRING: Array formatted in useless way using format string (VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY)</a></h3>


<p>
One of the arguments being formatted with a format string is an array. This will be formatted
using a fairly useless format, such as [I@304282, which doesn't actually show the contents
of the array.
Consider wrapping the array using <code>Arrays.asList(...)</code> before handling it off to a formatted.
</p>

     
<h3><a name="UWF_NULL_FIELD">UwF: Champ uniquement mis ?? null (UWF_NULL_FIELD)</a></h3>


<p>Ce champ est uniquement aliment?? par la constante <code>null</code> et donc toutes les lectures de ce champ renverront <code>null</code>. V??rifiez si c'est une erreur ou alors supprimez ce champ qui est inutile.</p>

  
<h3><a name="UWF_UNWRITTEN_FIELD">UwF: Champ jamais ??crit (UWF_UNWRITTEN_FIELD)</a></h3>


<p>Ce champ n'est jamais aliment??. Toutes les lectures vont renvoyer sa valeur par d??faut. Recherchez les erreurs (devrait-il avoir ??t?? initialis?? ?) ou supprimez le s'il est inutile.</p>

  
<h3><a name="VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG">VA: Tableau de primitives pass?? ?? une fonction attendant un nombre variable d'objets en argument (VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG)</a></h3>


<p>Ce code envoie un tableau de primitives ?? une fonction qui attend un nombre variable d'objets en arguments. Ceci cr???? un tableau de longueur 1 pour contenir le tableau de primitives puis le passe ?? la fonction.</p>

  
<h3><a name="LG_LOST_LOGGER_DUE_TO_WEAK_REFERENCE">LG: Potential lost logger changes due to weak reference in OpenJDK (LG_LOST_LOGGER_DUE_TO_WEAK_REFERENCE)</a></h3>

          
<p>OpenJDK introduces a potential incompatibility.
 In particular, the java.util.logging.Logger behavior has
  changed. Instead of using strong references, it now uses weak references
  internally. That's a reasonable change, but unfortunately some code relies on
  the old behavior - when changing logger configuration, it simply drops the
  logger reference. That means that the garbage collector is free to reclaim
  that memory, which means that the logger configuration is lost. For example,
consider:
</p>

<pre>public static void initLogging() throws Exception {
 Logger logger = Logger.getLogger("edu.umd.cs");
 logger.addHandler(new FileHandler()); // call to change logger configuration
 logger.setUseParentHandlers(false); // another call to change logger configuration
}</pre>

<p>The logger reference is lost at the end of the method (it doesn't
escape the method), so if you have a garbage collection cycle just
after the call to initLogging, the logger configuration is lost
(because Logger only keeps weak references).</p>

<pre>public static void main(String[] args) throws Exception {
 initLogging(); // adds a file handler to the logger
 System.gc(); // logger configuration lost
 Logger.getLogger("edu.umd.cs").info("Some message"); // this isn't logged to the file as expected
}</pre>
<p><em>Ulf Ochsenfahrt and Eric Fellheimer</em></p>
          
      
<h3><a name="OBL_UNSATISFIED_OBLIGATION">OBL: Method may fail to clean up stream or resource (OBL_UNSATISFIED_OBLIGATION)</a></h3>

          
          <p>
          This method may fail to clean up (close, dispose of) a stream,
          database object, or other
          resource requiring an explicit cleanup operation.
          </p>

          <p>
          In general, if a method opens a stream or other resource,
          the method should use a try/finally block to ensure that
          the stream or resource is cleaned up before the method
          returns.
          </p>

          <p>
          This bug pattern is essentially the same as the
          OS_OPEN_STREAM and ODR_OPEN_DATABASE_RESOURCE
          bug patterns, but is based on a different
          (and hopefully better) static analysis technique.
          We are interested is getting feedback about the
          usefulness of this bug pattern.
          To send feedback, either:
          </p>
          <ul>
            <li>send email to findbugs@cs.umd.edu</li>
            <li>file a bug report: <a href="http://findbugs.sourceforge.net/reportingBugs.html">http://findbugs.sourceforge.net/reportingBugs.html</a></li>
          </ul>

          <p>
          In particular,
          the false-positive suppression heuristics for this
          bug pattern have not been extensively tuned, so
          reports about false positives are helpful to us.
          </p>

          <p>
          See Weimer and Necula, <i>Finding and Preventing Run-Time Error Handling Mistakes</i>, for
          a description of the analysis technique.
          </p>
          
      
<h3><a name="OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE">OBL: Method may fail to clean up stream or resource on checked exception (OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE)</a></h3>

          
          <p>
          This method may fail to clean up (close, dispose of) a stream,
          database object, or other
          resource requiring an explicit cleanup operation.
          </p>

          <p>
          In general, if a method opens a stream or other resource,
          the method should use a try/finally block to ensure that
          the stream or resource is cleaned up before the method
          returns.
          </p>

          <p>
          This bug pattern is essentially the same as the
          OS_OPEN_STREAM and ODR_OPEN_DATABASE_RESOURCE
          bug patterns, but is based on a different
          (and hopefully better) static analysis technique.
          We are interested is getting feedback about the
          usefulness of this bug pattern.
          To send feedback, either:
          </p>
          <ul>
            <li>send email to findbugs@cs.umd.edu</li>
            <li>file a bug report: <a href="http://findbugs.sourceforge.net/reportingBugs.html">http://findbugs.sourceforge.net/reportingBugs.html</a></li>
          </ul>

          <p>
          In particular,
          the false-positive suppression heuristics for this
          bug pattern have not been extensively tuned, so
          reports about false positives are helpful to us.
          </p>

          <p>
          See Weimer and Necula, <i>Finding and Preventing Run-Time Error Handling Mistakes</i>, for
          a description of the analysis technique.
          </p>
          
      
<h3><a name="DM_CONVERT_CASE">Dm: La m??thode appelle les String.toUpperCase() ou String.toLowerCase ; utilisez plut??t la version param??tr??e par une Locale (DM_CONVERT_CASE)</a></h3>


<p>Une cha??ne est mise en majuscules ou minuscules en fonction de jeu de caract??res par d??faut de la machine. Ceci peut entra??ner des conversions erron??es sur les caract??res internationaux. Utilisez <code>String.toUpperCase(Locale l)</code> ou <code>String.toLowerCase(Locale l)</code> ?? la place.</p>

  
<h3><a name="DM_DEFAULT_ENCODING">Dm: Reliance on default encoding (DM_DEFAULT_ENCODING)</a></h3>


<p> Found a call to a method which will perform a byte to String (or String to byte) conversion, and will assume that the default platform encoding is suitable. This will cause the application behaviour to vary between platforms. Use an alternative API and specify a charset name or Charset object explicitly.  </p>

      
<h3><a name="DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED">DP: Les chargeurs de classes ne doivent ??tre cr????s qu'?? partir de block doPrivileged (DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED)</a></h3>


<p>Ce code cr???? un chargeur de classes, ce qui n??cessite un test de s??curit??. M??me si ce code poss??de des droits suffisants, la cr??ation du chargeur de classes devrait ??tre effectu??e dans un block <code>doPrivileged</code> au cas ou il serait appel?? par du code ne poss??dant pas les droits requis.</p>

  
<h3><a name="DP_DO_INSIDE_DO_PRIVILEGED">DP: M??thode invoqu??e alors qu'elle ne devrait l'??tre qu'?? partir d'un block doPrivileged (DP_DO_INSIDE_DO_PRIVILEGED)</a></h3>


<p>Ce code invoque une m??thode qui n??cessite un test de s??curit?? sur les permissions. Si ce code, bien qu'ayant les droits suffisants, peut ??tre invoqu?? par du code n'ayant pas les droits requis l'appel doit alors ??tre effectu?? ?? l'int??rieur d'un block <code>doPrivileged</code>.</p>

  
<h3><a name="EI_EXPOSE_REP">EI: Une m??thode peut exposer sa repr??sentation interne en renvoyant une r??f??rence ?? un objet modifiable (EI_EXPOSE_REP)</a></h3>


<p>Renvoyer une r??f??rence ?? un objet modifiable stock?? dans les champs d'un objet expose la repr??sentation interne de l'objet. Si des instances sont acc??d??es par du code non fiable, et que des modifications non v??rifi??es peuvent compromettre la s??curit?? ou d'autres propri??t??s importantes, vous devez faire autre chose. Renvoyer une nouvelle copie de l'objet est une meilleur approche dans de nombreuses situations.</p>

  
<h3><a name="EI_EXPOSE_REP2">EI2: Une m??thode expose sa repr??sentation interne en incorporant une r??f??rence ?? un objet modifiable (EI_EXPOSE_REP2)</a></h3>


<p>Ce code stocke une r??f??rence ?? un objet externe modifiable dans la repr??sentation interne de l'objet. Si des instances sont acc??d??es par du code non fiable, et que des modifications non v??rifi??es peuvent compromettre la s??curit?? ou d'autres propri??t??s importantes, vous devez faire autre chose. Stocker une copie de l'objet est une meilleur approche dans de nombreuses situations.</p>

  
<h3><a name="FI_PUBLIC_SHOULD_BE_PROTECTED">FI: Un finaliseur devrait ??tre prot??g??, pas public (FI_PUBLIC_SHOULD_BE_PROTECTED)</a></h3>


<p>La m??thode <code>finalize()</code> d'une classe devrait avoir un acc??s prot??g??, pas public.</p>

  
<h3><a name="EI_EXPOSE_STATIC_REP2">MS: Une m??thode peut exposer un ??tat interne statique en stockant un objet modifiable dans un champs statique (EI_EXPOSE_STATIC_REP2)</a></h3>


<p>Ce code stocke une r??f??rence ?? un objet modifiable externe dans un champs statique. Si des modifications non v??rifi??es de l'objet modifiable peuvent compromettre la s??curit?? ou d'autres propri??t??s importantes, vous devez faire autre chose. Stocker une copie de l'objet est souvent une meilleur approche.</p>

  
<h3><a name="MS_CANNOT_BE_FINAL">MS: Un champ n'est pas final et ne peut pas ??tre prot??g?? face ?? du code malveillant (MS_CANNOT_BE_FINAL)</a></h3>


<p>Un champ statique modifiable peut-??tre modifi?? par accident ou par du code malveillant. Malheureusement, la fa??on dont ce champ est utilis?? ne permet une correction ais??e de ce probl??me.</p>

  
<h3><a name="MS_EXPOSE_REP">MS: Une m??thode statique publique risque d'exposer une repr??sentation interne en renvoyant un tableau (MS_EXPOSE_REP)</a></h3>


<p>Une m??thode statique publique renvoit une r??f??rence ?? un tableau faisant partie de l'??tat statique de la classe. Tout code appelant cette m??thode peut librement modifier le tableau sous-jacent. Une correction possible serait de renvoyer une copie du tableau.</p>

  
<h3><a name="MS_FINAL_PKGPROTECT">MS: Le champ devrait ??tre ?? la fois final et package protected (MS_FINAL_PKGPROTECT)</a></h3>


<p>Un champ statique modifiable peut-??tre chang?? par accident ou par du code malveillant d'un autre paquetage. Le champ devrait ??tre package protected et/ou final pour ??viter cette vuln??rabilit??.</p>

  
<h3><a name="MS_MUTABLE_ARRAY">MS: Un champ est un tableau modifiable (MS_MUTABLE_ARRAY)</a></h3>


<p>Le champ est une r??f??rence final static ?? un tableau et peut-??tre modifi?? par accident ou par du code malveillant d'un autre paquetage. Ce code peut librement modifier le contenu du tableau.</p>

  
<h3><a name="MS_MUTABLE_COLLECTION">MS: Field is a mutable collection (MS_MUTABLE_COLLECTION)</a></h3>


 <p>A mutable collection instance is assigned to a final static field, 
   thus can be changed by malicious code or by accident from another package.
   Consider wrapping this field into Collections.unmodifiableSet/List/Map/etc.
   to avoid this vulnerability.</p>

    
<h3><a name="MS_MUTABLE_COLLECTION_PKGPROTECT">MS: Field is a mutable collection which should be package protected (MS_MUTABLE_COLLECTION_PKGPROTECT)</a></h3>


 <p>A mutable collection instance is assigned to a final static field, 
   thus can be changed by malicious code or by accident from another package.
   The field could be made package protected to avoid this vulnerability. 
   Alternatively you may wrap this field into Collections.unmodifiableSet/List/Map/etc.
   to avoid this vulnerability.</p>

    
<h3><a name="MS_MUTABLE_HASHTABLE">MS: Un champ modifiable est une Hashtable (MS_MUTABLE_HASHTABLE)</a></h3>


<p>Le champ est une r??f??rence final static ?? une <code>Hashtable</code> et peut-??tre modifi?? par accident ou par du code malveillant d'un autre paquetage. Ce code peut librement modifier le contenu de la <code>Hashtable</code>.</p>

  
<h3><a name="MS_OOI_PKGPROTECT">MS: Le champ devrait ??tre sorti de l'interface et mis en package protected (MS_OOI_PKGPROTECT)</a></h3>


<p>Un champ final static d??fini dans une interface r??f??rence un objet modifiable tel qu'un tableau ou une table de hachage. Cet objet pourrait ??tre modifi?? par accident ou par du code sournois d'un autre paquetage. Pour r??soudre cela et ??viter cette vuln??rabilit??, le champ doit ??tre int??gr?? dans une classe et sa visibilit?? modifi??e en package protected.</p>

  
<h3><a name="MS_PKGPROTECT">MS: Un champ devrait ??tre package protected (MS_PKGPROTECT)</a></h3>


<p>Un champ statique modifiable peut-??tre chang?? par accident ou par du code malveillant d'un autre paquetage. Le champ devrait ??tre package protected pour ??viter cette vuln??rabilit??.</p>

  
<h3><a name="MS_SHOULD_BE_FINAL">MS: Un champ n'est pas final alors qu'il devrait l'??tre (MS_SHOULD_BE_FINAL)</a></h3>


<p>Un champ statique modifiable peut-??tre chang?? par accident ou par du code malveillant d'un autre paquetage. Le champ devrait ??tre final pour ??viter cette vuln??rabilit??.</p>

  
<h3><a name="MS_SHOULD_BE_REFACTORED_TO_BE_FINAL">MS: Field isn't final but should be refactored to be so (MS_SHOULD_BE_REFACTORED_TO_BE_FINAL)</a></h3>


   <p>
This static field public but not final, and
could be changed by malicious code or
by accident from another package.
The field could be made final to avoid
this vulnerability. However, the static initializer contains more than one write
to the field, so doing so will require some refactoring.
</p>

    
<h3><a name="AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION">AT: Sequence of calls to concurrent abstraction may not be atomic (AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION)</a></h3>

          
        <p>This code contains a sequence of calls to a concurrent  abstraction
            (such as a concurrent hash map).
            These calls will not be executed atomically.
          
      
<h3><a name="DC_DOUBLECHECK">DC: Possible double v??rification d'un champ (DC_DOUBLECHECK)</a></h3>


<p>Cette m??thode contient peut-??tre une instance de verrou par double v??rification. Cet idiome n'est pas correct vis-??-vis de la s??mantique du mod??le de m??moire Java. Pour plus d'informations, cf. la page <a href="http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html">http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html</a>.</p>

  
<h3><a name="DC_PARTIALLY_CONSTRUCTED">DC: Possible exposure of partially initialized object (DC_PARTIALLY_CONSTRUCTED)</a></h3>


  <p>Looks like this method uses lazy field initialization with double-checked locking.
  While the field is correctly declared as volatile, it's possible that the internal structure of
  the object is changed after the field assignment, thus another thread may see the partially initialized object.</p>
  <p>To fix this problem consider storing the object into the local variable first
  and save it to the volatile field only after it's fully constructed.
  </p>

    
<h3><a name="DL_SYNCHRONIZATION_ON_BOOLEAN">DL: Synchronization on Boolean (DL_SYNCHRONIZATION_ON_BOOLEAN)</a></h3>

      
  <p> The code synchronizes on a boxed primitive constant, such as an Boolean.</p>
<pre>
private static Boolean inited = Boolean.FALSE;
...
  synchronized(inited) {
    if (!inited) {
       init();
       inited = Boolean.TRUE;
       }
     }
...
</pre>
<p>Since there normally exist only two Boolean objects, this code could be synchronizing on the same object as other, unrelated code, leading to unresponsiveness
and possible deadlock</p>
<p>See CERT <a href="https://www.securecoding.cert.org/confluence/display/java/CON08-J.+Do+not+synchronize+on+objects+that+may+be+reused">CON08-J. Do not synchronize on objects that may be reused</a> for more information.</p>

    
<h3><a name="DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE">DL: Synchronization on boxed primitive (DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE)</a></h3>

      
  <p> The code synchronizes on a boxed primitive constant, such as an Integer.</p>
<pre>
private static Integer count = 0;
...
  synchronized(count) {
     count++;
     }
...
</pre>
<p>Since Integer objects can be cached and shared,
this code could be synchronizing on the same object as other, unrelated code, leading to unresponsiveness
and possible deadlock</p>
<p>See CERT <a href="https://www.securecoding.cert.org/confluence/display/java/CON08-J.+Do+not+synchronize+on+objects+that+may+be+reused">CON08-J. Do not synchronize on objects that may be reused</a> for more information.</p>

    
<h3><a name="DL_SYNCHRONIZATION_ON_SHARED_CONSTANT">DL: Synchronization on interned String  (DL_SYNCHRONIZATION_ON_SHARED_CONSTANT)</a></h3>


  <p> The code synchronizes on interned String.</p>
<pre>
private static String LOCK = "LOCK";
...
  synchronized(LOCK) { ...}
...
</pre>
<p>Constant Strings are interned and shared across all other classes loaded by the JVM. Thus, this could
is locking on something that other code might also be locking. This could result in very strange and hard to diagnose
blocking and deadlock behavior. See <a href="http://www.javalobby.org/java/forums/t96352.html">http://www.javalobby.org/java/forums/t96352.html</a> and <a href="http://jira.codehaus.org/browse/JETTY-352">http://jira.codehaus.org/browse/JETTY-352</a>.
</p>
<p>See CERT <a href="https://www.securecoding.cert.org/confluence/display/java/CON08-J.+Do+not+synchronize+on+objects+that+may+be+reused">CON08-J. Do not synchronize on objects that may be reused</a> for more information.</p>

    
<h3><a name="DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE">DL: Synchronization on boxed primitive values (DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE)</a></h3>

      
  <p> The code synchronizes on an apparently unshared boxed primitive,
such as an Integer.</p>
<pre>
private static final Integer fileLock = new Integer(1);
...
  synchronized(fileLock) {
     .. do something ..
     }
...
</pre>
<p>It would be much better, in this code, to redeclare fileLock as</p>
<pre>
private static final Object fileLock = new Object();
</pre>
<p>
The existing code might be OK, but it is confusing and a
future refactoring, such as the "Remove Boxing" refactoring in IntelliJ,
might replace this with the use of an interned Integer object shared
throughout the JVM, leading to very confusing behavior and potential deadlock.
</p>

    
<h3><a name="DM_MONITOR_WAIT_ON_CONDITION">Dm: Wait() appel?? sur une Condition (DM_MONITOR_WAIT_ON_CONDITION)</a></h3>


<p>Cette m??thode appelle <code>wait()</code> sur un objet <code>java.util.concurrent.locks.Condition</code>. L'attente d'une <code>Condition</code> devrait ??tre faite en utilisant l'une des m??thodes <code>await()</code> d??finies dans l'interface <code>Condition</code>.</p>

  
<h3><a name="DM_USELESS_THREAD">Dm: Thread cr???? avec la m??thode run vide par d??faut (DM_USELESS_THREAD)</a></h3>


<p>Cette m??thode cr??e un thread sans sp??cifier de m??thode <code>run</code>, soit par d??rivation de la classe <code>Thread</code>, soit en transmettant un objet <code>Runnable</code>. Ce thread ne fait donc rien sauf perdre du temps.</p>

  
<h3><a name="ESync_EMPTY_SYNC">ESync: Bloc synchronis?? vide (ESync_EMPTY_SYNC)</a></h3>


<p>Pr??sence d'un bloc synchronis?? vide:</p>
<pre>
synchronized() {}
</pre>
<p>L'utilisation de blocs synchronis??s vides est bien plus subtile et dure ?? r??aliser correctement que bien des gens ne le reconnaissent, et de plus ne correspond que rarement ?? la meilleure des solutions.</p>

  
<h3><a name="IS2_INCONSISTENT_SYNC">IS: Synchronisation incoh??rente (IS2_INCONSISTENT_SYNC)</a></h3>


<p>Les champs de cette classe semblent ??tre acc??d??s de fa??on incoh??rente vis-??-vis de la synchronisation. Le d??tecteur de bogue juge que :</p>
<ol>
  <li>la classe contient un m??lange d'acc??s verrouill??s et non verrouill??s,</li>
  <li>au moins un des acc??s verrouill??s est effectu?? par une des propres m??thodes de la classe,</li>
  <li>le nombre d'acc??s (lectures et ??critures) non synchronis??s ne repr??sente pas plus d'un tiers de tous les acc??s, avec plus de deux fois plus d'??critures que de lectures.</li>
</ol>
<p>Un bogue typique d??clenchant ce d??tecteur est l'oubli de la synchronisation sur l'une des m??thodes d'une classe qui essaye d'??tre s??re vis-??-vis des threads.</p>
<p>Vous pouvez s??lectionner les noeuds nomm??s "Acc??s non synchronis??s" pour avoir la position exacte dans le code o?? le d??tecteur pense qu'un champ est acc??d?? sans synchronisation.</p>
<p>Notez qu'il y a diverses sources d'inexactitude dans ce d??tecteur ; par exemple, le d??tecteur ne peut pas rep??rer statiquement toutes les situations dans lesquelles un verrou est obtenu. En fait, m??me lorsque le d??tecteur rep??re effectivement des acc??s avec et sans verrou, le code concern?? peut quand m??me ??tre correct.</p>
<p>Cette description se r??f??re ?? la version "IS2" du d??tecteur, qui est plus pr??cise pour d??tecter les acc??s avec et sans verrous que l'ancien d??tecteur "IS".</p>

  
<h3><a name="IS_FIELD_NOT_GUARDED">IS: Champ non prot??g?? contre les acc??s concurrents (IS_FIELD_NOT_GUARDED)</a></h3>


<p>Ce champ est annot?? avec <code>net.jcip.annotations.GuardedBy</code>, mais peut ??tre utilis?? d'une fa??on qui contredit l'annotation.</p>

  
<h3><a name="JLM_JSR166_LOCK_MONITORENTER">JLM: Synchronisation effectu??e sur un Lock java.util.concurrent (JLM_JSR166_LOCK_MONITORENTER)</a></h3>


<p>Cette m??thode se synchronise au moyen d'une impl??mentation de <code>java.util.concurrent.locks.Lock</code>. Vous devriez plut??t utiliser les m??thodes <code>lock()</code> et <code>unlock()</code>.</p>

  
<h3><a name="JLM_JSR166_UTILCONCURRENT_MONITORENTER">JLM: Synchronization performed on util.concurrent instance (JLM_JSR166_UTILCONCURRENT_MONITORENTER)</a></h3>


<p> This method performs synchronization an object that is an instance of
a class from the java.util.concurrent package (or its subclasses). Instances
of these classes have their own concurrency control mechanisms that are orthogonal to
the synchronization provided by the Java keyword <code>synchronized</code>. For example,
synchronizing on an <code>AtomicBoolean</code> will not prevent other threads
from modifying the  <code>AtomicBoolean</code>.</p>
<p>Such code may be correct, but should be carefully reviewed and documented,
and may confuse people who have to maintain the code at a later date.
</p>


<h3><a name="JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT">JLM: Using monitor style wait methods on util.concurrent abstraction (JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT)</a></h3>


<p> This method calls
<code>wait()</code>,
<code>notify()</code> or
<code>notifyAll()()</code>
on an object that also provides an
<code>await()</code>,
<code>signal()</code>,
<code>signalAll()</code> method (such as util.concurrent Condition objects).
This probably isn't what you want, and even if you do want it, you should consider changing
your design, as other developers will find it exceptionally confusing.
</p>


<h3><a name="LI_LAZY_INIT_STATIC">LI: Initialisation paresseuse incorrecte d'un champ statique (LI_LAZY_INIT_STATIC)</a></h3>


<p>Cette m??thode contient une initialisation paresseuse non synchronis??e d'un champ statique non <code>volatile</code>. Comme le compilateur ou le processeur peuvent r??ordonner les instructions, les threads ne sont pas certains de voir un objet compl??tement initialis??, <em>si la m??thode peut-??tre appel??e par de multiples threads</em>. Vous pouvez rendre le champs <code>volatile</code> pour corriger le probl??me. Pour plus d'informations, cf. <a href="http://www.cs.umd.edu/~pugh/java/memoryModel/">site Web sur le mod??le m??moire de Java</a>.</p>

  
<h3><a name="LI_LAZY_INIT_UPDATE_STATIC">LI: Incorrect lazy initialization and update of static field (LI_LAZY_INIT_UPDATE_STATIC)</a></h3>


<p> This method contains an unsynchronized lazy initialization of a static field.
After the field is set, the object stored into that location is further updated or accessed.
The setting of the field is visible to other threads as soon as it is set. If the
futher accesses in the method that set the field serve to initialize the object, then
you have a <em>very serious</em> multithreading bug, unless something else prevents
any other thread from accessing the stored object until it is fully initialized.
</p>
<p>Even if you feel confident that the method is never called by multiple
threads, it might be better to not set the static field until the value
you are setting it to is fully populated/initialized.

    
<h3><a name="ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD">ML: Synchronization on field in futile attempt to guard that field (ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD)</a></h3>


  <p> This method synchronizes on a field in what appears to be an attempt
to guard against simultaneous updates to that field. But guarding a field
gets a lock on the referenced object, not on the field. This may not
provide the mutual exclusion you need, and other threads might
be obtaining locks on the referenced objects (for other purposes). An example
of this pattern would be:</p>
<pre>
private Long myNtfSeqNbrCounter = new Long(0);
private Long getNotificationSequenceNumber() {
     Long result = null;
     synchronized(myNtfSeqNbrCounter) {
         result = new Long(myNtfSeqNbrCounter.longValue() + 1);
         myNtfSeqNbrCounter = new Long(result.longValue());
     }
     return result;
 }
</pre>

    
<h3><a name="ML_SYNC_ON_UPDATED_FIELD">ML: La m??thode se synchronise sur un champ mis ?? jour (ML_SYNC_ON_UPDATED_FIELD)</a></h3>


<p>Cette m??thode se synchronise sur le champ modifiable d'une r??f??rence objet. Il y a peu de chances que cela ait un sens puisque les diff??rents threads se synchroniserons par rapport ?? diff??rents objets.</p>

  
<h3><a name="MSF_MUTABLE_SERVLET_FIELD">MSF: Mutable servlet field (MSF_MUTABLE_SERVLET_FIELD)</a></h3>


<p>A web server generally only creates one instance of servlet or jsp class (i.e., treats
the class as a Singleton),
and will
have multiple threads invoke methods on that instance to service multiple
simultaneous requests.
Thus, having a mutable instance field generally creates race conditions.

    
<h3><a name="MWN_MISMATCHED_NOTIFY">MWN: notify() non appareill?? (MWN_MISMATCHED_NOTIFY)</a></h3>


<p>Cette m??thode appelle <code>Object.notify()</code> ou <code>Object.notifyAll()</code> sans d??tenir, visiblement, de verrou sur l'objet. Appeler <code>notify()</code> ou <code>notifyAll()</code> sans d??tenir de verrou entra??ne le d??clenchement d'une <code>IllegalMonitorStateException</code>.</p>

  
<h3><a name="MWN_MISMATCHED_WAIT">MWN: wait() non appareill?? (MWN_MISMATCHED_WAIT)</a></h3>


<p>Cette m??thode appelle <code>Object.wait()</code> sans d??tenir, visiblement, de verrou sur l'objet. Appeler <code>wait()</code> sans d??tenir de verrou entra??ne le d??clenchement d'une <code>IllegalMonitorStateException</code>.</p>

  
<h3><a name="NN_NAKED_NOTIFY">NN: Appel notify() isol?? dans une m??thode (NN_NAKED_NOTIFY)</a></h3>


<p>Un appel ?? <code>notify()</code> ou <code>notifyAll()</code> est effectu?? sans aucun changement (apparent) de l'??tat d'un objet modifiable. En g??n??ral, appeler une m??thode <code>notify()</code> dans un moniteur est effectu?? parce qu'une condition quelconque attendue par un autre thread est devenue vraie. Dans tous les cas, pour que la condition ait un sens, elle doit porter sur un objet visible des deux threads.</p>
<p>Ce bogue n'indique pas n??cessairement une erreur puisque la modification de l'??tat de l'objet peut avoir eu lieu dans une m??thode qui appelle la m??thode contenant la notification.</p>

  
<h3><a name="NP_SYNC_AND_NULL_CHECK_FIELD">NP: Synchronize and null check on the same field. (NP_SYNC_AND_NULL_CHECK_FIELD)</a></h3>


<p>Since the field is synchronized on, it seems not likely to be null.
If it is null and then synchronized on a NullPointerException will be
thrown and the check would be pointless. Better to synchronize on
another field.</p>


     
<h3><a name="NO_NOTIFY_NOT_NOTIFYALL">No: Utilisation de notify() plut??t que notifyAll() dans une m??thode (NO_NOTIFY_NOT_NOTIFYALL)</a></h3>


<p>Cette m??thode appelle <code>notify()</code> plut??t que <code>notifyAll()</code>. Le moniteur Java est souvent utilis?? pour de multiples conditions. Appeler <code>notify()</code> ne r??veille qu'un thread, ce qui signifie que le thread r??veill?? peut ne pas ??tre celui qui attend la condition que l'appelant vient de remplir.</p>

  
<h3><a name="RS_READOBJECT_SYNC">RS: Seule la m??thode readObject() est synchronis??e (RS_READOBJECT_SYNC)</a></h3>


<p>Cette classe <code>Serializable</code> d??finit une m??thode <code>readObject()</code> qui est synchronis??e. Par d??finition, un objet cr???? par d??s??rialisation n'est accessible que par un unique thread, donc il n'y a aucun int??r??t ?? synchroniser <code>readObject()</code>. Si la m??thode <code>readObject()</code> en elle-m??me rend l'objet visible d'un autre thread, vous avez un exemple de style de code tr??s douteux.</p>

  
<h3><a name="RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED">RV: Return value of putIfAbsent ignored, value passed to putIfAbsent reused (RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED)</a></h3>

          
        The <code>putIfAbsent</code> method is typically used to ensure that a
        single value is associated with a given key (the first value for which put
        if absent succeeds).
        If you ignore the return value and retain a reference to the value passed in,
        you run the risk of retaining a value that is not the one that is associated with the key in the map.
        If it matters which one you use and you use the one that isn't stored in the map,
        your program will behave incorrectly.
          
      
<h3><a name="RU_INVOKE_RUN">Ru: Invocation de run() sur un thread (Vouliez-vous plut??t dire start() ?) (RU_INVOKE_RUN)</a></h3>


<p>Cette m??thode appelle explicitement <code>run()</code> sur un objet. En g??n??ral, les classes impl??mentent l'interface <code>Runnable</code> parce qu'elles vont avoir leur m??thode <code>run()</code> invoqu??e dans un nouveau thread, auquel cas <code>Thread.start()</code> est la bonne m??thode ?? appeler.</p>

  
<h3><a name="SC_START_IN_CTOR">SC: Un constructeur invoque Thread.start() (SC_START_IN_CTOR)</a></h3>


<p>Le constructeur lance un thread. Il y a de fortes chances que ce soit une erreur si cette classe est un jour d??riv??e ou ??tendue puisque que le thread sera alors lanc?? avant que le constructeur de la classe d??riv??e ne soit appel??.</p>

  
<h3><a name="SP_SPIN_ON_FIELD">SP: M??thode bouclant sur un champ (SP_SPIN_ON_FIELD)</a></h3>


<p>Cette m??thode tourne en rond sur une boucle qui lit un champ. Le compilateur est autoris?? ?? sortir la lecture de la boucle, cr??ant ainsi une boucle infinie. La classe devrait ??tre modifi??e afin d'??tre correctement synchronis??e (avec des appels ?? <code>wait()</code> et <code>notify()</code>).</p>

  
<h3><a name="STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE">STCAL: Call to static Calendar (STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE)</a></h3>


<p>Even though the JavaDoc does not contain a hint about it, Calendars are inherently unsafe for multihtreaded use.
The detector has found a call to an instance of Calendar that has been obtained via a static
field. This looks suspicous.</p>
<p>For more information on this see <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6231579">Sun Bug #6231579</a>
and <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6178997">Sun Bug #6178997</a>.</p>


<h3><a name="STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE">STCAL: Call to static DateFormat (STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE)</a></h3>


<p>As the JavaDoc states, DateFormats are inherently unsafe for multithreaded use.
The detector has found a call to an instance of DateFormat that has been obtained via a static
field. This looks suspicous.</p>
<p>For more information on this see <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6231579">Sun Bug #6231579</a>
and <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6178997">Sun Bug #6178997</a>.</p>


<h3><a name="STCAL_STATIC_CALENDAR_INSTANCE">STCAL: Static Calendar field (STCAL_STATIC_CALENDAR_INSTANCE)</a></h3>


<p>Even though the JavaDoc does not contain a hint about it, Calendars are inherently unsafe for multihtreaded use.
Sharing a single instance across thread boundaries without proper synchronization will result in erratic behavior of the
application. Under 1.4 problems seem to surface less often than under Java 5 where you will probably see
random ArrayIndexOutOfBoundsExceptions or IndexOutOfBoundsExceptions in sun.util.calendar.BaseCalendar.getCalendarDateFromFixedDate().</p>
<p>You may also experience serialization problems.</p>
<p>Using an instance field is recommended.</p>
<p>For more information on this see <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6231579">Sun Bug #6231579</a>
and <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6178997">Sun Bug #6178997</a>.</p>


<h3><a name="STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE">STCAL: Static DateFormat (STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE)</a></h3>


<p>As the JavaDoc states, DateFormats are inherently unsafe for multithreaded use.
Sharing a single instance across thread boundaries without proper synchronization will result in erratic behavior of the
application.</p>
<p>You may also experience serialization problems.</p>
<p>Using an instance field is recommended.</p>
<p>For more information on this see <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6231579">Sun Bug #6231579</a>
and <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6178997">Sun Bug #6178997</a>.</p>


<h3><a name="SWL_SLEEP_WITH_LOCK_HELD">SWL: Appel de la m??thode Thread.sleep() avec un verrou (SWL_SLEEP_WITH_LOCK_HELD)</a></h3>


<p>Cette m??thode appelle <code>Thread.sleep()</code> en tenant un verrou. Ceci peut r??sulter en de faibles performances, peu de capacit?? ?? monter en charge ou un inter-blocage puisque d'autres processus pourraient ??tre en attente du verrou. C'est une meilleure id??e d'appeler <code>wait()</code> sur le verrou, afin de le lib??rer et de permettre ?? d'autre processus de tourner.</p>

  
<h3><a name="TLW_TWO_LOCK_WAIT">TLW: wait() avec deux verrous en attente (TLW_TWO_LOCK_WAIT)</a></h3>


<p>Attendre sur on moniteur alors que deux verrous sont d??tenus peut entra??ner un blocage fatal (deadlock). Ex??cuter un <code>wait()</code> ne lib??re que le verrou sur l'objet accueillant le <code>wait()</code>, mais aucun autre verrou. Ce n'est pas obligatoirement un bogue, mais il vaut mieux examiner ??a en d??tails.</p>

  
<h3><a name="UG_SYNC_SET_UNSYNC_GET">UG: M??thode getXXX non synchronis??e, m??thode setXXX synchronis??e (UG_SYNC_SET_UNSYNC_GET)</a></h3>


<p>Cette classe contient des m??thodes <code>getXXX</code> et <code>setXXX</code> similaires dont la m??thode <code>setXXX</code> est synchronis??e tandis que la m??thode <code>getXXX</code> ne l'est pas. Ceci peut entra??ner un comportement incorrect ?? l'ex??cution car l'appelant de la m??thode <code>getXXX</code> ne verra pas obligatoirement l'objet dans un ??tat consistant. La m??thode <code>getXXX</code> devrait ??tre synchronis??e.</p>

  
<h3><a name="UL_UNRELEASED_LOCK">UL: La m??thode ne lib??re pas un verrou dans tous les chemins d'ex??cution (UL_UNRELEASED_LOCK)</a></h3>


<p>Cette m??thode acqui??re un verrou JSR-166 (<code>java.util.concurrent</code>), mais ne le lib??re pas dans tous les chemins d'ex??cution. En g??n??ral, l'idiome correct pour utiliser un verrou JSR-166 est :</p>
<pre>
Lock l = ...;
l.lock();
try {
    // do something
} finally {
    l.unlock();
}
</pre>

  
<h3><a name="UL_UNRELEASED_LOCK_EXCEPTION_PATH">UL: La m??thode ne lib??re pas un verrou dans tous les chemins d'exception (UL_UNRELEASED_LOCK_EXCEPTION_PATH)</a></h3>


<p>Cette m??thode acqui??re un verrou JSR-166 (<code>java.util.concurrent</code>), mais ne le lib??re pas dans tous les chemins d'exception. En g??n??ral, l'idiome correct pour utiliser un verrou JSR-166 est :</p>
<pre>
Lock l = ...;
l.lock();
try {
    // do something
} finally {
    l.unlock();
}
</pre>

  
<h3><a name="UW_UNCOND_WAIT">UW: M??thode contenant un wait() non conditionn?? (UW_UNCOND_WAIT)</a></h3>


<p>Cette m??thode contient un appel ?? <code>java.lang.Object.wait()</code> qui n'est pas prot??g?? par une condition. Si la condition que la m??thode essaye d'attendre a d??j?? ??t?? remplie, le thread risque d'attendre ind??finiment.</p>

  
<h3><a name="VO_VOLATILE_INCREMENT">VO: An increment to a volatile field isn't atomic (VO_VOLATILE_INCREMENT)</a></h3>


<p>This code increments a volatile field. Increments of volatile fields aren't
atomic. If more than one thread is incrementing the field at the same time,
increments could be lost.
</p>

    
<h3><a name="VO_VOLATILE_REFERENCE_TO_ARRAY">VO: Une r??f??rence volatile ?? un tableau ne traite pas les ??l??ments du tableau comme volatiles (VO_VOLATILE_REFERENCE_TO_ARRAY)</a></h3>


<p>Ceci d??clare une r??f??rence volatile ?? un tableau, ce qui n'est peut-??tre pas ce que vous voulez. Avec une r??f??rence volatile ?? un tableau, les lectures et ??critures de la r??f??rence au tableau sont trait??es comme volatiles, mais les ??l??ments ne sont pas volatiles. Pour obtenir des ??l??ments volatiles, vous devez utiliser l'une des classes de tableaux atomiques de <code>java.util.concurrent</code> (inclus dans Java 5.0).</p>

  
<h3><a name="WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL">WL: Synchronization on getClass rather than class literal (WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL)</a></h3>

      
      <p>
     This instance method synchronizes on <code>this.getClass()</code>. If this class is subclassed,
     subclasses will synchronize on the class object for the subclass, which isn't likely what was intended.
     For example, consider this code from java.awt.Label:</p>
     <pre>
     private static final String base = "label";
     private static int nameCounter = 0;
     String constructComponentName() {
        synchronized (getClass()) {
            return base + nameCounter++;
        }
     }
     </pre>
     <p>Subclasses of <code>Label</code> won't synchronize on the same subclass, giving rise to a datarace.
     Instead, this code should be synchronizing on <code>Label.class</code></p>
      <pre>
     private static final String base = "label";
     private static int nameCounter = 0;
     String constructComponentName() {
        synchronized (Label.class) {
            return base + nameCounter++;
        }
     }
     </pre>
      <p>Bug pattern contributed by Jason Mehrens</p>
      
    
<h3><a name="WS_WRITEOBJECT_SYNC">WS: Seule la m??thode writeObject() est synchronis??e (WS_WRITEOBJECT_SYNC)</a></h3>


<p>Cette classe a une m??thode <code>writeObject()</code> qui est synchronis??e ; mais aucune autre m??thode de cette classe n'est synchronis??e.</p>

  
<h3><a name="WA_AWAIT_NOT_IN_LOOP">Wa: Condition.await() en dehors d'une boucle (WA_AWAIT_NOT_IN_LOOP)</a></h3>


<p>Cette m??thode contient un appel ?? <code>java.util.concurrent.await()</code> (ou une variante) qui n'est pas dans une boucle. Si cet objet est utilis?? pour de multiples conditions, la condition que l'appelant esp??re r??veiller pourra ??tre ou ne pas ??tre celle qui le sera effectivement.</p>

  
<h3><a name="WA_NOT_IN_LOOP">Wa: M??thode contenant un wait() en dehors d'une boucle (WA_NOT_IN_LOOP)</a></h3>


<p>Cette m??thode contient un appel ?? <code>java.lang.Object.wait()</code> qui n'est pas dans une boucle. Si le moniteur est utilis?? pour des conditions multiples, la condition que l'appelant attend peut ne pas ??tre celle qui s'est r??ellement d??clench??e.</p>

  
<h3><a name="BX_BOXING_IMMEDIATELY_UNBOXED">Bx: Primitive value is boxed and then immediately unboxed (BX_BOXING_IMMEDIATELY_UNBOXED)</a></h3>


  <p>A primitive is boxed, and then immediately unboxed. This probably is due to a manual
    boxing in a place where an unboxed value is required, thus forcing the compiler
to immediately undo the work of the boxing.
</p>

    
<h3><a name="BX_BOXING_IMMEDIATELY_UNBOXED_TO_PERFORM_COERCION">Bx: Primitive value is boxed then unboxed to perform primitive coercion (BX_BOXING_IMMEDIATELY_UNBOXED_TO_PERFORM_COERCION)</a></h3>


  <p>A primitive boxed value constructed and then immediately converted into a different primitive type
(e.g., <code>new Double(d).intValue()</code>). Just perform direct primitive coercion (e.g., <code>(int) d</code>).</p>

    
<h3><a name="BX_UNBOXED_AND_COERCED_FOR_TERNARY_OPERATOR">Bx: Primitive value is unboxed and coerced for ternary operator (BX_UNBOXED_AND_COERCED_FOR_TERNARY_OPERATOR)</a></h3>


  <p>A wrapped primitive value is unboxed and converted to another primitive type as part of the
evaluation of a conditional ternary operator (the <code> b ? e1 : e2</code> operator). The
semantics of Java mandate that if <code>e1</code> and <code>e2</code> are wrapped
numeric values, the values are unboxed and converted/coerced to their common type (e.g,
if <code>e1</code> is of type <code>Integer</code>
and <code>e2</code> is of type <code>Float</code>, then <code>e1</code> is unboxed,
converted to a floating point value, and boxed. See JLS Section 15.25.
</p>

    
<h3><a name="BX_UNBOXING_IMMEDIATELY_REBOXED">Bx: Boxed value is unboxed and then immediately reboxed (BX_UNBOXING_IMMEDIATELY_REBOXED)</a></h3>


  <p>A boxed value is unboxed and then immediately reboxed.
</p>

    
<h3><a name="DM_BOXED_PRIMITIVE_FOR_COMPARE">Bx: Boxing a primitive to compare (DM_BOXED_PRIMITIVE_FOR_COMPARE)</a></h3>


  <p>A boxed primitive is created just to call compareTo method. It's more efficient to use static compare method 
  (for double and float since Java 1.4, for other primitive types since Java 1.7) which works on primitives directly.
  </p>

    
<h3><a name="DM_BOXED_PRIMITIVE_FOR_PARSING">Bx: Boxing/unboxing to parse a primitive (DM_BOXED_PRIMITIVE_FOR_PARSING)</a></h3>


  <p>A boxed primitive is created from a String, just to extract the unboxed primitive value.
  It is more efficient to just call the static parseXXX method.</p>

    
<h3><a name="DM_BOXED_PRIMITIVE_TOSTRING">Bx: M??thode allouant une primitive boxed pour appeler toString (DM_BOXED_PRIMITIVE_TOSTRING)</a></h3>


<p>Une primitive "boxed" est allou??e juste pour appeler <code>toString()</code>. Il est plus efficace de simplement utiliser la forme statique de <code>toString</code> qui accepte la valeur primitive. Donc,</p>
  <table>
     <tr><th>Remplacer...</th><th>Avec...</th></tr>
     <tr><td><code>new Integer(1).toString()</code></td><td><code>Integer.toString(1)</code></td></tr>
     <tr><td><code>new Long(1).toString()</code></td><td><code>Long.toString(1)</code></td></tr>
     <tr><td><code>new Float(1.0).toString()</code></td><td><code>Float.toString(1.0)</code></td></tr>
     <tr><td><code>new Double(1.0).toString()</code></td><td><code>Double.toString(1.0)</code></td></tr>
     <tr><td><code>new Byte(1).toString()</code></td><td><code>Byte.toString(1)</code></td></tr>
     <tr><td><code>new Short(1).toString()</code></td><td><code>Short.toString(1)</code></td></tr>
     <tr><td><code>Boolean.valueOf(true).toString()</code></td><td><code>Boolean.toString(true)</code></td></tr>
  </table>

  
<h3><a name="DM_FP_NUMBER_CTOR">Bx: Method invokes inefficient floating-point Number constructor; use static valueOf instead (DM_FP_NUMBER_CTOR)</a></h3>

      
      <p>
      Using <code>new Double(double)</code> is guaranteed to always result in a new object whereas
      <code>Double.valueOf(double)</code> allows caching of values to be done by the compiler, class library, or JVM.
      Using of cached values avoids object allocation and the code will be faster.
      </p>
      <p>
      Unless the class must be compatible with JVMs predating Java 1.5,
      use either autoboxing or the <code>valueOf()</code> method when creating instances of <code>Double</code> and <code>Float</code>.
      </p>
      
    
<h3><a name="DM_NUMBER_CTOR">Bx: Method invokes inefficient Number constructor; use static valueOf instead (DM_NUMBER_CTOR)</a></h3>

      
      <p>
      Using <code>new Integer(int)</code> is guaranteed to always result in a new object whereas
      <code>Integer.valueOf(int)</code> allows caching of values to be done by the compiler, class library, or JVM.
      Using of cached values avoids object allocation and the code will be faster.
      </p>
      <p>
      Values between -128 and 127 are guaranteed to have corresponding cached instances
      and using <code>valueOf</code> is approximately 3.5 times faster than using constructor.
      For values outside the constant range the performance of both styles is the same.
      </p>
      <p>
      Unless the class must be compatible with JVMs predating Java 1.5,
      use either autoboxing or the <code>valueOf()</code> method when creating instances of
      <code>Long</code>, <code>Integer</code>, <code>Short</code>, <code>Character</code>, and <code>Byte</code>.
      </p>
      
    
<h3><a name="DMI_BLOCKING_METHODS_ON_URL">Dm: The equals and hashCode methods of URL are blocking (DMI_BLOCKING_METHODS_ON_URL)</a></h3>


  <p> The equals and hashCode
method of URL perform domain name resolution, this can result in a big performance hit.
See <a href="http://michaelscharf.blogspot.com/2006/11/javaneturlequals-and-hashcode-make.html">http://michaelscharf.blogspot.com/2006/11/javaneturlequals-and-hashcode-make.html</a> for more information.
Consider using <code>java.net.URI</code> instead.
   </p>

    
<h3><a name="DMI_COLLECTION_OF_URLS">Dm: Maps and sets of URLs can be performance hogs (DMI_COLLECTION_OF_URLS)</a></h3>


  <p> This method or field is or uses a Map or Set of URLs. Since both the equals and hashCode
method of URL perform domain name resolution, this can result in a big performance hit.
See <a href="http://michaelscharf.blogspot.com/2006/11/javaneturlequals-and-hashcode-make.html">http://michaelscharf.blogspot.com/2006/11/javaneturlequals-and-hashcode-make.html</a> for more information.
Consider using <code>java.net.URI</code> instead.
   </p>

    
<h3><a name="DM_BOOLEAN_CTOR">Dm: La m??thode invoque le constructeur inutile Boolean() ; utilisez Boolean.valueOf(...) ?? la place (DM_BOOLEAN_CTOR)</a></h3>


<p>Cr??er de nouvelles instances de <code>java.lang.Boolean</code> gaspille la m??moire puisque les objets <code>Boolean</code> sont immuables et qu'il n'y a que deux valeurs utiles de ce type. Utilisez ?? la place la m??thode <code>Boolean.valueOf()</code> pour cr??er des objets <code>Boolean</code>.</p>

  
<h3><a name="DM_GC">Dm: Ramasse-miettes explicite ; extr??mement douteux sauf dans du code de banc d'essai (DM_GC)</a></h3>


<p>Le code appelle explicitement le ramasse-miettes. Mis ?? part l'emploi sp??cifique dans un banc d'essai, c'est tr??s douteux.</p>
<p>Dans le pass??, les cas o?? des personnes ont explicitement invoqu?? le ramasse-miettes dans des m??thodes telles que <code>close()</code> ou <code>finalize()</code> ont creus??s des gouffres dans les performances. Le ramasse-miettes peut-??tre tr??s co??teux. Toute situation qui force des centaines ou des milliers de ramasse-miettes mettra ?? genoux une machine.</p>

  
<h3><a name="DM_NEW_FOR_GETCLASS">Dm: M??thode allouant un objet juste pour obtenir la classe (DM_NEW_FOR_GETCLASS)</a></h3>


<p>Cette m??thode alloue un objet juste pour appeler sa m??thode <code>getClass()</code> afin d'obtenir l'objet <code>Class</code> correspondant. Il est plus simple d'acc??der directement ?? la propri??t?? <code>.class</code> de la classe.</p>

  
<h3><a name="DM_NEXTINT_VIA_NEXTDOUBLE">Dm: Utiliser la m??thode nextInt de Random plut??t que nextDouble pour g??n??rer un entier al??atoire (DM_NEXTINT_VIA_NEXTDOUBLE)</a></h3>


<p>Si <code>r</code> est un <code>java.util.Random</code>, vous pouvez g??n??rer un nombre al??atoire entre 0 et n-1 en utilisant <code>r.nextInt(n)</code> plut??t que <code>(int)(r.nextDouble() * n)</code>.</p>

  
<h3><a name="DM_STRING_CTOR">Dm: La m??thode invoque le constructeur inutile String(String) ; utilisez juste l'argument (DM_STRING_CTOR)</a></h3>


<p>Utiliser le constructeur <code>java.lang.String(String)</code> gaspille de la m??moire puisque l'objet ainsi construit serait fonctionnellement identique ?? la cha??ne pass??e en param??tre. Utilisez juste la cha??ne en argument directement.</p>

  
<h3><a name="DM_STRING_TOSTRING">Dm: La m??thode appel toString() sur un objet String ; utilisez directement l'objet String (DM_STRING_TOSTRING)</a></h3>


<p>Appeler <code>String.toString()</code> est juste une op??ration redondante. Utilisez directement l'objet <code>String</code>.</p>

  
<h3><a name="DM_STRING_VOID_CTOR">Dm: La m??thode invoque le constructeur inutile String() ; utilisez juste "" (DM_STRING_VOID_CTOR)</a></h3>


<p>Cr??er un nouveau objet <code>java.lang.String</code> en utilisant le constructeur sans argument gaspille de la m??moire parce que l'objet ainsi cr???? serait fonctionnellement identique ?? la constante de cha??ne vide "". Java garantie que les cha??nes constantes identiques seront repr??sent??es par le m??me objet <code>String</code>. C'est pourquoi vous devriez directement utiliser la constante de cha??ne vide.</p>

  
<h3><a name="HSC_HUGE_SHARED_STRING_CONSTANT">HSC: Huge string constants is duplicated across multiple class files (HSC_HUGE_SHARED_STRING_CONSTANT)</a></h3>

      
      <p>
    A large String constant is duplicated across multiple class files.
    This is likely because a final field is initialized to a String constant, and the Java language
    mandates that all references to a final field from other classes be inlined into
that classfile. See <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6447475">JDK bug 6447475</a>
    for a description of an occurrence of this bug in the JDK and how resolving it reduced
    the size of the JDK by 1 megabyte.
</p>
      
   
<h3><a name="SBSC_USE_STRINGBUFFER_CONCATENATION">SBSC: La m??thode concat??ne des cha??nes au moyen de + en boucle (SBSC_USE_STRINGBUFFER_CONCATENATION)</a></h3>


<p>Cette m??thode semble construire une <ocde>String</code> en utilisant une concat??nation en boucle. A chaque it??ration, l'objet <code>String</code> est converti en <code>StringBuffer</code>/<code>StringBuilder</code>, compl??t??, puis de nouveau converti en <code>String</code>. Ceci a un co??t exponentiel en fonction du nombre d'it??rations, puisque la cha??ne est recopi??e ?? chaque it??ration.</p>
<p>De meilleurs performances peuvent ??tre obtenues en utilisant explicitement <code>StringBuffer</code> (ou <code>StringBuilder</code> en Java 5).</p>
<p>Par exemple :</p>
<pre>
// C'est mal !
String s = "";
for (int i = 0; i &lt; field.length; ++i) {
  s = s + field[i];
}

// C'est mieux...
StringBuffer buf = new StringBuffer();
for (int i = 0; i &lt; field.length; ++i) {
  buf.append(field[i]);
}
String s = buf.toString();
</pre>

  
<h3><a name="SIC_INNER_SHOULD_BE_STATIC">SIC: Devrait ??tre une classe interne statique (SIC_INNER_SHOULD_BE_STATIC)</a></h3>


<p>Cette classe est une classe interne, mais n'utilise pas sa r??f??rence vers l'objet qui l'a cr????e. Cette r??f??rence rend les instances de cette classe plus grosses et peut garder active la r??f??rence ?? l'objet cr??ateur plus longtemps que n??cessaire. Si possible, la classe devrait ??tre transform??e en classe interne <code>static</code>.</p>

  
<h3><a name="SIC_INNER_SHOULD_BE_STATIC_ANON">SIC: Peut-??tre transform??e en classe interne statique nomm??e (SIC_INNER_SHOULD_BE_STATIC_ANON)</a></h3>


<p>Cette classe est une classe interne qui n'utilise pas sa r??f??rence vers l'objet qui l'a cr????e. Cette r??f??rence rend l'objet plus gros et peut garder active la r??f??rence de l'objet cr??ateur plus longtemps que n??cessaire. Si possible, la classe devrait ??tre transform??e en classe interne <code>static</code>. Puisque les classes anonymes ne peuvent pas ??tre marqu??es comme <code>static</code>, il faudrait ??galement nommer cette classe.</p>

  
<h3><a name="SIC_INNER_SHOULD_BE_STATIC_NEEDS_THIS">SIC: Pourrait-??tre transform??e en classe interne statique (SIC_INNER_SHOULD_BE_STATIC_NEEDS_THIS)</a></h3>


<p>Cette classe est une classe interne mais elle n'utilise pas sa r??f??rence vers l'objet qui l'a cr????e, ?? part durant la cr??ation de l'objet interne. Cette r??f??rence rend les instances de cette classe plus grosses et peut forcer ?? garder active la r??f??rence de l'objet cr??ateur plus longtemps que n??cessaire. Si possible, la classe devrait-??tre transform??e en classe interne <code>static</code>. Puisque la r??f??rence ?? l'objet cr??ateur est requise durant la construction de la classe interne, le constructeur de celle-ci devrait-??tre modifi?? afin d'accepter en argument cette r??f??rence.</p>

  
<h3><a name="SS_SHOULD_BE_STATIC">SS: Champ non lu : devrait-il ??tre statique ? (SS_SHOULD_BE_STATIC)</a></h3>


<p>Cette classe contient un champ d'instance <code>final</code> qui est initialis?? par une valeur statique d??termin??e ?? la compilation. Envisagez de rendre ce champ <code>static</code>.</p>

  
<h3><a name="UM_UNNECESSARY_MATH">UM: Appel d'une m??thode statique de la classe Math sur une valeur constante (UM_UNNECESSARY_MATH)</a></h3>


<p>Cette m??thode utilise une m??thode statique de <code>java.lang.Math</code> sur une valeur constante. Dans ce cas, le r??sultat de cet appel peut ??tre d??termin?? statiquement, ce qui est plus rapide et souvent plus pr??cis. Les m??thodes d??tect??es sont :</p>
<table>
<tr><th>M??thode</th><th>Param??tre</th></tr>
<tr><td>abs</td><td>-tous-</td></tr>
<tr><td>acos</td><td>0.0 ou 1.0</td></tr>
<tr><td>asin</td><td>0.0 ou 1.0</td></tr>
<tr><td>atan</td><td>0.0 ou 1.0</td></tr>
<tr><td>atan2</td><td>0.0</td></tr>
<tr><td>cbrt</td><td>0.0 ou 1.0</td></tr>
<tr><td>ceil</td><td>-tous-</td></tr>
<tr><td>cos</td><td>0.0</td></tr>
<tr><td>cosh</td><td>0.0</td></tr>
<tr><td>exp</td><td>0.0 ou 1.0</td></tr>
<tr><td>expm1</td><td>0.0</td></tr>
<tr><td>floor</td><td>-tous-</td></tr>
<tr><td>log</td><td>0.0 ou 1.0</td></tr>
<tr><td>log10</td><td>0.0 ou 1.0</td></tr>
<tr><td>rint</td><td>-tous-</td></tr>
<tr><td>round</td><td>-tous-</td></tr>
<tr><td>sin</td><td>0.0</td></tr>
<tr><td>sinh</td><td>0.0</td></tr>
<tr><td>sqrt</td><td>0.0 ou 1.0</td></tr>
<tr><td>tan</td><td>0.0</td></tr>
<tr><td>tanh</td><td>0.0</td></tr>
<tr><td>toDegrees</td><td>0.0 ou 1.0</td></tr>
<tr><td>toRadians</td><td>0.0</td></tr>
</table>

  
<h3><a name="UPM_UNCALLED_PRIVATE_METHOD">UPM: M??thode priv??e jamais appel??e (UPM_UNCALLED_PRIVATE_METHOD)</a></h3>


<p>Cette m??thode priv??e n'est jamais appel??e. Bien qu'il soit possible que cette m??thode soit appel??e par r??flexion, il y a plus de chances qu'elle ne soit jamais utilis??e et qu'elle puisse ??tre supprim??e.</p>

  
<h3><a name="URF_UNREAD_FIELD">UrF: Champ inutilis?? (URF_UNREAD_FIELD)</a></h3>


<p>Ce champ n'est jamais lu. Envisagez de le supprimer de la classe.</p>

  
<h3><a name="UUF_UNUSED_FIELD">UuF: Champ inutilis?? (UUF_UNUSED_FIELD)</a></h3>


<p>Ce champ n'est jamais utilis??. Envisagez de le supprimer de la classe.</p>

  
<h3><a name="WMI_WRONG_MAP_ITERATOR">WMI: Utilisation inefficace d'un it??rateur sur keySet au lieu de entrySet (WMI_WRONG_MAP_ITERATOR)</a></h3>


<p>Cette m??thode acc??de ?? la valeur d'une entr??e de <code>Map</code> au moyen d'une cl?? provenant d'un it??rateur sur <code>keySet</code>. Il est plus efficace d'utiliser un it??rateur sur l'<code>entrySet</code> de la <code>Map</code>, pour ??viter la recherche par <code>Map.get(cl??)</code>.</p>

  
<h3><a name="DMI_CONSTANT_DB_PASSWORD">Dm: Hardcoded constant database password (DMI_CONSTANT_DB_PASSWORD)</a></h3>

      
    <p>This code creates a database connect using a hardcoded, constant password. Anyone with access to either the source code or the compiled code can
    easily learn the password.
</p>


    
<h3><a name="DMI_EMPTY_DB_PASSWORD">Dm: Empty database password (DMI_EMPTY_DB_PASSWORD)</a></h3>

      
    <p>This code creates a database connect using a blank or empty password. This indicates that the database is not protected by a password.
</p>


    
<h3><a name="HRS_REQUEST_PARAMETER_TO_COOKIE">HRS: HTTP cookie formed from untrusted input (HRS_REQUEST_PARAMETER_TO_COOKIE)</a></h3>

      
    <p>This code constructs an HTTP Cookie using an untrusted HTTP parameter. If this cookie is added to an HTTP response, it will allow a HTTP response splitting
vulnerability. See <a href="http://en.wikipedia.org/wiki/HTTP_response_splitting">http://en.wikipedia.org/wiki/HTTP_response_splitting</a>
for more information.</p>
<p>FindBugs looks only for the most blatant, obvious cases of HTTP response splitting.
If FindBugs found <em>any</em>, you <em>almost certainly</em> have more
vulnerabilities that FindBugs doesn't report. If you are concerned about HTTP response splitting, you should seriously
consider using a commercial static analysis or pen-testing tool.
</p>


    
<h3><a name="HRS_REQUEST_PARAMETER_TO_HTTP_HEADER">HRS: HTTP Response splitting vulnerability (HRS_REQUEST_PARAMETER_TO_HTTP_HEADER)</a></h3>

            
    <p>This code directly writes an HTTP parameter to an HTTP header, which allows for a HTTP response splitting
vulnerability. See <a href="http://en.wikipedia.org/wiki/HTTP_response_splitting">http://en.wikipedia.org/wiki/HTTP_response_splitting</a>
for more information.</p>
<p>FindBugs looks only for the most blatant, obvious cases of HTTP response splitting.
If FindBugs found <em>any</em>, you <em>almost certainly</em> have more
vulnerabilities that FindBugs doesn't report. If you are concerned about HTTP response splitting, you should seriously
consider using a commercial static analysis or pen-testing tool.
</p>


        
<h3><a name="PT_ABSOLUTE_PATH_TRAVERSAL">PT: Absolute path traversal in servlet (PT_ABSOLUTE_PATH_TRAVERSAL)</a></h3>


    <p>The software uses an HTTP request parameter to construct a pathname that should be within a restricted directory,
but it does not properly neutralize absolute path sequences such as "/abs/path" that can resolve to a location that is outside of that directory.

See <a href="http://cwe.mitre.org/data/definitions/36.html">http://cwe.mitre.org/data/definitions/36.html</a>
for more information.</p>
<p>FindBugs looks only for the most blatant, obvious cases of absolute path traversal.
If FindBugs found <em>any</em>, you <em>almost certainly</em> have more
vulnerabilities that FindBugs doesn't report. If you are concerned about absolute path traversal, you should seriously
consider using a commercial static analysis or pen-testing tool.
</p>


    
<h3><a name="PT_RELATIVE_PATH_TRAVERSAL">PT: Relative path traversal in servlet (PT_RELATIVE_PATH_TRAVERSAL)</a></h3>


    <p>The software uses an HTTP request parameter to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.

See <a href="http://cwe.mitre.org/data/definitions/23.html">http://cwe.mitre.org/data/definitions/23.html</a>
for more information.</p>
<p>FindBugs looks only for the most blatant, obvious cases of relative path traversal.
If FindBugs found <em>any</em>, you <em>almost certainly</em> have more
vulnerabilities that FindBugs doesn't report. If you are concerned about relative path traversal, you should seriously
consider using a commercial static analysis or pen-testing tool.
</p>


    
<h3><a name="SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE">SQL: Une cha??ne non constante est pass??e ?? la m??thode execute d'une commande SQL (SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE)</a></h3>


<p>Cette m??thode invoque la m??thode <code>execute</code> d'une commande SQL (statement) avec une cha??ne qui semble g??n??r??e dynamiquement. Pr??f??rer la pr??paration de la commande avec un <code>PreparedStatement</code>, c'est plus efficace et bien moins vuln??rable aux attaques par injection SQL (insertion de code SQL malveillant au sein d'une requ??te).</p>

  
<h3><a name="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING">SQL: Une requ??te est pr??par??e ?? partir d'une chaine non constante (SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING)</a></h3>


<p>Ce code cr???? une requ??te SQL pr??par??e ?? partir d'une chaine non constante. Les donn??es qui permettent de construire cette chaine venant de l'utilisateur, elles pourraient, sans v??rification, servir ?? faire de l'injection de SQL et ainsi modifier la requ??te afin qu'elle produise des r??sultats inattendus et ind??sirables.</p>

  
<h3><a name="XSS_REQUEST_PARAMETER_TO_JSP_WRITER">XSS: JSP reflected cross site scripting vulnerability (XSS_REQUEST_PARAMETER_TO_JSP_WRITER)</a></h3>


    <p>This code directly writes an HTTP parameter to JSP output, which allows for a cross site scripting
vulnerability. See <a href="http://en.wikipedia.org/wiki/Cross-site_scripting">http://en.wikipedia.org/wiki/Cross-site_scripting</a>
for more information.</p>
<p>FindBugs looks only for the most blatant, obvious cases of cross site scripting.
If FindBugs found <em>any</em>, you <em>almost certainly</em> have more cross site scripting
vulnerabilities that FindBugs doesn't report. If you are concerned about cross site scripting, you should seriously
consider using a commercial static analysis or pen-testing tool.
</p>

    
<h3><a name="XSS_REQUEST_PARAMETER_TO_SEND_ERROR">XSS: Servlet reflected cross site scripting vulnerability in error page (XSS_REQUEST_PARAMETER_TO_SEND_ERROR)</a></h3>


    <p>This code directly writes an HTTP parameter to a Server error page (using HttpServletResponse.sendError). Echoing this untrusted input allows
for a reflected cross site scripting
vulnerability. See <a href="http://en.wikipedia.org/wiki/Cross-site_scripting">http://en.wikipedia.org/wiki/Cross-site_scripting</a>
for more information.</p>
<p>FindBugs looks only for the most blatant, obvious cases of cross site scripting.
If FindBugs found <em>any</em>, you <em>almost certainly</em> have more cross site scripting
vulnerabilities that FindBugs doesn't report. If you are concerned about cross site scripting, you should seriously
consider using a commercial static analysis or pen-testing tool.
</p>


    
<h3><a name="XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER">XSS: Servlet reflected cross site scripting vulnerability (XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER)</a></h3>


    <p>This code directly writes an HTTP parameter to Servlet output, which allows for a reflected cross site scripting
vulnerability. See <a href="http://en.wikipedia.org/wiki/Cross-site_scripting">http://en.wikipedia.org/wiki/Cross-site_scripting</a>
for more information.</p>
<p>FindBugs looks only for the most blatant, obvious cases of cross site scripting.
If FindBugs found <em>any</em>, you <em>almost certainly</em> have more cross site scripting
vulnerabilities that FindBugs doesn't report. If you are concerned about cross site scripting, you should seriously
consider using a commercial static analysis or pen-testing tool.
</p>


    
<h3><a name="BC_BAD_CAST_TO_ABSTRACT_COLLECTION">BC: Transtypage douteux d'un type Collection vers une classe abstraite (BC_BAD_CAST_TO_ABSTRACT_COLLECTION)</a></h3>


<p>Ce code transtype un object de type <code>Collection</code> vers un type de collection abstrait (tel que <code>Collection</code>). Assurez vous que l'objet est bien du type pr??cis??. Si vous d??sirez par exemple faire une it??ration sur une collection, le transtypage vers <code>Set</code> ou <code>List</code> est inutile.</p>

  
<h3><a name="BC_BAD_CAST_TO_CONCRETE_COLLECTION">BC: Transtypage douteux vers une collection concr??te (BC_BAD_CAST_TO_CONCRETE_COLLECTION)</a></h3>


<p>Ce code transtype une collection abstraite (telles que <code>Collection</code>, <code>List</code>, ou <code>Set</code>) vers une impl??mentation concr??te sp??cifique (telles que <code>ArrayList</code> ou <code>HashSet</code>). Ceci n'est pas forc??ment correct, et peut rendre votre code plus fragile, puisqu'il un ??ventuel refactoring futur avec une autre impl??mentation concr??te plus difficile. A d??faut d'une raison valable, l'utilisation des classes abstraites est recommand??e.</p>

  
<h3><a name="BC_UNCONFIRMED_CAST">BC: Transtypage non v??rifi??/non confirm?? (BC_UNCONFIRMED_CAST)</a></h3>


<p>La faisablit?? du transtypage n'est pas v??rifi??e, et tous les objets candidats au transtypage ne sont pas l??gitimes. Assurez vous que la logique du programme est correcte et que le transtypage n'??chouera pas.</p>

  
<h3><a name="BC_UNCONFIRMED_CAST_OF_RETURN_VALUE">BC: Unchecked/unconfirmed cast of return value from method (BC_UNCONFIRMED_CAST_OF_RETURN_VALUE)</a></h3>


<p>
This code performs an unchecked cast of the return value of a method.
The code might be calling the method in such a way that the cast is guaranteed to be
safe, but FindBugs is unable to verify that the cast is safe.  Check that your program logic ensures that this
cast will not fail.
</p>

    
<h3><a name="BC_VACUOUS_INSTANCEOF">BC: instanceof renverra toujours vrai (BC_VACUOUS_INSTANCEOF)</a></h3>


<p>Ce test <code>instanceof</code> renverra toujours vrai. M??me s'il est s??r, assurez-vous qu'il ne s'agit pas d'une erreur logique ou d'une mauvaise compr??hension.</p>

  
<h3><a name="ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT">BSHIFT: D??calage ?? droite non sign?? et transtypage short/byte (ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT)</a></h3>


<p>Le code effectue un d??calage ?? droite non sign??, dont le r??sultat est transtyp?? vers un <code>short</code> ou un <code>byte</code>, ce qui ??limine les bits sup??rieurs du r??sultat. Puisque les bits sup??rieurs sont ??limin??s, il peut ne pas y avoir de diff??rence entre un d??calage ?? droite sign?? ou non sign?? (ceci d??pend de la taille du d??calage)</p>

  
<h3><a name="CI_CONFUSED_INHERITANCE">CI: Classe finale d??clarant un champ prot??g?? (CI_CONFUSED_INHERITANCE)</a></h3>


<p>Cette classe est d??clar??e <code>final</code> mais comporte des champs <code>protected</code>. Cette classe ??tant finale, elle ne pourra jamais ??tre d??riv??e et donc l'utilisation de <code>protected</code> est troublante. Le modificateur d'acc??s devrait ??tre modifi?? ?? <code>private</code> ou <code>public</code> pour mettre en ??vidence la v??ritable utilisation du champ.</p>

  
<h3><a name="DB_DUPLICATE_BRANCHES">DB: M??thode utilsant le m??me code pour deux branches (DB_DUPLICATE_BRANCHES)</a></h3>


<p>Cette m??thode utilise le m??me code pour impl??menter deux branches d'une condition. V??rifiez pour vous assurer que ce n'est pas une erreur de codage.</p>

  
<h3><a name="DB_DUPLICATE_SWITCH_CLAUSES">DB: M??thode utilisant le m??me code pour deux clauses switch (DB_DUPLICATE_SWITCH_CLAUSES)</a></h3>


<p>Cette m??thode utilise le m??me code pour impl??menter deux cas diff??rents d'un <code>switch</code>. Ce peut ??tre normal mais il vaut mieux v??rifier que ce n'est pas une erreur de codage.</p>

  
<h3><a name="DLS_DEAD_LOCAL_STORE">DLS: Alimentation ?? perte d'une variable locale (DLS_DEAD_LOCAL_STORE)</a></h3>


<p>Cette instruction assigne une valeur ?? une variable locale mais cette variable n'est pas lue par la suite. Ceci indique souvent une erreur puisque la valeur calcul??e n'est jamais utilis??e.</p>
<p>Notez que le compilateur javac de Sun g??n??re fr??quemment ce genre d'affectations ?? perte. FindBugs analysant le byte-code g??n??r??, il n'y a pas de fa??on simple d'??liminer ces fausses alarmes.</p>

  
<h3><a name="DLS_DEAD_LOCAL_STORE_IN_RETURN">DLS: Useless assignment in return statement (DLS_DEAD_LOCAL_STORE_IN_RETURN)</a></h3>

      
<p>
This statement assigns to a local variable in a return statement. This assignment
has effect. Please verify that this statement does the right thing.
</p>

    
<h3><a name="DLS_DEAD_LOCAL_STORE_OF_NULL">DLS: Alimentation ?? null d'une variable (DLS_DEAD_LOCAL_STORE_OF_NULL)</a></h3>


<p>Le code alimente une variable locale avec null, la valeur n'??tant jamais lue par la suite. Cette alimentation a pu ??tre introduite pour faciliter le travail du ramasse-miettes, mais cela n'a plus aucun int??r??t avec Java SE 6.</p>

  
<h3><a name="DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD">DLS: Dead store to local variable that shadows field (DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD)</a></h3>


<p>
This instruction assigns a value to a local variable,
but the value is not read or used in any subsequent instruction.
Often, this indicates an error, because the value computed is never
used. There is a field with the same name as the local variable. Did you
mean to assign to that variable instead?
</p>

    
<h3><a name="DMI_HARDCODED_ABSOLUTE_FILENAME">DMI: Chemin absolu cod?? en dur dans le code (DMI_HARDCODED_ABSOLUTE_FILENAME)</a></h3>


<p>Ce code construit un objet <code>File</code> en utilisant un chemin absolu de fichier cod?? en dur (Ex. : <code>new File("/home/dannyc/workspace/j2ee/src/share/com/sun/enterprise/deployment");)</code>.</p>

  
<h3><a name="DMI_NONSERIALIZABLE_OBJECT_WRITTEN">DMI: Objet non s??rialisable ??crit dans un ObjectOutput (DMI_NONSERIALIZABLE_OBJECT_WRITTEN)</a></h3>


<p>Ce code semble transmettre un objet non s??rialisable ?? la m??thode <code>ObjectOutput.writeObject</code>. Une erreur se produira si cet objet est effectivement non s??rialisable.</p>

  
<h3><a name="DMI_USELESS_SUBSTRING">DMI: Appel de substring(0) qui retourne la valeur originale (DMI_USELESS_SUBSTRING)</a></h3>


<p>Ce code appelle <code>substring(0)</code> sur une chaine, ce qui renvoit la valeur originale.</p>

  
<h3><a name="DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED">Dm: Thread passed where Runnable expected (DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED)</a></h3>


  <p> A Thread object is passed as a parameter to a method where
a Runnable is expected. This is rather unusual, and may indicate a logic error
or cause unexpected behavior.
   </p>

    
<h3><a name="EQ_DOESNT_OVERRIDE_EQUALS">Eq: Class doesn't override equals in superclass (EQ_DOESNT_OVERRIDE_EQUALS)</a></h3>


  <p> This class extends a class that defines an equals method and adds fields, but doesn't
define an equals method itself. Thus, equality on instances of this class will
ignore the identity of the subclass and the added fields. Be sure this is what is intended,
and that you don't need to override the equals method. Even if you don't need to override
the equals method, consider overriding it anyway to document the fact
that the equals method for the subclass just return the result of
invoking super.equals(o).
  </p>

    
<h3><a name="EQ_UNUSUAL">Eq: Unusual equals method  (EQ_UNUSUAL)</a></h3>


  <p> This class doesn't do any of the patterns we recognize for checking that the type of the argument
is compatible with the type of the <code>this</code> object. There might not be anything wrong with
this code, but it is worth reviewing.
</p>

    
<h3><a name="FE_FLOATING_POINT_EQUALITY">FE: Test d'??galit?? en virgule flottante. (FE_FLOATING_POINT_EQUALITY)</a></h3>


<p>Cette op??ration teste l'??galit?? de deux valeurs en virgule flottante. Les calculs en virgule flottante pouvant introduire des arrondis, les valeurs flottantes ou doubles peuvent ??tre impr??cises. Pour les valeurs qui doivent ??tre pr??cises, telles que les valeurs mon??taires, pensez ?? utiliser un type ?? pr??cision fixe tel qu'un <code>BigDecimal</code>. Pour les valeurs qui n'ont pas besoin d'??tre pr??cises, pensez ?? tester l'??galit?? sur une port??e quelconque, par exemple : <code>if ( Math.abs(x - y) &lt; .0000001 )</code>. Cf section 4.2.4 des sp??cifications du langage Java.</p>

  
<h3><a name="VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN">FS: Non-Boolean argument formatted using %b format specifier (VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN)</a></h3>


<p>
An argument not of type Boolean is being formatted with a %b format specifier. This won't throw an
exception; instead, it will print true for any non-null value, and false for null.
This feature of format strings is strange, and may not be what you intended.
</p>

     
<h3><a name="IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD">IA: Appel ambigu d'une m??thode h??rit?? ou externe (IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD)</a></h3>


<p>Une classe interne invoque une m??thode qui peut ??tre r??solue comme une m??thode h??rit??e ou comme une m??thode d??finie dans une classe externe. La s??mantique de Java fait qu'elle sera r??solue en invoquant la m??thode h??rit??e, mais ce n'est peut ??tre pas votre intention. Si vous souhaitez r??ellement invoquer la m??thode h??rit??e, faite le en utilisant <code>super</code> (Ex : appel?? <code>super.foo(17)</code>) ce qui clarifiera votre code pour les autres lecteurs et pour FindBugs.</p>

  
<h3><a name="IC_INIT_CIRCULARITY">IC: Initialisation circulaire (IC_INIT_CIRCULARITY)</a></h3>


<p>Une initialisation circulaire a ??t?? d??tect??e dans les initialisations de variables statiques de deux classes r??f??renc??es par l'instance en erreur. De nombreuses sortes de comportements inattendus peuvent surgir d'une telle situation.</p>

  
<h3><a name="ICAST_IDIV_CAST_TO_DOUBLE">ICAST: R??sultat d'une division enti??re transtyp?? en nombre flottant (ICAST_IDIV_CAST_TO_DOUBLE)</a></h3>


<p>Ce code transtype le r??sultat d'une division enti??re en un nombre flottant ?? double pr??cision. Effectuer une division sur des nombres entiers n'est pas pr??cis. Le fait que le r??sultat soit transtyp?? en <code>double</code> sugg??re que cette pr??cision ??tait voulue d??s le d??part. Peut ??tre l'un ou l'autre des op??randes, ou les deux op??randes, auraient du ??tre transtyp?? avant d'effectuer la division. Voici un exemple :</p>
<blockquote>
<pre>
int x = 2;
int y = 5;
// Faux: renvoi 0.0
double value1 =  x / y;

// Juste: renvoi 0.4
double value2 =  x / (double) y;
</pre>
</blockquote>

  
<h3><a name="ICAST_INTEGER_MULTIPLY_CAST_TO_LONG">ICAST: R??sultat d'une multiplication enti??re transtyp??e en long (ICAST_INTEGER_MULTIPLY_CAST_TO_LONG)</a></h3>


<p>Ce code effectue des multiplications enti??res et transtype le r??sultat en <code>long</code>, comme dans :
<code>long convertDaysToMilliseconds(int days) { return 1000*3600*24*days; }</code>. Si la multiplication ??tait r??alis??e en utilisant l'arithm??tique <code>long</code>, vous pourriez ??viter le risque de d??bordement de capacit?? du calcul. Vous pouvez par exemple corriger le code pr??c??dent par : <code>long convertDaysToMilliseconds(int days) { return 1000L*3600*24*days; }</code> ou <code><pre>
static final long MILLISECONDS_PER_DAY = 24L*3600*1000;
long convertDaysToMilliseconds(int days) { return days * MILLISECONDS_PER_DAY; } 
</pre></code></p>

  
<h3><a name="IM_AVERAGE_COMPUTATION_COULD_OVERFLOW">IM: Possibilit?? de d??bordement du calcul d'une moyenne (IM_AVERAGE_COMPUTATION_COULD_OVERFLOW)</a></h3>


<p>Le code calcule la moyenne de deux entiers au moyen d'une division ou d'un d??calage sign?? vers la droite, puis utilise le r??sultat comme indice d'un tableau. Si les valeurs moyenn??es sont tr??s grandes, le calcul peut d??border (r??sultant en un tr??s grand n??gatif). En supposant que le r??sultat doive toujours ??tre positif, vous devriez plut??t utiliser un d??calage ?? droite non sign??. En d'autres termes, utilisez plut??t  <code>(low+high) &gt;&gt;&gt; 1</code> au lieu de <code>(low+high)/2</code>.</p>
<p>Le bug existe dans de nombreuses impl??mentations des recherches binaires et des tris fusion. Martin Buchholz <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6412541"> l'a recherch?? et corrig?? </a> dans les librairies du JDK et Joshua Bloch <a href="http://googleresearch.blogspot.com/2006/06/extra-extra-read-all-about-it-nearly.html"> a largement publi?? ce mod??le de bug</a>.</p>

  
<h3><a name="IM_BAD_CHECK_FOR_ODD">IM: Test d'impaire ne fonctionnant pas avec les n??gatifs (IM_BAD_CHECK_FOR_ODD)</a></h3>


<p>Le code utilise <code>x % 2 == 1</code> pour v??ifier si une valeur est impaire, mais cela ne fonctionera pas avec une valeur n??gative (Ex. : <code>(-5) % 2 == -1</code>). Si ce code doit tester si une valeur est impaire, envisagez d'utiliser <code>x & 1 == 1</code> ou <code>x % 2 != 0</code>.</p>

  
<h3><a name="INT_BAD_REM_BY_1">INT: Reste entier modulo 1 (INT_BAD_REM_BY_1)</a></h3>


<p>Cette expression (Ex. : <code>exp % 1</code>) est assur??e de toujours renvoyer 0. Vouliez-vous plutot dire <code>(exp & 1)</code> ou <code>(exp % 2)</code> ?</p>

  
<h3><a name="INT_VACUOUS_BIT_OPERATION">INT: Vacuous bit mask operation on integer value (INT_VACUOUS_BIT_OPERATION)</a></h3>


<p> This is an integer bit operation (and, or, or exclusive or) that doesn't do any useful work
(e.g., <code>v & 0xffffffff</code>).

</p>

    
<h3><a name="INT_VACUOUS_COMPARISON">INT: Comparaison inutile de valeurs enti??res (INT_VACUOUS_COMPARISON)</a></h3>


<p>Il y a une comparaison enti??re qui renvoie toujours la m??me valeur (Ex. : <code>x <= Integer.MAX_VALUE</code>).</p>

  
<h3><a name="MTIA_SUSPECT_SERVLET_INSTANCE_FIELD">MTIA: La classe h??rite de Servlet et utilise les variables de l'instance. (MTIA_SUSPECT_SERVLET_INSTANCE_FIELD)</a></h3>


<p>Cette classe h??rite de la classe <code>Servlet</code>, et utilise une variable de l'instance. Puisqu'une seule instance d'une classe <code>Servlet</code> est cr????e par le cadre de travail J2EE, et est utilis??e dans un environnement multit??che, ce paradigme est tr??s fortement d??courag?? et tr??s certainement probl??matique. Consid??rer l'emploi seul de variables propres ?? la m??thode.</p>

  
<h3><a name="MTIA_SUSPECT_STRUTS_INSTANCE_FIELD">MTIA: La classe h??rite d'une classe action Struts et utilise les variables de l'instance. (MTIA_SUSPECT_STRUTS_INSTANCE_FIELD)</a></h3>


<p>Cette classe h??rite d'une classe <code>Action</code> Struts, et utilise une variable de cette instance. Puisqu'une seule instance de la classe <code>Action</code> Struts est cr????e par le cadre de travail Struts, et est utilis??e dans un environnement multit??che, ce paradigme est tr??s fortement d??courag?? et tr??s certainement probl??matique. Consid??rer l'emploi seul de variables propres ?? la m??thode.</p>

  
<h3><a name="NP_DEREFERENCE_OF_READLINE_VALUE">NP: Dereference of the result of readLine() without nullcheck (NP_DEREFERENCE_OF_READLINE_VALUE)</a></h3>


  <p> The result of invoking readLine() is dereferenced without checking to see if the result is null. If there are no more lines of text
to read, readLine() will return null and dereferencing that will generate a null pointer exception.
</p>

    
<h3><a name="NP_IMMEDIATE_DEREFERENCE_OF_READLINE">NP: D??r??f??rencement imm??diat du r??sultat d'un readLine() (NP_IMMEDIATE_DEREFERENCE_OF_READLINE)</a></h3>


<p>Le r??sultat d'un appel ?? <code>readLine()</code> est imm??diatement d??r??f??renc??. S'il n'y a plus d'autre lignes de texte ?? lire, <code>readLine()</code> retournera <code>null</code> ce qui provoquera une <code>NullPointerException</code> lors du d??r??f??rencement.</p>

  
<h3><a name="NP_LOAD_OF_KNOWN_NULL_VALUE">NP: Chargement d'une valeur connue pour ??tre ?? null (NP_LOAD_OF_KNOWN_NULL_VALUE)</a></h3>


<p>La variable r??f??renc??e est connue pour ??tre ?? <code>null</code> suite ?? une v??rification pr??c??dente. Bien que cela soit valide, ce peut ??tre une erreur (peut-??tre vouliez-vous r??f??rencer une autre valeur ou le test pr??c??dent aurait-il due v??rifier non-null plut??t que null).</p>

  
<h3><a name="NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION">NP: Method tightens nullness annotation on parameter (NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION)</a></h3>

        <p>
        A method should always implement the contract of a method it overrides. Thus, if a method takes a parameter
    that is marked as @Nullable, you shouldn't override that method in a subclass with a method where that parameter is @Nonnull.
    Doing so violates the contract that the method should handle a null parameter.
        </p>
      
<h3><a name="NP_METHOD_RETURN_RELAXING_ANNOTATION">NP: Method relaxes nullness annotation on return value (NP_METHOD_RETURN_RELAXING_ANNOTATION)</a></h3>

        <p>
        A method should always implement the contract of a method it overrides. Thus, if a method takes is annotated
    as returning a @Nonnull value,
    you shouldn't override that method in a subclass with a method annotated as returning a @Nullable or @CheckForNull value.
    Doing so violates the contract that the method shouldn't return null.
        </p>
      
<h3><a name="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE">NP: Pointeur ?? null renvoy?? par une m??thode qui risque d'??tre d??r??f??renc?? (NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE)</a></h3>


<p>La valeur renvoy??e par une m??thode est d??r??f??renc??e alors que cette m??thode peut renvoyer <code>null</code>. Ceci peut conduire ?? une <code>NullPointerException</code> quand le code sera ex??cut??.</p>

  
<h3><a name="NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE">NP: Possible null pointer dereference on branch that might be infeasible (NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE)</a></h3>


<p> There is a branch of statement that, <em>if executed,</em>  guarantees that
a null value will be dereferenced, which
would generate a <code>NullPointerException</code> when the code is executed.
Of course, the problem might be that the branch or statement is infeasible and that
the null pointer exception can't ever be executed; deciding that is beyond the ability of FindBugs.
Due to the fact that this value had been previously tested for nullness,
this is a definite possibility.
</p>

    
<h3><a name="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE">NP: Parameter must be non-null but is marked as nullable (NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE)</a></h3>


<p> This parameter is always used in a way that requires it to be non-null,
but the parameter is explicitly annotated as being Nullable. Either the use
of the parameter or the annotation is wrong.
</p>

    
<h3><a name="NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD">NP: Read of unwritten public or protected field (NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD)</a></h3>


  <p> The program is dereferencing a public or protected
field that does not seem to ever have a non-null value written to it.
Unless the field is initialized via some mechanism not seen by the analysis,
dereferencing this value will generate a null pointer exception.
</p>

    
<h3><a name="NS_DANGEROUS_NON_SHORT_CIRCUIT">NS: Potentially dangerous use of non-short-circuit logic (NS_DANGEROUS_NON_SHORT_CIRCUIT)</a></h3>


  <p> This code seems to be using non-short-circuit logic (e.g., &amp;
or |)
rather than short-circuit logic (&amp;&amp; or ||). In addition,
it seem possible that, depending on the value of the left hand side, you might not
want to evaluate the right hand side (because it would have side effects, could cause an exception
or could be expensive.</p>
<p>
Non-short-circuit logic causes both sides of the expression
to be evaluated even when the result can be inferred from
knowing the left-hand side. This can be less efficient and
can result in errors if the left-hand side guards cases
when evaluating the right-hand side can generate an error.
</p>

<p>See <a href="http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.22.2">the Java
Language Specification</a> for details

</p>

    
<h3><a name="NS_NON_SHORT_CIRCUIT">NS: Utilisation discutable de logique binaire (NS_NON_SHORT_CIRCUIT)</a></h3>


<p>Ce code semble utiliser de la logique binaire (Ex. : <code>&amp;</code> ou <code>|</code>) plut??t que les op??rateurs bool??ens (<code>&amp;&amp;</code> ou <code>||</code>). La logique binaire entra??ne l'??valuation syst??matique de toute l'expression, m??me quand le r??sultat pourrait ??tre imm??diatement d??duit. Ceci est moins performant et peut provoquer des erreurs lorsque la partie gauche de l'expression masque des cas de la partie droite.</p>

  
<h3><a name="PZLA_PREFER_ZERO_LENGTH_ARRAYS">PZLA: Envisagez de renvoyer un tableau vide plut??t que null (PZLA_PREFER_ZERO_LENGTH_ARRAYS)</a></h3>


<p>Renvoyer un tableau vide constitue souvent une meilleure approche plut??t que de renvoyer une r??f??rence ?? <code>null</code> pour signaler qu'il n'y a pas de r??sultat (c'est-??-dire, une liste vide de r??sultats). De cette fa??on, aucune v??rification explicite du <code>null</code> n'est n??cessaire dans les m??thodes clientes.</p>
<p>D'un autre c??t??, utiliser <code>null</code> signifie "il n'y a pas de r??ponse ?? cette question". Cela peut donc ??tre appropri??. Par exemple, <code>File.listFiles()</code> renvoi une liste vide si un r??pertoire donn?? ne contient pas de fichiers, et renvoi <code>null</code> si le fichier n'est pas un r??pertoire.</p>

  
<h3><a name="QF_QUESTIONABLE_FOR_LOOP">QF: Incr??mentation compliqu??e, subtile au incorrecte dans une boucle for (QF_QUESTIONABLE_FOR_LOOP)</a></h3>


<p>Etes vous certain que cette boucle incr??mente la variable voulue ? Il semblera??t qu'une autre variable est initialis??e et v??rifi??e par la boucle.</p>

  
<h3><a name="RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE">RCN: Comparaison redondante d'une valeur non nulle avec null (RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE)</a></h3>


<p>Cette m??thode contient une comparaison entre une r??f??rence connue pour ??tre non nulle avec une autre r??f??rence connue pour ??tre ?? <code>null</code>.</p>

  
<h3><a name="RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES">RCN: Comparaison redondante de deux valeurs nulles (RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES)</a></h3>


<p>Cette m??thode contient une comparaison redondante entre deux r??f??rences connues pour ??tre obligatoirement ?? <code>null</code>.</p>

  
<h3><a name="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE">RCN: Test de nullit?? redondant sur une valeur non nulle (RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE)</a></h3>


<p>Cette m??thode contient un test redondant de nullit?? sur une valeur connue pour ??tre non nulle.</p>

  
<h3><a name="RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE">RCN: Test de nullit?? redondant sur une valeur connue pour ??tre ?? null (RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE)</a></h3>


<p>Cette m??thode contient un test redondant de nullit?? sur une valeur ne pouvant qu'??tre ?? <code>null</code>.</p>

  
<h3><a name="REC_CATCH_EXCEPTION">REC: java.lang.Exception est intercept?? alors qu'Exception n'est jamais lanc?? (REC_CATCH_EXCEPTION)</a></h3>


<p>Cette m??thode utilise un block <code>try-catch</code> qui intercepte les objets <code>Exception</code>, mais <code>Exception</code> n'est jamais d??clench?? dans ce bloc, et <code>RuntimeException</code> n'est pas explicitement intercept??.  C'est une erreur commune de dire que <code>try / catch (Exception e)</code> est identique ?? plusieurs <code>try / catch</code>, mais cette tournure intercepte ??galement les <code>RuntimeException</code>, masquant des bugs potentiels.</p>

  
<h3><a name="RI_REDUNDANT_INTERFACES">RI: Classe impl??mentant la m??me interface que sa super-classe (RI_REDUNDANT_INTERFACES)</a></h3>


<p>Cette classe d??clare impl??menter une interface qui est aussi impl??ment??e par une de ses classes m??res. Ceci est redondant : d??s qu'une super-classe impl??mente une interface, toutes les sous-classes le font aussi par d??faut. Cela peut indiquer que la hi??rarchie d'h??ritage a chang?? depuis la cr??ation de cette classe et la cible de l'impl??mentation de l'interface doit peut-??tre ??tre reprise en consid??ration.</p>

  
<h3><a name="RV_CHECK_FOR_POSITIVE_INDEXOF">RV: M??thode v??rifiant que le r??sultat d'un String.indexOf() est positif (RV_CHECK_FOR_POSITIVE_INDEXOF)</a></h3>


<p>La m??thode appelle <code>String.indexOf()</code> et v??rifie si le r??sultat est strictement positif ou pas. Il est plus habituel de v??rifier si le r??sultat est n??gatif. Il n'est strictement positif que lorsque la sous-chaine recherch??e appara??t ailleurs qu'au d??but de la chaine.</p>

  
<h3><a name="RV_DONT_JUST_NULL_CHECK_READLINE">RV: M??thode ignorant le r??sultat d'un readLine() apr??s avoir v??rifi?? qu'il est non nul (RV_DONT_JUST_NULL_CHECK_READLINE)</a></h3>


<p>La valeur renvoy??e par <code>readLine()</code> est ignor??e apr??s avoir v??rifi?? s'il n'est pas ?? <code>null</code>. Dans quasiment tous les cas, si le r??sultat n'est pas ?? <code>null</code>, vous souhaiterez utiliser cette valeur. Appeler de nouveau <code>readLine()</code> vous renverra une ligne diff??rente.</p>

  
<h3><a name="RV_REM_OF_HASHCODE">RV: Reste d'un hashCode pouvant ??tre n??gatif (RV_REM_OF_HASHCODE)</a></h3>


<p>Ce code calcule le code de hachage, puis son reste modulo une certaine valeur. Puisque le code de hachage peut ??tre n??gatif, le reste peut ??galement l'??tre.</p>
<p>En supposant que vous vouliez garantir que le r??sultat de votre op??ration ne soit pas n??gatif, vous devriez modifier votre code. Si le diviseur est une puissance de 2, vous pourriez utiliser un d??calage binaire ?? la place (c'est-??-dire <code>x.hashCode()&amp;(n-1)</code> au lieu de <code>x.hashCode()%n</code>). Cela est probablement plus rapide que de calculer le reste. Si le diviseur n'est pas une puissance de 2, vous devriez prendre la valeur absolue du reste (<code>Math.abs(x.hashCode()%n)</code>).</p>

  
<h3><a name="RV_REM_OF_RANDOM_INT">RV: Reste d'un entier sign?? 32 bits al??eatoire (RV_REM_OF_RANDOM_INT)</a></h3>


<p>Ce code g??n??re un entier sign?? al??atoire puis calcule le reste de cette valeur modulo une autre valeur. Puisque ce nombre al??atoire peut ??tre n??gatif, le reste de l'op??ration peut ??galement l'??tre. Soyez s??r que c'est voulu, et envisagez d'utiliser ?? la place la m??thode <code>Random.nextInt(int)</code>.</p>

  
<h3><a name="RV_RETURN_VALUE_IGNORED_INFERRED">RV: Method ignores return value, is this OK? (RV_RETURN_VALUE_IGNORED_INFERRED)</a></h3>


<p>This code calls a method and ignores the return value. The return value
is the same type as the type the method is invoked on, and from our analysis it looks
like the return value might be important (e.g., like ignoring the
return value of <code>String.toLowerCase()</code>).
</p>
<p>We are guessing that ignoring the return value might be a bad idea just from
a simple analysis of the body of the method. You can use a @CheckReturnValue annotation
to instruct FindBugs as to whether ignoring the return value of this method
is important or acceptable.
</p>
<p>Please investigate this closely to decide whether it is OK to ignore the return value.
</p>

    
<h3><a name="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT">RV: Return value of method without side effect is ignored (RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT)</a></h3>


<p>This code calls a method and ignores the return value. However our analysis shows that
the method (including its implementations in subclasses if any) does not produce any effect 
other than return value. Thus this call can be removed.
</p>
<p>We are trying to reduce the false positives as much as possible, but in some cases this warning might be wrong.
Common false-positive cases include:</p>
<p>- The method is designed to be overridden and produce a side effect in other projects which are out of the scope of the analysis.</p>
<p>- The method is called to trigger the class loading which may have a side effect.</p>
<p>- The method is called just to get some exception.</p>
<p>If you feel that our assumption is incorrect, you can use a @CheckReturnValue annotation
to instruct FindBugs that ignoring the return value of this method is acceptable.
</p>

    
<h3><a name="SA_FIELD_DOUBLE_ASSIGNMENT">SA: Double assignment of field (SA_FIELD_DOUBLE_ASSIGNMENT)</a></h3>


<p> This method contains a double assignment of a field; e.g.
</p>
<pre>
  int x,y;
  public void foo() {
    x = x = 17;
  }
</pre>
<p>Assigning to a field twice is useless, and may indicate a logic error or typo.</p>

    
<h3><a name="SA_LOCAL_DOUBLE_ASSIGNMENT">SA: Double assignment of local variable  (SA_LOCAL_DOUBLE_ASSIGNMENT)</a></h3>


<p> This method contains a double assignment of a local variable; e.g.
</p>
<pre>
  public void foo() {
    int x,y;
    x = x = 17;
  }
</pre>
<p>Assigning the same value to a variable twice is useless, and may indicate a logic error or typo.</p>

    
<h3><a name="SA_LOCAL_SELF_ASSIGNMENT">SA: Auto-alimentation d'une variable locale (SA_LOCAL_SELF_ASSIGNMENT)</a></h3>


<p>Cette m??thode contient une auto-alimentation d'une variable locale, par exemple :</p>
<pre>
public vida foo() {
  int x = 3;
  x = x;
}
</pre>
<p>De telles affectations sont inutiles et peuvent indiquer une faute de frappe ou une erreur de logique.</p>

  
<h3><a name="SF_SWITCH_FALLTHROUGH">SF: Un switch comporte un cas qui d??borde sur le suivant (SF_SWITCH_FALLTHROUGH)</a></h3>


<p>Cette m??thode contient un <code>switch</code> dont l'un des cas d??borde sur le suivant. Normalement, vous devez terminer chaque cas avec une instruction <code>break</code> ou <code>return</code>.</p>

  
<h3><a name="SF_SWITCH_NO_DEFAULT">SF: Switch statement found where default case is missing (SF_SWITCH_NO_DEFAULT)</a></h3>


  <p> This method contains a switch statement where default case is missing.
  Usually you need to provide a default case.</p>
  <p>Because the analysis only looks at the generated bytecode, this warning can be incorrect triggered if
the default case is at the end of the switch statement and the switch statement doesn't contain break statements for other
cases.

    
<h3><a name="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD">ST: Ecriture d'un champ statique depuis la m??thode d'une instance (ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD)</a></h3>


<p>La m??thode de l'instance ??crit la valeur d'un champ statique. Cela peut ??tre difficile ?? g??rer si plusieurs instances ont la possibilit?? d'??crire cette valeur et cela ressemble surtout ?? une mauvaise pratique.</p>

  
<h3><a name="SE_PRIVATE_READ_RESOLVE_NOT_INHERITED">Se: Private readResolve method not inherited by subclasses (SE_PRIVATE_READ_RESOLVE_NOT_INHERITED)</a></h3>


  <p> This class defines a private readResolve method. Since it is private, it won't be inherited by subclasses.
This might be intentional and OK, but should be reviewed to ensure it is what is intended.
</p>

    
<h3><a name="SE_TRANSIENT_FIELD_OF_NONSERIALIZABLE_CLASS">Se: Transient field of class that isn't Serializable.  (SE_TRANSIENT_FIELD_OF_NONSERIALIZABLE_CLASS)</a></h3>


  <p> The field is marked as transient, but the class isn't Serializable, so marking it as transient
has absolutely no effect.
This may be leftover marking from a previous version of the code in which the class was transient, or
it may indicate a misunderstanding of how serialization works.
</p>

    
<h3><a name="TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_ALWAYS_SINK">TQ: Value required to have type qualifier, but marked as unknown (TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_ALWAYS_SINK)</a></h3>

      
      <p>
      A value is used in a way that requires it to be always be a value denoted by a type qualifier, but
    there is an explicit annotation stating that it is not known where the value is required to have that type qualifier.
    Either the usage or the annotation is incorrect.
      </p>
      
    
<h3><a name="TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_NEVER_SINK">TQ: Value required to not have type qualifier, but marked as unknown (TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_NEVER_SINK)</a></h3>

      
      <p>
      A value is used in a way that requires it to be never be a value denoted by a type qualifier, but
    there is an explicit annotation stating that it is not known where the value is prohibited from having that type qualifier.
    Either the usage or the annotation is incorrect.
      </p>
      
    
<h3><a name="UC_USELESS_CONDITION">UC: Condition has no effect (UC_USELESS_CONDITION)</a></h3>


<p>This condition always produces the same result as the value of the involved variable was narrowed before. 
Probably something else was meant or condition can be removed.</p>

    
<h3><a name="UC_USELESS_CONDITION_TYPE">UC: Condition has no effect due to the variable type (UC_USELESS_CONDITION_TYPE)</a></h3>


<p>This condition always produces the same result due to the type range of the involved variable. 
Probably something else was meant or condition can be removed.</p>

    
<h3><a name="UC_USELESS_OBJECT">UC: Useless object created (UC_USELESS_OBJECT)</a></h3>


<p>Our analysis shows that this object is useless. 
It's created and modified, but its value never go outside of the method or produce any side-effect.
Either there is a mistake and object was intended to be used or it can be removed.</p>
<p>This analysis rarely produces false-positives. Common false-positive cases include:</p>
<p>- This object used to implicitly throw some obscure exception.</p>
<p>- This object used as a stub to generalize the code.</p>
<p>- This object used to hold strong references to weak/soft-referenced objects.</p>

    
<h3><a name="UC_USELESS_OBJECT_STACK">UC: Useless object created on stack (UC_USELESS_OBJECT_STACK)</a></h3>


<p>This object is created just to perform some modifications which don't have any side-effect.
Probably something else was meant or the object can be removed.</p>

    
<h3><a name="UC_USELESS_VOID_METHOD">UC: Useless non-empty void method (UC_USELESS_VOID_METHOD)</a></h3>


<p>Our analysis shows that this non-empty void method does not actually perform any useful work.
Please check it: probably there's a mistake in its code or its body can be fully removed.
</p>
<p>We are trying to reduce the false positives as much as possible, but in some cases this warning might be wrong.
Common false-positive cases include:</p>
<p>- The method is intended to trigger loading of some class which may have a side effect.</p>
<p>- The method is intended to implicitly throw some obscure exception.</p>

    
<h3><a name="UCF_USELESS_CONTROL_FLOW">UCF: Instruction de contr??le du flux inutile (UCF_USELESS_CONTROL_FLOW)</a></h3>


<p>Cette m??thode contient une instruction de contr??le du flux inutile. Ceci est souvent provoqu?? par inadvertance, en utilisant un paragraphe vide comme corps d'une condition. Exemple :</p>
<pre>
if (argv.length == 1);
    System.out.println("Hello, " + argv[0]);
</pre>

  
<h3><a name="UCF_USELESS_CONTROL_FLOW_NEXT_LINE">UCF: Useless control flow to next line (UCF_USELESS_CONTROL_FLOW_NEXT_LINE)</a></h3>


<p> This method contains a useless control flow statement in which control
flow follows to the same or following line regardless of whether or not
the branch is taken.
Often, this is caused by inadvertently using an empty statement as the
body of an <code>if</code> statement, e.g.:</p>
<pre>
    if (argv.length == 1);
        System.out.println("Hello, " + argv[0]);
</pre>

    
<h3><a name="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD">UrF: Unread public/protected field (URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD)</a></h3>


  <p> This field is never read.&nbsp;
The field is public or protected, so perhaps
    it is intended to be used with classes not seen as part of the analysis. If not,
consider removing it from the class.</p>

    
<h3><a name="UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD">UuF: Unused public or protected field (UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD)</a></h3>


  <p> This field is never used.&nbsp;
The field is public or protected, so perhaps
    it is intended to be used with classes not seen as part of the analysis. If not,
consider removing it from the class.</p>

    
<h3><a name="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR">UwF: Champ non initialis?? dans le constructeur (UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR)</a></h3>


<p>Ce champ n'est jamais initialis?? dans aucun constructeur, et est de ce fait <code>null</code> une fois l'objet initialis??. Soit il s'agit d'une erreur, soit il s'agit d'un design douteux puisque ce champ g??n??ra une exception s'il est d??r??f??renc?? avant toute initialisation.</p>

  
<h3><a name="UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD">UwF: Unwritten public or protected field (UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD)</a></h3>


  <p> No writes were seen to this public/protected field.&nbsp; All reads of it will return the default
value. Check for errors (should it have been initialized?), or remove it if it is useless.</p>

    
<h3><a name="XFB_XML_FACTORY_BYPASS">XFB: M??thode instanciant directement une impl??mentation sp??cifique des interfaces XML (XFB_XML_FACTORY_BYPASS)</a></h3>


<p>Cette m??thode instancie une impl??mentation sp??cifique de l'interface XML. Il est pr??f??rable d'utiliser les classes 'Factory' fournies pour cr??er ces objets, ce qui permet de changer d'impl??mentation ?? l'ex??cution. Pour des d??tails, cf. :</p>
<p>
<ul>
 <li>javax.xml.parsers.DocumentBuilderFactory</li>
 <li>javax.xml.parsers.SAXParserFactory</li>
 <li>javax.xml.transform.TransformerFactory</li>
 <li>org.w3c.dom.Document.create<i>XXXX</i></li>
</ul>
</p>

  


<hr> <p> 
<script language="JavaScript" type="text/javascript"> 
<!---//hide script from old browsers 
document.write( "Last updated "+ document.lastModified + "." ); 
//end hiding contents ---> 
</script> 
<p> Send comments to <a class="sidebar" href="mailto:findbugs@cs.umd.edu">findbugs@cs.umd.edu</a> 
<p> 
<a href="http://sourceforge.net/projects/findbugs/"><img src="http://sourceforge.net/sflogo.php?group_id=96405&amp;type=5" width="210" height="62" border="0" alt="FindBugs on SourceForge.net" /></a>
</td></tr></table>
</body></html>