Index: doc/bugDescriptions_fr.html |
diff --git a/doc/bugDescriptions_fr.html b/doc/bugDescriptions_fr.html |
index 356331db6619cd42850d946ff37fe3215c663bb0..40532ebc173e79e10fc4f1b3d39493229fd89cdf 100644 |
--- a/doc/bugDescriptions_fr.html |
+++ b/doc/bugDescriptions_fr.html |
@@ -1,5 +1,6 @@ |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
-<html><head><title>FindBugs Bug Descriptions</title> |
+<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> |
@@ -39,7 +40,7 @@ |
<tr><td> </td></tr> |
<tr><td><b>Development</b></td></tr> |
-<tr><td><font size="-1"> <a class="sidebar" href="http://sourceforge.net/tracker/?group_id=96405">Open bugs</a></font></td></tr> |
+<tr><td><font size="-1"> <a class="sidebar" href="http://sourceforge.net/p/findbugs/bugs/">Open bugs</a></font></td></tr> |
<tr><td><font size="-1"> <a class="sidebar" href="reportingBugs.html">Reporting bugs</a></font></td></tr> |
<tr><td><font size="-1"> <a class="sidebar" href="contributing.html">Contributing</a></font></td></tr> |
<tr><td><font size="-1"> <a class="sidebar" href="team.html">Dev team</a></font></td></tr> |
@@ -53,7 +54,7 @@ |
<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.0.</p> |
+<a href="http://findbugs.sourceforge.net">FindBugs</a> version 3.0.1.</p> |
<h2>Summary</h2> |
<table width="100%"> |
<tr bgcolor="#b9b9fe"><th>Description</th><th>Category</th></tr> |
@@ -64,6 +65,8 @@ |
<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> |
@@ -99,6 +102,8 @@ |
<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> |
@@ -152,25 +157,25 @@ |
<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="#ICAST_BAD_SHIFT_AMOUNT">BSHIFT: Décalage d'un int hors de proportion (0..31)</a></td><td>Correctness</td></tr> |
-<tr bgcolor="#eeeeee"><td><a href="#BX_UNBOXED_AND_COERCED_FOR_TERNARY_OPERATOR">Bx: Primitive value is unboxed and coerced for ternary operator</a></td><td>Correctness</td></tr> |
-<tr bgcolor="#ffffff"><td><a href="#CO_COMPARETO_RESULTS_MIN_VALUE">Co: compareTo()/compare() returns Integer.MIN_VALUE</a></td><td>Correctness</td></tr> |
-<tr bgcolor="#eeeeee"><td><a href="#DLS_DEAD_LOCAL_INCREMENT_IN_RETURN">DLS: Useless increment in return statement</a></td><td>Correctness</td></tr> |
-<tr bgcolor="#ffffff"><td><a href="#DLS_DEAD_STORE_OF_CLASS_LITERAL">DLS: Dead store of class literal</a></td><td>Correctness</td></tr> |
-<tr bgcolor="#eeeeee"><td><a href="#DLS_OVERWRITTEN_INCREMENT">DLS: Incrémentation annulée</a></td><td>Correctness</td></tr> |
-<tr bgcolor="#ffffff"><td><a href="#DMI_ARGUMENTS_WRONG_ORDER">DMI: Reversed method arguments</a></td><td>Correctness</td></tr> |
-<tr bgcolor="#eeeeee"><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="#ffffff"><td><a href="#DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE">DMI: BigDecimal constructed from double that isn't represented precisely</a></td><td>Correctness</td></tr> |
-<tr bgcolor="#eeeeee"><td><a href="#DMI_CALLING_NEXT_FROM_HASNEXT">DMI: Méthode hasNext() appelant next()</a></td><td>Correctness</td></tr> |
-<tr bgcolor="#ffffff"><td><a href="#DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES">DMI: Collections should not contain themselves</a></td><td>Correctness</td></tr> |
-<tr bgcolor="#eeeeee"><td><a href="#DMI_DOH">DMI: D'oh! A nonsensical method invocation</a></td><td>Correctness</td></tr> |
-<tr bgcolor="#ffffff"><td><a href="#DMI_INVOKING_HASHCODE_ON_ARRAY">DMI: Invocation of hashCode on an array</a></td><td>Correctness</td></tr> |
-<tr bgcolor="#eeeeee"><td><a href="#DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT">DMI: Double.longBitsToDouble invoked on an int</a></td><td>Correctness</td></tr> |
-<tr bgcolor="#ffffff"><td><a href="#DMI_VACUOUS_SELF_COLLECTION_CALL">DMI: Vacuous call to collections</a></td><td>Correctness</td></tr> |
-<tr bgcolor="#eeeeee"><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="#ffffff"><td><a href="#DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR">Dm: Futile attempt to change max pool size of ScheduledThreadPoolExecutor</a></td><td>Correctness</td></tr> |
-<tr bgcolor="#eeeeee"><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="#ffffff"><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="#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> |
@@ -212,7 +217,7 @@ |
<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</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> |
@@ -224,7 +229,7 @@ |
<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: Nonnull field is not initialized</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> |
@@ -243,6 +248,10 @@ |
<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> |
@@ -301,6 +310,8 @@ |
<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> |
@@ -308,69 +319,69 @@ |
<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="#DL_SYNCHRONIZATION_ON_BOOLEAN">DL: Synchronization on Boolean</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#eeeeee"><td><a href="#DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE">DL: Synchronization on boxed primitive</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#ffffff"><td><a href="#DL_SYNCHRONIZATION_ON_SHARED_CONSTANT">DL: Synchronization on interned String </a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#eeeeee"><td><a href="#DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE">DL: Synchronization on boxed primitive values</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#ffffff"><td><a href="#DM_MONITOR_WAIT_ON_CONDITION">Dm: Wait() appelé sur une Condition</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#eeeeee"><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="#ffffff"><td><a href="#ESync_EMPTY_SYNC">ESync: Bloc synchronisé vide</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#eeeeee"><td><a href="#IS2_INCONSISTENT_SYNC">IS: Synchronisation incohérente</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#ffffff"><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="#eeeeee"><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="#ffffff"><td><a href="#JLM_JSR166_UTILCONCURRENT_MONITORENTER">JLM: Synchronization performed on util.concurrent instance</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#eeeeee"><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="#ffffff"><td><a href="#LI_LAZY_INIT_STATIC">LI: Initialisation paresseuse incorrecte d'un champ statique</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#eeeeee"><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="#ffffff"><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="#eeeeee"><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="#ffffff"><td><a href="#MSF_MUTABLE_SERVLET_FIELD">MSF: Mutable servlet field</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#eeeeee"><td><a href="#MWN_MISMATCHED_NOTIFY">MWN: notify() non appareillé</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#ffffff"><td><a href="#MWN_MISMATCHED_WAIT">MWN: wait() non appareillé</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#eeeeee"><td><a href="#NN_NAKED_NOTIFY">NN: Appel notify() isolé dans une méthode</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#ffffff"><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="#eeeeee"><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="#ffffff"><td><a href="#RS_READOBJECT_SYNC">RS: Seule la méthode readObject() est synchronisée</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#eeeeee"><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="#ffffff"><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="#eeeeee"><td><a href="#SC_START_IN_CTOR">SC: Un constructeur invoque Thread.start()</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#ffffff"><td><a href="#SP_SPIN_ON_FIELD">SP: Méthode bouclant sur un champ</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#eeeeee"><td><a href="#STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE">STCAL: Call to static Calendar</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#ffffff"><td><a href="#STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE">STCAL: Call to static DateFormat</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#eeeeee"><td><a href="#STCAL_STATIC_CALENDAR_INSTANCE">STCAL: Static Calendar field</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#ffffff"><td><a href="#STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE">STCAL: Static DateFormat</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#eeeeee"><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="#ffffff"><td><a href="#TLW_TWO_LOCK_WAIT">TLW: wait() avec deux verrous en attente</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#eeeeee"><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="#ffffff"><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="#eeeeee"><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="#ffffff"><td><a href="#UW_UNCOND_WAIT">UW: Méthode contenant un wait() non conditionné</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#eeeeee"><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="#ffffff"><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="#eeeeee"><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="#ffffff"><td><a href="#WS_WRITEOBJECT_SYNC">WS: Seule la méthode writeObject() est synchronisée</a></td><td>Multithreaded correctness</td></tr> |
-<tr bgcolor="#eeeeee"><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="#ffffff"><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="#eeeeee"><td><a href="#BX_BOXING_IMMEDIATELY_UNBOXED">Bx: Primitive value is boxed and then immediately unboxed</a></td><td>Performance</td></tr> |
-<tr bgcolor="#ffffff"><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="#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_PARSING">Bx: Boxing/unboxing to parse a primitive</a></td><td>Performance</td></tr> |
-<tr bgcolor="#eeeeee"><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="#ffffff"><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="#eeeeee"><td><a href="#DM_NUMBER_CTOR">Bx: Method invokes inefficient Number constructor; use static valueOf instead</a></td><td>Performance</td></tr> |
-<tr bgcolor="#ffffff"><td><a href="#DMI_BLOCKING_METHODS_ON_URL">Dm: The equals and hashCode methods of URL are blocking</a></td><td>Performance</td></tr> |
-<tr bgcolor="#eeeeee"><td><a href="#DMI_COLLECTION_OF_URLS">Dm: Maps and sets of URLs can be performance hogs</a></td><td>Performance</td></tr> |
-<tr bgcolor="#ffffff"><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="#eeeeee"><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="#ffffff"><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="#eeeeee"><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="#ffffff"><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="#eeeeee"><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="#ffffff"><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="#eeeeee"><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="#ffffff"><td><a href="#IIO_INEFFICIENT_INDEX_OF">IIO: Inefficient use of String.indexOf(String)</a></td><td>Performance</td></tr> |
-<tr bgcolor="#eeeeee"><td><a href="#IIO_INEFFICIENT_LAST_INDEX_OF">IIO: Inefficient use of String.lastIndexOf(String)</a></td><td>Performance</td></tr> |
-<tr bgcolor="#ffffff"><td><a href="#ITA_INEFFICIENT_TO_ARRAY">ITA: La méthode utilise toArray() avec un tableau vide en paramètre</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> |
@@ -431,7 +442,7 @@ |
<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 nonnull but is marked as nullable</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> |
@@ -448,16 +459,22 @@ |
<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="#SA_FIELD_DOUBLE_ASSIGNMENT">SA: Double assignment of field</a></td><td>Dodgy code</td></tr> |
-<tr bgcolor="#eeeeee"><td><a href="#SA_LOCAL_DOUBLE_ASSIGNMENT">SA: Double assignment of local variable </a></td><td>Dodgy code</td></tr> |
-<tr bgcolor="#ffffff"><td><a href="#SA_LOCAL_SELF_ASSIGNMENT">SA: Auto-alimentation d'une variable locale</a></td><td>Dodgy code</td></tr> |
-<tr bgcolor="#eeeeee"><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="#ffffff"><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="#eeeeee"><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="#ffffff"><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="#eeeeee"><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="#ffffff"><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="#eeeeee"><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="#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> |
@@ -527,6 +544,26 @@ can clone themselves), but just make sure that this is what you intended. |
<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 > val2 ? 1 : val1 < 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> |
@@ -649,7 +686,7 @@ is symmetric and transitive. Without those properties, very unexpected behavoirs |
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. |
+ while in Java 6 it uses the equals method.</p> |
<p>From the JavaDoc for the compareTo method in the Comparable interface: |
<blockquote> |
@@ -657,7 +694,7 @@ It is strongly recommended, but not strictly required that <code>(x.compareTo(y) |
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> |
+</blockquote></p> |
<h3><a name="EQ_GETCLASS_AND_CLASS_CONSTANT">Eq: equals method fails for subtypes (EQ_GETCLASS_AND_CLASS_CONSTANT)</a></h3> |
@@ -692,7 +729,7 @@ It is better to check if <code>this.getClass() == o.getClass()</code>. |
<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. |
+ 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> |
@@ -700,7 +737,7 @@ It is better to check if <code>this.getClass() == o.getClass()</code>. |
<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. |
+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> |
@@ -831,6 +868,22 @@ public class CircularClassInitialization { |
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> |
@@ -922,7 +975,7 @@ will need to be changed in order to compile it in later versions of Java.</p> |
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 accidently define methods that do not override methods in their superclasses. |
+opportunities to accidentally define methods that do not override methods in their superclasses. |
</p> |
@@ -933,7 +986,7 @@ opportunities to accidently define methods that do not override methods in their |
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 accidently define methods that do not override methods in their superclasses. |
+opportunities to accidentally define methods that do not override methods in their superclasses. |
</p> |
@@ -1312,36 +1365,22 @@ to use '!= 0' instead of '> 0'. |
<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="ICAST_BAD_SHIFT_AMOUNT">BSHIFT: Décalage d'un int hors de proportion (0..31) (ICAST_BAD_SHIFT_AMOUNT)</a></h3> |
+<h3><a name="BSHIFT_WRONG_ADD_PRIORITY">BSHIFT: Possible bad parsing of shift operation (BSHIFT_WRONG_ADD_PRIORITY)</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="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> |
+The code performs an operation like (x << 8 + y). Although this might be correct, probably it was meant |
+to perform (x << 8) + y, but shift operation has |
+a lower precedence, so it's actually parsed as x << (8 + y). |
</p> |
-<h3><a name="CO_COMPARETO_RESULTS_MIN_VALUE">Co: compareTo()/compare() returns Integer.MIN_VALUE (CO_COMPARETO_RESULTS_MIN_VALUE)</a></h3> |
+<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> 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. |
+<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> |
@@ -1488,6 +1527,14 @@ A ScheduledThreadPoolExecutor with zero core threads will never execute anything |
+<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> |
@@ -1771,7 +1818,7 @@ 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 epoc into a Date, is badly |
+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); } |
@@ -1881,10 +1928,10 @@ 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 (INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE)</a></h3> |
+<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. |
+<p> This code compares a value that is guaranteed to be non-negative with a negative constant or zero. |
</p> |
@@ -1979,10 +2026,10 @@ something that should be closed. |
</p> |
-<h3><a name="NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR">NP: Nonnull field is not initialized (NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR)</a></h3> |
+<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 nonnull, but isn't written to by the constructor. |
+ <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> |
@@ -2046,7 +2093,8 @@ an indication of some misunderstanding or some other logic error. |
<p> |
- The usage of Optional return type always mean that explicit null returns were not desired by design. |
+ 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> |
@@ -2127,6 +2175,30 @@ types are <code>Foo</code>'s from different packages. |
<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> |
@@ -2783,6 +2855,25 @@ after the call to initLogging, the logger configuration is lost |
<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> |
@@ -2834,6 +2925,17 @@ to the field, so doing so will require some refactoring. |
<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> |
@@ -3302,6 +3404,19 @@ to immediately undo the work of the boxing. |
(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> |
@@ -3309,6 +3424,14 @@ to immediately undo the work of the boxing. |
</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> |
@@ -3442,28 +3565,6 @@ that classfile. See <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id= |
</p> |
-<h3><a name="IIO_INEFFICIENT_INDEX_OF">IIO: Inefficient use of String.indexOf(String) (IIO_INEFFICIENT_INDEX_OF)</a></h3> |
- |
- |
-<p> This code passes a constant string of length 1 to String.indexOf(). |
-It is more efficient to use the integer implementations of String.indexOf(). |
-f. e. call <code>myString.indexOf('.')</code> instead of <code>myString.indexOf(".")</code></p> |
- |
- |
-<h3><a name="IIO_INEFFICIENT_LAST_INDEX_OF">IIO: Inefficient use of String.lastIndexOf(String) (IIO_INEFFICIENT_LAST_INDEX_OF)</a></h3> |
- |
- |
-<p> This code passes a constant string of length 1 to String.lastIndexOf(). |
-It is more efficient to use the integer implementations of String.lastIndexOf(). |
-f. e. call <code>myString.lastIndexOf('.')</code> instead of <code>myString.lastIndexOf(".")</code></p> |
- |
- |
-<h3><a name="ITA_INEFFICIENT_TO_ARRAY">ITA: La méthode utilise toArray() avec un tableau vide en paramètre (ITA_INEFFICIENT_TO_ARRAY)</a></h3> |
- |
- |
-<p>Cette méthode utilise la méthode <code>toArray()</code> d'une classe dérivant de <code>Collection</code>, en lui passant en paramètre un tableau vide. Il est plus efficace d'utiliser <code>myCollection.toArray(new Foo[myCollection.size()])</code>. Si le tableau transmis est assez grand pour stocker tous les éléments de la collection, alors il est alimenté et renvoyé directement. Ceci évite la nécessité de créer un nouveau tableau (par réflexion) pour renvoyer le résultat.</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> |
@@ -3849,7 +3950,7 @@ this code, but it is worth reviewing. |
<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 nonnull value, and false for null. |
+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> |
@@ -3995,10 +4096,10 @@ this is a definite possibility. |
</p> |
-<h3><a name="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE">NP: Parameter must be nonnull but is marked as nullable (NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE)</a></h3> |
+<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 nonnull, |
+<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> |
@@ -4134,6 +4235,23 @@ is important or acceptable. |
</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> |
@@ -4187,7 +4305,8 @@ public vida foo() { |
<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 doesn't end with a break statement. |
+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> |
@@ -4234,6 +4353,51 @@ it may indicate a misunderstanding of how serialization works. |
</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> |
@@ -4313,6 +4477,6 @@ document.write( "Last updated "+ document.lastModified + "." ); |
</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"><IMG src="http://sourceforge.net/sflogo.php?group_id=96405&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A> |
+<a href="http://sourceforge.net/projects/findbugs/"><img src="http://sourceforge.net/sflogo.php?group_id=96405&type=5" width="210" height="62" border="0" alt="FindBugs on SourceForge.net" /></a> |
</td></tr></table> |
</body></html> |