Le document suivant contient les résultats de PMD 6.13.0.
Rule | Violation | Ligne |
---|---|---|
FormalParameterNamingConventions | The method parameter name '_type' doesn't match '[a-z][a-zA-Z0-9]*' | 71 |
FormalParameterNamingConventions | The method parameter name '_id' doesn't match '[a-z][a-zA-Z0-9]*' | 71 |
FormalParameterNamingConventions | The method parameter name '_name' doesn't match '[a-z][a-zA-Z0-9]*' | 71 |
FormalParameterNamingConventions | The method parameter name '_name' doesn't match '[a-z][a-zA-Z0-9]*' | 94 |
FormalParameterNamingConventions | The method parameter name '_id' doesn't match '[a-z][a-zA-Z0-9]*' | 114 |
FormalParameterNamingConventions | The method parameter name '_description' doesn't match '[a-z][a-zA-Z0-9]*' | 134 |
FormalParameterNamingConventions | The method parameter name '_type' doesn't match '[a-z][a-zA-Z0-9]*' | 154 |
FormalParameterNamingConventions | The method parameter name '_data' doesn't match '[a-z][a-zA-Z0-9]*' | 174 |
FormalParameterNamingConventions | The method parameter name '_active' doesn't match '[a-z][a-zA-Z0-9]*' | 194 |
Rule | Violation | Ligne |
---|---|---|
FormalParameterNamingConventions | The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' | 114 |
Rule | Violation | Ligne |
---|---|---|
FormalParameterNamingConventions | The method parameter name '_description' doesn't match '[a-z][a-zA-Z0-9]*' | 228 |
Rule | Violation | Ligne |
---|---|---|
FormalParameterNamingConventions | The method parameter name '_nGroupId' doesn't match '[a-z][a-zA-Z0-9]*' | 189 |
Rule | Violation | Ligne |
---|---|---|
AvoidThrowingRawExceptionTypes | Avoid throwing raw exception types. | 149 |
AvoidThrowingRawExceptionTypes | Avoid throwing raw exception types. | 173 |
AvoidThrowingRawExceptionTypes | Avoid throwing raw exception types. | 268 |
AvoidThrowingRawExceptionTypes | Avoid throwing raw exception types. | 322 |
AvoidThrowingRawExceptionTypes | Avoid throwing raw exception types. | 405 |
Rule | Violation | Ligne |
---|---|---|
ClassNamingConventions | The utility class name 'DolistConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 36–43 |
FieldNamingConventions | The static field name 'TYPE_SUBSCRIPTION' doesn't match '_[a-z][a-zA-Z0-9]*' | 38 |
FieldNamingConventions | The static field name 'TYPE_INTEREST' doesn't match '_[a-z][a-zA-Z0-9]*' | 39 |
FieldNamingConventions | The static field name 'NO_GROUP_NAME' doesn't match '_[a-z][a-zA-Z0-9]*' | 41 |
Rule | Violation | Ligne |
---|---|---|
ClassWithOnlyPrivateConstructorsShouldBeFinal | A class which only has private constructors should be final | 57–462 |
Rule | Violation | Ligne |
---|---|---|
ClassWithOnlyPrivateConstructorsShouldBeFinal | A class which only has private constructors should be final | 47–107 |
Rule | Violation | Ligne |
---|---|---|
ClassWithOnlyPrivateConstructorsShouldBeFinal | A class which only has private constructors should be final | 48–187 |
Rule | Violation | Ligne |
---|---|---|
ClassNamingConventions | The utility class name 'Constants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 36–43 |
FieldNamingConventions | The static field name 'TYPE_ALERT' doesn't match '_[a-z][a-zA-Z0-9]*' | 38 |
FieldNamingConventions | The static field name 'TYPE_NEWSLETTER' doesn't match '_[a-z][a-zA-Z0-9]*' | 39 |
FieldNamingConventions | The static field name 'ACTION_ADD' doesn't match '_[a-z][a-zA-Z0-9]*' | 40 |
FieldNamingConventions | The static field name 'ACTION_DELETE' doesn't match '_[a-z][a-zA-Z0-9]*' | 41 |
Rule | Violation | Ligne |
---|---|---|
DataClass | The class 'Feed' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=12, WMC=14) | 47–199 |
Rule | Violation | Ligne |
---|---|---|
CommentRequired | Header comments are required | 41–115 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 59 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 69 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 78 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 88 |
Rule | Violation | Ligne |
---|---|---|
DataClass | The class 'Subscription' is suspected to be a Data Class (WOC=17.647%, NOPA=0, NOAM=14, WMC=18) | 48–233 |
ControlStatementBraces | This statement should have braces | 209 |
Rule | Violation | Ligne |
---|---|---|
ForLoopCanBeForeach | This for loop can be replaced by a foreach loop | 247–249 |
Rule | Violation | Ligne |
---|---|---|
CommentRequired | Header comments are required | 52–492 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 112 |
CyclomaticComplexity | The method 'getDolistContactId(String, String)' has a cyclomatic complexity of 10. | 112–177 |
ControlStatementBraces | This statement should have braces | 115 |
ControlStatementBraces | This statement should have braces | 118 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 121 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 169 |
AvoidDuplicateLiterals | The String literal "' : " appears 5 times in this file; the first occurrence is on line 171 | 171 |
PreserveStackTrace | New exception is thrown in catch block, original stack trace may be lost | 173 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 189 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 190 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 240 |
PreserveStackTrace | New exception is thrown in catch block, original stack trace may be lost | 268 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 283 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 285 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 286 |
ControlStatementBraces | This statement should have braces | 292 |
PositionLiteralsFirstInComparisons | Position literals first in String comparisons | 295 |
ControlStatementBraces | This statement should have braces | 296 |
PreserveStackTrace | New exception is thrown in catch block, original stack trace may be lost | 322 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 339 |
PositionLiteralsFirstInComparisons | Position literals first in String comparisons | 348 |
PositionLiteralsFirstInComparisons | Position literals first in String comparisons | 348 |
ControlStatementBraces | This statement should have braces | 349 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 360 |
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 'response' | 371 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 374 |
CommentRequired | Public method and constructor comments are required | 374–409 |
PositionLiteralsFirstInComparisons | Position literals first in String comparisons | 383 |
ControlStatementBraces | This statement should have braces | 384 |
PreserveStackTrace | New exception is thrown in catch block, original stack trace may be lost | 405 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 476 |
Rule | Violation | Ligne |
---|---|---|
CommentRequired | Header comments are required | 36–43 |
Rule | Violation | Ligne |
---|---|---|
CommentRequired | Header comments are required | 57–285 |
CommentRequired | Public method and constructor comments are required | 63–104 |
AvoidDuplicateLiterals | The String literal "' : " appears 4 times in this file; the first occurrence is on line 93 | 93 |
AvoidDuplicateLiterals | The String literal "strError" appears 4 times in this file; the first occurrence is on line 95 | 95 |
CommentRequired | Public method and constructor comments are required | 106–159 |
CommentRequired | Public method and constructor comments are required | 161–215 |
CommentRequired | Public method and constructor comments are required | 217–259 |
AssignmentInOperand | Avoid assignments in operands | 277 |
Rule | Violation | Ligne |
---|---|---|
MissingStaticMethodInNonInstantiatableClass | Class cannot be instantiated and does not provide any static methods or fields | 57–462 |
CommentRequired | Header comments are required | 57–462 |
ImmutableField | Private field '_dolistAPI' could be made final; it is only initialized in the declaration or constructor. | 77 |
ImmutableField | Private field '_groupViewRang' could be made final; it is only initialized in the declaration or constructor. | 79 |
LooseCoupling | Avoid using implementation types like 'TreeMap'; use the interface instead | 79 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 80 |
ImmutableField | Private field '_groupsMapIdName' could be made final; it is only initialized in the declaration or constructor. | 80 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 81 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 82 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 89 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 109 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 143 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 155 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 186 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 195 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 216 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 216 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 246 |
CommentRequired | Public method and constructor comments are required | 253–271 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 253 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 256 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 264 |
CyclomaticComplexity | The method 'initMapIdName(String)' has a cyclomatic complexity of 13. | 278–346 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 278 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 301 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 302 |
PositionLiteralsFirstInComparisons | Position literals first in String comparisons | 322 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 341 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 353 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 397 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 454 |
Rule | Violation | Ligne |
---|---|---|
CommentRequired | Header comments are required | 47–148 |
UnusedPrivateField | Avoid unused private fields such as 'DEFAULT_USER_SUBSCRIPTIONS_JSON'. | 50 |
UnusedPrivateField | Avoid unused private fields such as 'DEFAULT_USER_SUBSCRIPTIONS_MAP'. | 51 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 60 |
CommentRequired | Public method and constructor comments are required | 73–76 |
MissingOverride | The method 'getFeeds()' is missing an @Override annotation. | 85–112 |
CommentRequired | Public method and constructor comments are required | 85–112 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 95 |
Rule | Violation | Ligne |
---|---|---|
CallSuperInConstructor | It is a good practice to call super() in a constructor | 56–59 |
NonThreadSafeSingleton | Singleton is not thread safe | 67–70 |
CommentRequired | Public method and constructor comments are required | 82–88 |
CommentRequired | Public method and constructor comments are required | 90–93 |
CommentRequired | Public method and constructor comments are required | 95–98 |
InsufficientStringBufferDeclaration | StringBuffer constructor is initialized with size 16, but has at least 20 characters appended. | 102 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 103 |
Rule | Violation | Ligne |
---|---|---|
CyclomaticComplexity | The method 'loadSubscription(String)' has a cyclomatic complexity of 10. | 77–131 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 85 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 126 |
Rule | Violation | Ligne |
---|---|---|
CommentRequired | Header comments are required | 48–187 |
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 78–87 |
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 95–102 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 111 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 124 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 137 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 150 |
Rule | Violation | Ligne |
---|---|---|
CommentRequired | Header comments are required | 36–43 |
Rule | Violation | Ligne |
---|---|---|
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 50–110 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier | 109 |
DefaultPackage | Use explicit scoping instead of the default package private level | 109 |
Rule | Violation | Ligne |
---|---|---|
DefaultPackage | Use explicit scoping instead of the default package private level | 95 |
RedundantFieldInitializer | Avoid using redundant field initializer for '_subscriptionTypes' | 95 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the _subscriptionTypes field if you want a default access modifier | 95 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the _subscriptionFeeds field if you want a default access modifier | 96 |
RedundantFieldInitializer | Avoid using redundant field initializer for '_subscriptionFeeds' | 96 |
DefaultPackage | Use explicit scoping instead of the default package private level | 96 |
DefaultPackage | Use explicit scoping instead of the default package private level | 97 |
RedundantFieldInitializer | Avoid using redundant field initializer for '_currentFeedType' | 97 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the _currentFeedType field if you want a default access modifier | 97 |
AvoidDuplicateLiterals | The String literal "Invalid subscription type" appears 4 times in this file; the first occurrence is on line 123 | 123 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 142 |
UnnecessaryAnnotationValueElement | Avoid the use of value in annotations when its the only element | 162 |
CyclomaticComplexity | The method 'doUpdateUserSubscribtions(HttpServletRequest)' has a cyclomatic complexity of 15. | 163–261 |
NPathComplexity | The method 'doUpdateUserSubscribtions(HttpServletRequest)' has an NPath complexity of 409 | 163–261 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 216–217 |
ControlStatementBraces | This statement should have braces | 217 |
UseIndexOfChar | String.indexOf(char) is faster than String.indexOf(String). | 225 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 230–233 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 253 |
UnnecessaryAnnotationValueElement | Avoid the use of value in annotations when its the only element | 270 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 312 |
UnnecessaryAnnotationValueElement | Avoid the use of value in annotations when its the only element | 329 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 371 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 391 |
ShortVariable | Avoid variables with short names like i | 397 |
ControlStatementBraces | This statement should have braces | 401 |
Rule | Violation | Ligne |
---|---|---|
ConfusingTernary | Avoid if (x != y) ..; else ..; | 104–120 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 140 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 171 |
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 'xpage' | 180 |
ControlStatementBraces | This statement should have braces | 226 |
ShortVariable | Avoid variables with short names like sb | 231 |
ControlStatementBraces | This statement should have braces | 235–236 |
AssignmentInOperand | Avoid assignments in operands | 235 |
PositionLiteralsFirstInComparisons | Position literals first in String comparisons | 271 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 282 |
Rule | Violation | Ligne |
---|---|---|
CommentRequired | Header comments are required | 60–162 |
ImmutableField | Private field '_listInfos' could be made final; it is only initialized in the declaration or constructor. | 76 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 92 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 109–112 |
ShortVariable | Avoid variables with short names like t | 122 |
Rule | Violation | Ligne |
---|---|---|
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 72–382 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 137 |
DefaultPackage | Use explicit scoping instead of the default package private level | 158–167 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier | 159–167 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 186 |
CommentRequired | Public method and constructor comments are required | 356–380 |
Rule | Violation | Ligne |
---|---|---|
ShortClassName | Avoid short class names like Feed | 47–199 |
Rule | Violation | Ligne |
---|---|---|
UnusedImports | Avoid unused imports such as 'java.util.Map' | 37 |
Rule | Violation | Ligne |
---|---|---|
UnusedImports | Avoid unused imports such as 'java.util.Map' | 37 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
DataClass | The class 'Feed' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=12, WMC=14) | 3 | 47–199 |
ShortClassName | Avoid short class names like Feed | 4 | 47–199 |
FormalParameterNamingConventions | The method parameter name '_type' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 71 |
FormalParameterNamingConventions | The method parameter name '_id' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 71 |
FormalParameterNamingConventions | The method parameter name '_name' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 71 |
FormalParameterNamingConventions | The method parameter name '_name' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 94 |
FormalParameterNamingConventions | The method parameter name '_id' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 114 |
FormalParameterNamingConventions | The method parameter name '_description' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 134 |
FormalParameterNamingConventions | The method parameter name '_type' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 154 |
FormalParameterNamingConventions | The method parameter name '_data' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 174 |
FormalParameterNamingConventions | The method parameter name '_active' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 194 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UnusedImports | Avoid unused imports such as 'java.util.Map' | 4 | 37 |
CommentRequired | Header comments are required | 3 | 41–115 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 59 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 69 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 78 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 88 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
FormalParameterNamingConventions | The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 114 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
DataClass | The class 'Subscription' is suspected to be a Data Class (WOC=17.647%, NOPA=0, NOAM=14, WMC=18) | 3 | 48–233 |
ControlStatementBraces | This statement should have braces | 3 | 209 |
FormalParameterNamingConventions | The method parameter name '_description' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 228 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
FormalParameterNamingConventions | The method parameter name '_nGroupId' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 189 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ForLoopCanBeForeach | This for loop can be replaced by a foreach loop | 3 | 247–249 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
CommentRequired | Header comments are required | 3 | 52–492 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 112 |
CyclomaticComplexity | The method 'getDolistContactId(String, String)' has a cyclomatic complexity of 10. | 3 | 112–177 |
ControlStatementBraces | This statement should have braces | 3 | 115 |
ControlStatementBraces | This statement should have braces | 3 | 118 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 121 |
AvoidThrowingRawExceptionTypes | Avoid throwing raw exception types. | 1 | 149 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 169 |
AvoidDuplicateLiterals | The String literal "' : " appears 5 times in this file; the first occurrence is on line 171 | 3 | 171 |
AvoidThrowingRawExceptionTypes | Avoid throwing raw exception types. | 1 | 173 |
PreserveStackTrace | New exception is thrown in catch block, original stack trace may be lost | 3 | 173 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 189 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 190 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 240 |
PreserveStackTrace | New exception is thrown in catch block, original stack trace may be lost | 3 | 268 |
AvoidThrowingRawExceptionTypes | Avoid throwing raw exception types. | 1 | 268 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 283 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 285 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 286 |
ControlStatementBraces | This statement should have braces | 3 | 292 |
PositionLiteralsFirstInComparisons | Position literals first in String comparisons | 3 | 295 |
ControlStatementBraces | This statement should have braces | 3 | 296 |
AvoidThrowingRawExceptionTypes | Avoid throwing raw exception types. | 1 | 322 |
PreserveStackTrace | New exception is thrown in catch block, original stack trace may be lost | 3 | 322 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 339 |
PositionLiteralsFirstInComparisons | Position literals first in String comparisons | 3 | 348 |
PositionLiteralsFirstInComparisons | Position literals first in String comparisons | 3 | 348 |
ControlStatementBraces | This statement should have braces | 3 | 349 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 360 |
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 'response' | 3 | 371 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 374 |
CommentRequired | Public method and constructor comments are required | 3 | 374–409 |
PositionLiteralsFirstInComparisons | Position literals first in String comparisons | 3 | 383 |
ControlStatementBraces | This statement should have braces | 3 | 384 |
AvoidThrowingRawExceptionTypes | Avoid throwing raw exception types. | 1 | 405 |
PreserveStackTrace | New exception is thrown in catch block, original stack trace may be lost | 3 | 405 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 476 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ClassNamingConventions | The utility class name 'DolistConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 1 | 36–43 |
CommentRequired | Header comments are required | 3 | 36–43 |
FieldNamingConventions | The static field name 'TYPE_SUBSCRIPTION' doesn't match '_[a-z][a-zA-Z0-9]*' | 1 | 38 |
FieldNamingConventions | The static field name 'TYPE_INTEREST' doesn't match '_[a-z][a-zA-Z0-9]*' | 1 | 39 |
FieldNamingConventions | The static field name 'NO_GROUP_NAME' doesn't match '_[a-z][a-zA-Z0-9]*' | 1 | 41 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
CommentRequired | Header comments are required | 3 | 57–285 |
CommentRequired | Public method and constructor comments are required | 3 | 63–104 |
AvoidDuplicateLiterals | The String literal "' : " appears 4 times in this file; the first occurrence is on line 93 | 3 | 93 |
AvoidDuplicateLiterals | The String literal "strError" appears 4 times in this file; the first occurrence is on line 95 | 3 | 95 |
CommentRequired | Public method and constructor comments are required | 3 | 106–159 |
CommentRequired | Public method and constructor comments are required | 3 | 161–215 |
CommentRequired | Public method and constructor comments are required | 3 | 217–259 |
AssignmentInOperand | Avoid assignments in operands | 3 | 277 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ClassWithOnlyPrivateConstructorsShouldBeFinal | A class which only has private constructors should be final | 1 | 57–462 |
MissingStaticMethodInNonInstantiatableClass | Class cannot be instantiated and does not provide any static methods or fields | 3 | 57–462 |
CommentRequired | Header comments are required | 3 | 57–462 |
ImmutableField | Private field '_dolistAPI' could be made final; it is only initialized in the declaration or constructor. | 3 | 77 |
ImmutableField | Private field '_groupViewRang' could be made final; it is only initialized in the declaration or constructor. | 3 | 79 |
LooseCoupling | Avoid using implementation types like 'TreeMap'; use the interface instead | 3 | 79 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 80 |
ImmutableField | Private field '_groupsMapIdName' could be made final; it is only initialized in the declaration or constructor. | 3 | 80 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 81 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 82 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 89 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 109 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 143 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 155 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 186 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 195 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 216 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 216 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 246 |
CommentRequired | Public method and constructor comments are required | 3 | 253–271 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 253 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 256 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 264 |
CyclomaticComplexity | The method 'initMapIdName(String)' has a cyclomatic complexity of 13. | 3 | 278–346 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 278 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 3 | 301 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 3 | 302 |
PositionLiteralsFirstInComparisons | Position literals first in String comparisons | 3 | 322 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 341 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 353 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 397 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 454 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
CommentRequired | Header comments are required | 3 | 47–148 |
UnusedPrivateField | Avoid unused private fields such as 'DEFAULT_USER_SUBSCRIPTIONS_JSON'. | 3 | 50 |
UnusedPrivateField | Avoid unused private fields such as 'DEFAULT_USER_SUBSCRIPTIONS_MAP'. | 3 | 51 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 60 |
CommentRequired | Public method and constructor comments are required | 3 | 73–76 |
MissingOverride | The method 'getFeeds()' is missing an @Override annotation. | 3 | 85–112 |
CommentRequired | Public method and constructor comments are required | 3 | 85–112 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 95 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ClassWithOnlyPrivateConstructorsShouldBeFinal | A class which only has private constructors should be final | 1 | 47–107 |
CallSuperInConstructor | It is a good practice to call super() in a constructor | 3 | 56–59 |
NonThreadSafeSingleton | Singleton is not thread safe | 3 | 67–70 |
CommentRequired | Public method and constructor comments are required | 3 | 82–88 |
CommentRequired | Public method and constructor comments are required | 3 | 90–93 |
CommentRequired | Public method and constructor comments are required | 3 | 95–98 |
InsufficientStringBufferDeclaration | StringBuffer constructor is initialized with size 16, but has at least 20 characters appended. | 3 | 102 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 3 | 103 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
CyclomaticComplexity | The method 'loadSubscription(String)' has a cyclomatic complexity of 10. | 3 | 77–131 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 85 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 126 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UnusedImports | Avoid unused imports such as 'java.util.Map' | 4 | 37 |
CommentRequired | Header comments are required | 3 | 48–187 |
ClassWithOnlyPrivateConstructorsShouldBeFinal | A class which only has private constructors should be final | 1 | 48–187 |
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 3 | 78–87 |
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 3 | 95–102 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 111 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 124 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 137 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 150 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
CommentRequired | Header comments are required | 3 | 36–43 |
ClassNamingConventions | The utility class name 'Constants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 1 | 36–43 |
FieldNamingConventions | The static field name 'TYPE_ALERT' doesn't match '_[a-z][a-zA-Z0-9]*' | 1 | 38 |
FieldNamingConventions | The static field name 'TYPE_NEWSLETTER' doesn't match '_[a-z][a-zA-Z0-9]*' | 1 | 39 |
FieldNamingConventions | The static field name 'ACTION_ADD' doesn't match '_[a-z][a-zA-Z0-9]*' | 1 | 40 |
FieldNamingConventions | The static field name 'ACTION_DELETE' doesn't match '_[a-z][a-zA-Z0-9]*' | 1 | 41 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 3 | 50–110 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier | 3 | 109 |
DefaultPackage | Use explicit scoping instead of the default package private level | 3 | 109 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
DefaultPackage | Use explicit scoping instead of the default package private level | 3 | 95 |
RedundantFieldInitializer | Avoid using redundant field initializer for '_subscriptionTypes' | 3 | 95 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the _subscriptionTypes field if you want a default access modifier | 3 | 95 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the _subscriptionFeeds field if you want a default access modifier | 3 | 96 |
RedundantFieldInitializer | Avoid using redundant field initializer for '_subscriptionFeeds' | 3 | 96 |
DefaultPackage | Use explicit scoping instead of the default package private level | 3 | 96 |
DefaultPackage | Use explicit scoping instead of the default package private level | 3 | 97 |
RedundantFieldInitializer | Avoid using redundant field initializer for '_currentFeedType' | 3 | 97 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the _currentFeedType field if you want a default access modifier | 3 | 97 |
AvoidDuplicateLiterals | The String literal "Invalid subscription type" appears 4 times in this file; the first occurrence is on line 123 | 3 | 123 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 142 |
UnnecessaryAnnotationValueElement | Avoid the use of value in annotations when its the only element | 3 | 162 |
CyclomaticComplexity | The method 'doUpdateUserSubscribtions(HttpServletRequest)' has a cyclomatic complexity of 15. | 3 | 163–261 |
NPathComplexity | The method 'doUpdateUserSubscribtions(HttpServletRequest)' has an NPath complexity of 409 | 3 | 163–261 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 3 | 216–217 |
ControlStatementBraces | This statement should have braces | 3 | 217 |
UseIndexOfChar | String.indexOf(char) is faster than String.indexOf(String). | 3 | 225 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 3 | 230–233 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 253 |
UnnecessaryAnnotationValueElement | Avoid the use of value in annotations when its the only element | 3 | 270 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 312 |
UnnecessaryAnnotationValueElement | Avoid the use of value in annotations when its the only element | 3 | 329 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 371 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 391 |
ShortVariable | Avoid variables with short names like i | 3 | 397 |
ControlStatementBraces | This statement should have braces | 3 | 401 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 104–120 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 140 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 171 |
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 'xpage' | 3 | 180 |
ControlStatementBraces | This statement should have braces | 3 | 226 |
ShortVariable | Avoid variables with short names like sb | 3 | 231 |
ControlStatementBraces | This statement should have braces | 3 | 235–236 |
AssignmentInOperand | Avoid assignments in operands | 3 | 235 |
PositionLiteralsFirstInComparisons | Position literals first in String comparisons | 3 | 271 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 282 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
CommentRequired | Header comments are required | 3 | 60–162 |
ImmutableField | Private field '_listInfos' could be made final; it is only initialized in the declaration or constructor. | 3 | 76 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 92 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 3 | 109–112 |
ShortVariable | Avoid variables with short names like t | 3 | 122 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 3 | 72–382 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 3 | 137 |
DefaultPackage | Use explicit scoping instead of the default package private level | 3 | 158–167 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier | 3 | 159–167 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 186 |
CommentRequired | Public method and constructor comments are required | 3 | 356–380 |