Le document suivant contient les résultats de PMD 5.3.5.
| Violation | Ligne |
|---|---|
| Private field '_strName' could be made final; it is only initialized in the declaration or constructor. | 51 |
| Consider replacing this Hashtable with the newer java.util.Map | 58 |
| Avoid using implementation types like 'Hashtable'; use the interface instead | 58 |
| Avoid using implementation types like 'Hashtable'; use the interface instead | 58 |
| Private field '_htUsers' could be made final; it is only initialized in the declaration or constructor. | 58 |
| Avoid using implementation types like 'Hashtable'; use the interface instead | 59 |
| Private field '_htBannedUsers' could be made final; it is only initialized in the declaration or constructor. | 59 |
| Avoid using implementation types like 'Hashtable'; use the interface instead | 59 |
| Consider replacing this Hashtable with the newer java.util.Map | 59 |
| Consider replacing this Vector with the newer java.util.List | 60 |
| Use ArrayList instead of Vector | 60 |
| Avoid using implementation types like 'Vector'; use the interface instead | 60 |
| Avoid using implementation types like 'Vector'; use the interface instead | 60 |
| Private field '_vRoomEntries' could be made final; it is only initialized in the declaration or constructor. | 60 |
| Use block level rather than method level synchronization | 80–83 |
| Use block level rather than method level synchronization | 92–114 |
| Avoid variables with short names like e | 101 |
| Avoid variables with short names like u | 105 |
| Use block level rather than method level synchronization | 123–138 |
| Consider replacing this Vector with the newer java.util.List | 234 |
| Avoid using implementation types like 'Vector'; use the interface instead | 234 |
| Avoid using implementation types like 'Vector'; use the interface instead | 234 |
| Violation | Ligne |
|---|---|
| Consider replacing this Vector with the newer java.util.List | 56 |
| Use ArrayList instead of Vector | 56 |
| Avoid using implementation types like 'Vector'; use the interface instead | 56 |
| Private field '_vChatEntries' could be made final; it is only initialized in the declaration or constructor. | 56 |
| Avoid using implementation types like 'Vector'; use the interface instead | 56 |
| Private field '_nMaxMessages' could be made final; it is only initialized in the declaration or constructor. | 57 |
| Private field '_dateJoin' could be made final; it is only initialized in the declaration or constructor. | 59 |
| Avoid using implementation types like 'ArrayList'; use the interface instead | 69 |
| Private field '_listSentData' could be made final; it is only initialized in the declaration or constructor. | 69 |
| Avoid using implementation types like 'ArrayList'; use the interface instead | 69 |
| Use block level rather than method level synchronization | 179–187 |
| Assigning an Object to null is a code smell. Consider refactoring. | 227 |
| Avoid variables with short names like sd | 319 |
| Avoid variables with short names like i | 332 |
| Avoid variables with short names like sd | 337 |
| Use explicit scoping instead of the default package private level | 353 |
| Use explicit scoping instead of the default package private level | 354 |
| Violation | Ligne |
|---|---|
| Consider replacing this Hashtable with the newer java.util.Map | 45 |
| Avoid using implementation types like 'Hashtable'; use the interface instead | 45 |
| Private field '_chatRooms' could be made final; it is only initialized in the declaration or constructor. | 45 |
| Avoid using implementation types like 'Hashtable'; use the interface instead | 45 |
| Consider using varargs for methods or constructors which take an array the last parameter. | 83 |
| Violation | Ligne |
|---|---|
| Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 49 |
| Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 50 |
| Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 51 |
| Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 52 |
| Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 53 |
| Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 54 |
| Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 55 |
| Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 56 |
| Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 57 |
| Violation | Ligne |
|---|---|
| Document empty constructor | 47–49 |
| Avoid unnecessary constructors - the compiler will generate these for you | 47–49 |
| It is a good practice to call super() in a constructor | 47–49 |
| Violation | Ligne |
|---|---|
| Possible God class (WMC=97, ATFD=156, TCC=0.019704433497536946) | 34–1005 |
| The class 'ChatService' has a Modified Cyclomatic Complexity of 3 (Highest = 15). | 65–882 |
| The class 'ChatService' has a Standard Cyclomatic Complexity of 3 (Highest = 15). | 65–882 |
| The class 'ChatService' has a Cyclomatic Complexity of 3 (Highest = 15). | 65–882 |
| Private field '_timer' could be made final; it is only initialized in the declaration or constructor. | 132 |
| Use block level rather than method level synchronization | 154–208 |
| Avoid variables with short names like i | 272 |
| The String literal "chat.room" appears 7 times in this file; the first occurrence is on line 276 | 276 |
| Avoid variables with short names like e | 319 |
| Avoid variables with short names like e | 341 |
| Avoid variables with short names like u | 352 |
| Avoid variables with short names like me | 371 |
| Use equals() to compare object references. | 373 |
| Avoid variables with short names like e | 384 |
| The method 'parseCommand' has a Modified Cyclomatic Complexity of 15. | 472–554 |
| The method 'parseCommand' has a Standard Cyclomatic Complexity of 15. | 472–554 |
| The method 'parseCommand' has a Cyclomatic Complexity of 15. | 472–554 |
| When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 566 |
| A switch statement does not contain a break | 569–606 |
| Position literals first in String comparisons | 617 |
| Position literals first in String comparisons | 622 |
| Position literals first in String comparisons | 627 |
| Position literals first in String comparisons | 627 |
| Position literals first in String comparisons | 632 |
| Position literals first in String comparisons | 637 |
| Avoid variables with short names like e | 782 |
| StringBuffer constructor is initialized with size 16, but has at least 18 characters appended. | 783 |
| StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 784 |
| Avoid appending characters as strings in StringBuffer.append. | 797 |
| Rather than using a lot of String arguments, consider using a container object for those values. | 835 |
| Position literals first in String comparisons | 840 |
| Prefer StringBuffer over += for concatenating strings | 842 |
| Position literals first in String comparisons | 875 |
| Prefer StringBuffer over += for concatenating strings | 877 |
| This call to String.startsWith can be rewritten using String.charAt(0) | 917 |
| String.indexOf(char) is faster than String.indexOf(String). | 924 |
| String.indexOf(char) is faster than String.indexOf(String). | 930 |
| When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 944 |
| Use explicit scoping instead of the default package private level | 951–954 |
| Use explicit scoping instead of the default package private level | 961–964 |
| Use explicit scoping instead of the default package private level | 971–974 |
| Use explicit scoping instead of the default package private level | 981–984 |
| Use explicit scoping instead of the default package private level | 991–994 |
| Use explicit scoping instead of the default package private level | 1001–1004 |
| Violation | Ligne |
|---|---|
| Avoid unused imports such as 'fr.paris.lutece.portal.service.security.UserNotSignedException' | 42 |
| Avoid unused imports such as 'fr.paris.lutece.portal.service.security.UserNotSignedException' | 42 |
| Avoid unnecessary constructors - the compiler will generate these for you | 80–82 |
| Document empty constructor | 80–82 |
| Avoid variables with short names like t | 179 |
| Violation | Ligne |
|---|---|
| The class 'ChatJspBean' has a Cyclomatic Complexity of 6 (Highest = 14). | 52–257 |
| The class 'ChatJspBean' has a Standard Cyclomatic Complexity of 6 (Highest = 14). | 52–257 |
| The class 'ChatJspBean' has a Modified Cyclomatic Complexity of 5 (Highest = 13). | 52–257 |
| Avoid unused private fields such as 'CONTENT_TYPE'. | 61 |
| System.out.println is used | 73 |
| StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 141 |
| StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 142 |
| The method 'getUserData' has a Modified Cyclomatic Complexity of 13. | 153–256 |
| The method getUserData() has an NPath complexity of 1064 | 153–256 |
| The method 'getUserData' has a Cyclomatic Complexity of 14. | 153–256 |
| The method 'getUserData' has a Standard Cyclomatic Complexity of 14. | 153–256 |
| Avoid really long methods. | 153–256 |
| Avoid declaring a variable if it is unreferenced before a possible exit point. | 155 |
| Avoid variables with short names like u | 217 |
| Avoid appending characters as strings in StringBuffer.append. | 222 |
| Avoid appending characters as strings in StringBuffer.append. | 226 |
| Avoid appending characters as strings in StringBuffer.append. | 233 |
| Violation | Ligne |
|---|---|
| The class 'ChatServlet' has a Standard Cyclomatic Complexity of 4 (Highest = 14). | 60–298 |
| The class 'ChatServlet' has a Cyclomatic Complexity of 4 (Highest = 14). | 60–298 |
| The class 'ChatServlet' has a Modified Cyclomatic Complexity of 3 (Highest = 13). | 60–298 |
| Overriding method merely calls super | 83–86 |
| Document empty method | 160–161 |
| Use explicit scoping instead of the default package private level | 168–171 |
| Use explicit scoping instead of the default package private level | 179–187 |
| StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 182 |
| StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 183 |
| The method 'getUserData' has a Standard Cyclomatic Complexity of 14. | 194–297 |
| The method 'getUserData' has a Modified Cyclomatic Complexity of 13. | 194–297 |
| Use explicit scoping instead of the default package private level | 194–297 |
| Avoid really long methods. | 194–297 |
| The method 'getUserData' has a Cyclomatic Complexity of 14. | 194–297 |
| The method getUserData() has an NPath complexity of 1064 | 194–297 |
| Avoid declaring a variable if it is unreferenced before a possible exit point. | 196 |
| Avoid variables with short names like u | 258 |
| Avoid appending characters as strings in StringBuffer.append. | 263 |
| Avoid appending characters as strings in StringBuffer.append. | 267 |
| Avoid appending characters as strings in StringBuffer.append. | 274 |