The following document contains the results of PMD 6.13.0.
Rule | Violation | Line |
---|---|---|
ClassNamingConventions | The utility class name 'AddCommentPosition' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 39–72 |
Rule | Violation | Line |
---|---|---|
FormalParameterNamingConventions | The method parameter name '_strLuteceUserName' doesn't match '[a-z][a-zA-Z0-9]*' | 456 |
FormalParameterNamingConventions | The method parameter name '_nCommentOrder' doesn't match '[a-z][a-zA-Z0-9]*' | 495 |
FormalParameterNamingConventions | The method parameter name '_bIsImportant' doesn't match '[a-z][a-zA-Z0-9]*' | 514 |
Rule | Violation | Line |
---|---|---|
FormalParameterNamingConventions | The method parameter name '_strSortedAttributeName' doesn't match '[a-z][a-zA-Z0-9]*' | 86 |
FormalParameterNamingConventions | The method parameter name '_bAscSort' doesn't match '[a-z][a-zA-Z0-9]*' | 105 |
FormalParameterNamingConventions | The method parameter name '_bPinned' doesn't match '[a-z][a-zA-Z0-9]*' | 125 |
FormalParameterNamingConventions | The method parameter name '_bImportant' doesn't match '[a-z][a-zA-Z0-9]*' | 144 |
FormalParameterNamingConventions | The method parameter name '_strLuteceUserName' doesn't match '[a-z][a-zA-Z0-9]*' | 164 |
Rule | Violation | Line |
---|---|---|
FieldNamingConventions | The field name 'strIdComponent' doesn't match '_[a-z][a-zA-Z0-9]*' | 55 |
FormalParameterNamingConventions | The method parameter name 'user_id' doesn't match '[a-z][a-zA-Z0-9]*' | 76 |
FormalParameterNamingConventions | The method parameter name 'user_id' doesn't match '[a-z][a-zA-Z0-9]*' | 90 |
Rule | Violation | Line |
---|---|---|
ClassWithOnlyPrivateConstructorsShouldBeFinal | A class which only has private constructors should be final | 52–406 |
Rule | Violation | Line |
---|---|---|
ClassNamingConventions | The utility class name 'CommentConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 41–177 |
Rule | Violation | Line |
---|---|---|
FieldNamingConventions | The final field name '_bIsCaptchaEnabled' doesn't match '[a-z][a-zA-Z0-9]*' | 147 |
Rule | Violation | Line |
---|---|---|
AvoidUsingVolatile | Use of modifier volatile is not recommended. | 62 |
Rule | Violation | Line |
---|---|---|
AvoidReassigningParameters | Avoid reassigning parameters such as 'nNbComments' | 256 |
Rule | Violation | Line |
---|---|---|
BooleanInstantiation | Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. | 301 |
BooleanInstantiation | Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. | 394 |
Rule | Violation | Line |
---|---|---|
AvoidUsingVolatile | Use of modifier volatile is not recommended. | 116 |
BooleanInstantiation | Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. | 394 |
BooleanInstantiation | Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. | 398 |
Rule | Violation | Line |
---|---|---|
CommentRequired | Header comments are required | 39–72 |
UseUtilityClass | All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. | 40–72 |
NonThreadSafeSingleton | Singleton is not thread safe | 60–68 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 62 |
Rule | Violation | Line |
---|---|---|
TooManyFields | Too many fields | 58–559 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 240 |
UseCollectionIsEmpty | Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 407 |
Rule | Violation | Line |
---|---|---|
TooManyMethods | This class has too many methods, consider refactoring it. | 58–748 |
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 112–141 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 296 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 346 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 379 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 383 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 451 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 511 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 547 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 551 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 555 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 727 |
Rule | Violation | Line |
---|---|---|
TooManyMethods | This class has too many methods, consider refactoring it. | 45–255 |
Rule | Violation | Line |
---|---|---|
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 56–78 |
Rule | Violation | Line |
---|---|---|
ImmutableField | Private field 'strIdComponent' could be made final; it is only initialized in the declaration or constructor. | 55 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 78 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 78 |
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 'lstComment' | 97 |
Rule | Violation | Line |
---|---|---|
UnnecessaryReturn | Avoid unnecessary return statements | 73 |
Rule | Violation | Line |
---|---|---|
NonThreadSafeSingleton | Singleton is not thread safe | 87–92 |
Rule | Violation | Line |
---|---|---|
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 59 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 59 |
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 81–91 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 86 |
UseCollectionIsEmpty | Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 175 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 243 |
CyclomaticComplexity | The method 'checkComment(String, String, String)' has a cyclomatic complexity of 10. | 255–291 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 286 |
CyclomaticComplexity | The method 'checkComment(String, String, String, String)' has a cyclomatic complexity of 10. | 299–334 |
UseObjectForClearerAPI | Rather than using a lot of String arguments, consider using a container object for those values. | 299 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 329 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 376 |
NonThreadSafeSingleton | Singleton is not thread safe | 390–403 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 397–400 |
UseCollectionIsEmpty | Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 397 |
Rule | Violation | Line |
---|---|---|
TooManyMethods | This class has too many methods, consider refactoring it. | 70–544 |
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 88–102 |
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 109–123 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 283–286 |
UseUnderscoresInNumericLiterals | Number 10000 should separate every third digit with an underscore | 483 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 487–490 |
MissingOverride | The method 'getResourceType(String)' is missing an @Override annotation. | 522–531 |
CommentRequired | Public method and constructor comments are required | 522–531 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 526 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 527 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 527 |
Rule | Violation | Line |
---|---|---|
UnnecessaryModifier | Unnecessary modifier 'public' on method 'checkComment': the method is declared in an interface type | 98 |
UnnecessaryModifier | Unnecessary modifier 'public' on method 'checkComment': the method is declared in an interface type | 109 |
UseObjectForClearerAPI | Rather than using a lot of String arguments, consider using a container object for those values. | 109 |
UnnecessaryModifier | Unnecessary modifier 'public' on method 'canComment': the method is declared in an interface type | 122 |
Rule | Violation | Line |
---|---|---|
TooManyMethods | This class has too many methods, consider refactoring it. | 53–389 |
Rule | Violation | Line |
---|---|---|
ConfusingTernary | Avoid if (x != y) ..; else ..; | 105–112 |
Rule | Violation | Line |
---|---|---|
UnnecessaryAnnotationValueElement | Avoid the use of value in annotations when its the only element | 50–52 |
UnnecessaryAnnotationValueElement | Avoid the use of value in annotations when its the only element | 53 |
Rule | Violation | Line |
---|---|---|
ImmutableField | Private field '_pattern' could be made final; it is only initialized in the declaration or constructor. | 54 |
UncommentedEmptyMethodBody | Document empty method body | 61–62 |
ShortVariable | Avoid variables with short names like m | 74 |
Rule | Violation | Line |
---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 34–889 |
GodClass | Possible God Class (WMC=88, ATFD=245, TCC=13.187%) | 109–889 |
CyclomaticComplexity | The class 'CommentApp' has a total cyclomatic complexity of 88 (highest 29). | 109–889 |
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 109–889 |
CyclomaticComplexity | The method 'getPage(HttpServletRequest, int, Plugin)' has a cyclomatic complexity of 10. | 154–213 |
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 | 189 |
NPathComplexity | The method 'getViewCommentPageContent(HttpServletRequest, String, String, String)' has an NPath complexity of 4096 | 228–346 |
ExcessiveMethodLength | Avoid really long methods. | 228–346 |
NcssCount | The method 'getViewCommentPageContent(HttpServletRequest, String, String, String)' has a NCSS line count of 75. | 228–346 |
CyclomaticComplexity | The method 'getViewCommentPageContent(HttpServletRequest, String, String, String)' has a cyclomatic complexity of 13. | 228–346 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 315–316 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 318 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 318 |
CyclomaticComplexity | The method 'getAddCommentPage(HttpServletRequest, String, String)' has a cyclomatic complexity of 11. | 380–458 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 406–456 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 408 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 408 |
NPathComplexity | The method 'doAddComment(HttpServletRequest, String, String)' has an NPath complexity of 734112 | 473–643 |
NcssCount | The method 'doAddComment(HttpServletRequest, String, String)' has a NCSS line count of 78. | 473–643 |
CyclomaticComplexity | The method 'doAddComment(HttpServletRequest, String, String)' has a cyclomatic complexity of 29. | 473–643 |
ExcessiveMethodLength | Avoid really long methods. | 473–643 |
IdenticalCatchBranches | 'catch' branch identical to 'IllegalAccessException' branch | 487–490 |
UseCollectionIsEmpty | Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 518 |
CollapsibleIfStatements | These nested if statements could be combined | 551–555 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 575 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 620 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 620 |
EmptyCatchBlock | Avoid empty catch blocks | 655–658 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 704 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 704 |
NonThreadSafeSingleton | Singleton is not thread safe | 755–758 |
NonThreadSafeSingleton | Singleton is not thread safe | 769–772 |
NonThreadSafeSingleton | Singleton is not thread safe | 783–786 |
NonThreadSafeSingleton | Singleton is not thread safe | 797–800 |
CyclomaticComplexity | The method 'doRemoveComment(HttpServletRequest, String, String)' has a cyclomatic complexity of 16. | 814–888 |
NPathComplexity | The method 'doRemoveComment(HttpServletRequest, String, String)' has an NPath complexity of 369 | 814–888 |
EmptyCatchBlock | Avoid empty catch blocks | 879–882 |
Rule | Violation | Line |
---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 34–591 |
GodClass | Possible God Class (WMC=53, ATFD=202, TCC=32.967%) | 80–591 |
ImmutableField | Private field '_commentService' could be made final; it is only initialized in the declaration or constructor. | 106 |
ImmutableField | Private field '_resourceHistoryService' could be made final; it is only initialized in the declaration or constructor. | 107 |
ImmutableField | Private field '_resourceExtenderService' could be made final; it is only initialized in the declaration or constructor. | 109 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 133 |
AvoidDuplicateLiterals | The String literal " when updating a comment" appears 4 times in this file; the first occurrence is on line 136 | 136 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 173 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 212 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 267 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 300 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 300 |
UseLocaleWithCaseConversions | When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 305 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 324 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 325 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 326 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 344–347 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 454 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 474 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 521–529 |
Rule | Violation | Line |
---|---|---|
UncommentedEmptyMethodBody | Document empty method body | 87–88 |
Rule | Violation | Line |
---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 34–555 |
UnusedPrivateField | Avoid unused private fields such as 'JSP_URL_MANAGE_COMMENTS'. | 103 |
ImmutableField | Private field '_nDefaultItemsPerPage' could be made final; it is only initialized in the declaration or constructor. | 114 |
ExcessiveMethodLength | Avoid really long methods. | 131–243 |
NPathComplexity | The method 'getPageAddOn(String, String, String, HttpServletRequest)' has an NPath complexity of 584 | 131–243 |
NcssCount | The method 'getPageAddOn(String, String, String, HttpServletRequest)' has a NCSS line count of 63. | 131–243 |
CyclomaticComplexity | The method 'getPageAddOn(String, String, String, HttpServletRequest)' has a cyclomatic complexity of 13. | 131–243 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 158 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 158 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 188–191 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 255 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 255 |
NcssCount | The method 'getInfoHtml(ResourceExtenderDTO, Locale, HttpServletRequest)' has a NCSS line count of 121. | 286–499 |
ExcessiveMethodLength | Avoid really long methods. | 286–499 |
NPathComplexity | The method 'getInfoHtml(ResourceExtenderDTO, Locale, HttpServletRequest)' has an NPath complexity of 3145730 | 286–499 |
CyclomaticComplexity | The method 'getInfoHtml(ResourceExtenderDTO, Locale, HttpServletRequest)' has a cyclomatic complexity of 27. | 286–499 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 414–415 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 417 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 417 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 430–452 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 517 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 517 |
Rule | Violation | Line |
---|---|---|
BooleanGetMethodName | A getX() method which returns a boolean should be named isX() | 383–386 |
BooleanGetMethodName | A getX() method which returns a boolean should be named isX() | 504–507 |
Rule | Violation | Line |
---|---|---|
UnusedImports | Avoid unused imports such as 'java.sql.ResultSet' | 50 |
UnusedImports | Avoid unused imports such as 'java.sql.SQLException' | 51 |
Rule | Violation | Line |
---|---|---|
UnusedImports | Avoid unused imports such as 'java.util.Collection' | 38 |
Rule | Violation | Line |
---|---|---|
BooleanGetMethodName | A getX() method which returns a boolean should be named isX() | 119–122 |
BooleanGetMethodName | A getX() method which returns a boolean should be named isX() | 140–143 |
BooleanGetMethodName | A getX() method which returns a boolean should be named isX() | 259–262 |
Rule | Violation | Line |
---|---|---|
UnusedImports | Avoid unused imports such as 'java.util.Set' | 37 |
UnusedImports | Avoid unused imports such as 'javax.validation.ConstraintViolation' | 40 |
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.plugins.extend.modules.comment.business.Comment' | 42 |
Rule | Violation | Line |
---|---|---|
UnusedImports | Avoid unused imports such as 'java.util.Collection' | 36 |
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' | 46 |
Rule | Violation | Line |
---|---|---|
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.portal.service.message.AdminMessage' | 74 |
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.portal.service.message.AdminMessageService' | 75 |
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.portal.util.mvc.commons.annotations.Action' | 90 |
Rule | Violation | Line |
---|---|---|
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.plugins.extend.service.extender.config.IResourceExtenderConfigService' | 56 |
Rule | Violation | Priority | Line |
---|---|---|---|
CommentRequired | Header comments are required | 3 | 39–72 |
ClassNamingConventions | The utility class name 'AddCommentPosition' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 1 | 39–72 |
UseUtilityClass | All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. | 3 | 40–72 |
NonThreadSafeSingleton | Singleton is not thread safe | 3 | 60–68 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 62 |
Rule | Violation | Priority | Line |
---|---|---|---|
TooManyFields | Too many fields | 3 | 58–559 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 240 |
BooleanGetMethodName | A getX() method which returns a boolean should be named isX() | 4 | 383–386 |
UseCollectionIsEmpty | Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 3 | 407 |
FormalParameterNamingConventions | The method parameter name '_strLuteceUserName' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 456 |
FormalParameterNamingConventions | The method parameter name '_nCommentOrder' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 495 |
BooleanGetMethodName | A getX() method which returns a boolean should be named isX() | 4 | 504–507 |
FormalParameterNamingConventions | The method parameter name '_bIsImportant' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 514 |
Rule | Violation | Priority | Line |
---|---|---|---|
UnusedImports | Avoid unused imports such as 'java.sql.ResultSet' | 4 | 50 |
UnusedImports | Avoid unused imports such as 'java.sql.SQLException' | 4 | 51 |
TooManyMethods | This class has too many methods, consider refactoring it. | 3 | 58–748 |
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 3 | 112–141 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 296 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 3 | 346 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 379 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 383 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 451 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 511 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 547 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 551 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 3 | 555 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 727 |
Rule | Violation | Priority | Line |
---|---|---|---|
FormalParameterNamingConventions | The method parameter name '_strSortedAttributeName' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 86 |
FormalParameterNamingConventions | The method parameter name '_bAscSort' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 105 |
FormalParameterNamingConventions | The method parameter name '_bPinned' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 125 |
FormalParameterNamingConventions | The method parameter name '_bImportant' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 144 |
FormalParameterNamingConventions | The method parameter name '_strLuteceUserName' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 164 |
Rule | Violation | Priority | Line |
---|---|---|---|
UnusedImports | Avoid unused imports such as 'java.util.Collection' | 4 | 38 |
TooManyMethods | This class has too many methods, consider refactoring it. | 3 | 45–255 |
Rule | Violation | Priority | Line |
---|---|---|---|
BooleanGetMethodName | A getX() method which returns a boolean should be named isX() | 4 | 119–122 |
BooleanGetMethodName | A getX() method which returns a boolean should be named isX() | 4 | 140–143 |
BooleanGetMethodName | A getX() method which returns a boolean should be named isX() | 4 | 259–262 |
Rule | Violation | Priority | Line |
---|---|---|---|
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 3 | 56–78 |
Rule | Violation | Priority | Line |
---|---|---|---|
ImmutableField | Private field 'strIdComponent' could be made final; it is only initialized in the declaration or constructor. | 3 | 55 |
FieldNamingConventions | The field name 'strIdComponent' doesn't match '_[a-z][a-zA-Z0-9]*' | 1 | 55 |
FormalParameterNamingConventions | The method parameter name 'user_id' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 76 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 78 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 78 |
FormalParameterNamingConventions | The method parameter name 'user_id' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 90 |
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 'lstComment' | 3 | 97 |
Rule | Violation | Priority | Line |
---|---|---|---|
UnnecessaryReturn | Avoid unnecessary return statements | 3 | 73 |
Rule | Violation | Priority | Line |
---|---|---|---|
NonThreadSafeSingleton | Singleton is not thread safe | 3 | 87–92 |
Rule | Violation | Priority | Line |
---|---|---|---|
ClassWithOnlyPrivateConstructorsShouldBeFinal | A class which only has private constructors should be final | 1 | 52–406 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 59 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 59 |
AvoidUsingVolatile | Use of modifier volatile is not recommended. | 2 | 62 |
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 3 | 81–91 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 86 |
UseCollectionIsEmpty | Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 3 | 175 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 243 |
CyclomaticComplexity | The method 'checkComment(String, String, String)' has a cyclomatic complexity of 10. | 3 | 255–291 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 286 |
CyclomaticComplexity | The method 'checkComment(String, String, String, String)' has a cyclomatic complexity of 10. | 3 | 299–334 |
UseObjectForClearerAPI | Rather than using a lot of String arguments, consider using a container object for those values. | 3 | 299 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 329 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 376 |
NonThreadSafeSingleton | Singleton is not thread safe | 3 | 390–403 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 3 | 397–400 |
UseCollectionIsEmpty | Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 3 | 397 |
Rule | Violation | Priority | Line |
---|---|---|---|
TooManyMethods | This class has too many methods, consider refactoring it. | 3 | 70–544 |
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 3 | 88–102 |
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 3 | 109–123 |
AvoidReassigningParameters | Avoid reassigning parameters such as 'nNbComments' | 2 | 256 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 3 | 283–286 |
UseUnderscoresInNumericLiterals | Number 10000 should separate every third digit with an underscore | 3 | 483 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 3 | 487–490 |
MissingOverride | The method 'getResourceType(String)' is missing an @Override annotation. | 3 | 522–531 |
CommentRequired | Public method and constructor comments are required | 3 | 522–531 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 3 | 526 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 3 | 527 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 3 | 527 |
Rule | Violation | Priority | Line |
---|---|---|---|
UnusedImports | Avoid unused imports such as 'java.util.Set' | 4 | 37 |
UnusedImports | Avoid unused imports such as 'javax.validation.ConstraintViolation' | 4 | 40 |
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.plugins.extend.modules.comment.business.Comment' | 4 | 42 |
UnnecessaryModifier | Unnecessary modifier 'public' on method 'checkComment': the method is declared in an interface type | 3 | 98 |
UnnecessaryModifier | Unnecessary modifier 'public' on method 'checkComment': the method is declared in an interface type | 3 | 109 |
UseObjectForClearerAPI | Rather than using a lot of String arguments, consider using a container object for those values. | 3 | 109 |
UnnecessaryModifier | Unnecessary modifier 'public' on method 'canComment': the method is declared in an interface type | 3 | 122 |
Rule | Violation | Priority | Line |
---|---|---|---|
UnusedImports | Avoid unused imports such as 'java.util.Collection' | 4 | 36 |
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' | 4 | 46 |
TooManyMethods | This class has too many methods, consider refactoring it. | 3 | 53–389 |
Rule | Violation | Priority | Line |
---|---|---|---|
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 105–112 |
Rule | Violation | Priority | Line |
---|---|---|---|
UnnecessaryAnnotationValueElement | Avoid the use of value in annotations when its the only element | 3 | 50–52 |
UnnecessaryAnnotationValueElement | Avoid the use of value in annotations when its the only element | 3 | 53 |
Rule | Violation | Priority | Line |
---|---|---|---|
ClassNamingConventions | The utility class name 'CommentConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 1 | 41–177 |
Rule | Violation | Priority | Line |
---|---|---|---|
ImmutableField | Private field '_pattern' could be made final; it is only initialized in the declaration or constructor. | 3 | 54 |
UncommentedEmptyMethodBody | Document empty method body | 3 | 61–62 |
ShortVariable | Avoid variables with short names like m | 3 | 74 |
Rule | Violation | Priority | Line |
---|---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 3 | 34–889 |
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.portal.service.message.AdminMessage' | 4 | 74 |
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.portal.service.message.AdminMessageService' | 4 | 75 |
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.portal.util.mvc.commons.annotations.Action' | 4 | 90 |
GodClass | Possible God Class (WMC=88, ATFD=245, TCC=13.187%) | 3 | 109–889 |
CyclomaticComplexity | The class 'CommentApp' has a total cyclomatic complexity of 88 (highest 29). | 3 | 109–889 |
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 3 | 109–889 |
FieldNamingConventions | The final field name '_bIsCaptchaEnabled' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 147 |
CyclomaticComplexity | The method 'getPage(HttpServletRequest, int, Plugin)' has a cyclomatic complexity of 10. | 3 | 154–213 |
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 | 189 |
NPathComplexity | The method 'getViewCommentPageContent(HttpServletRequest, String, String, String)' has an NPath complexity of 4096 | 3 | 228–346 |
ExcessiveMethodLength | Avoid really long methods. | 3 | 228–346 |
NcssCount | The method 'getViewCommentPageContent(HttpServletRequest, String, String, String)' has a NCSS line count of 75. | 3 | 228–346 |
CyclomaticComplexity | The method 'getViewCommentPageContent(HttpServletRequest, String, String, String)' has a cyclomatic complexity of 13. | 3 | 228–346 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 315–316 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 318 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 318 |
CyclomaticComplexity | The method 'getAddCommentPage(HttpServletRequest, String, String)' has a cyclomatic complexity of 11. | 3 | 380–458 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 406–456 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 408 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 408 |
NPathComplexity | The method 'doAddComment(HttpServletRequest, String, String)' has an NPath complexity of 734112 | 3 | 473–643 |
NcssCount | The method 'doAddComment(HttpServletRequest, String, String)' has a NCSS line count of 78. | 3 | 473–643 |
CyclomaticComplexity | The method 'doAddComment(HttpServletRequest, String, String)' has a cyclomatic complexity of 29. | 3 | 473–643 |
ExcessiveMethodLength | Avoid really long methods. | 3 | 473–643 |
IdenticalCatchBranches | 'catch' branch identical to 'IllegalAccessException' branch | 3 | 487–490 |
UseCollectionIsEmpty | Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 3 | 518 |
CollapsibleIfStatements | These nested if statements could be combined | 3 | 551–555 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 575 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 620 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 620 |
EmptyCatchBlock | Avoid empty catch blocks | 3 | 655–658 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 704 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 704 |
NonThreadSafeSingleton | Singleton is not thread safe | 3 | 755–758 |
NonThreadSafeSingleton | Singleton is not thread safe | 3 | 769–772 |
NonThreadSafeSingleton | Singleton is not thread safe | 3 | 783–786 |
NonThreadSafeSingleton | Singleton is not thread safe | 3 | 797–800 |
CyclomaticComplexity | The method 'doRemoveComment(HttpServletRequest, String, String)' has a cyclomatic complexity of 16. | 3 | 814–888 |
NPathComplexity | The method 'doRemoveComment(HttpServletRequest, String, String)' has an NPath complexity of 369 | 3 | 814–888 |
EmptyCatchBlock | Avoid empty catch blocks | 3 | 879–882 |
Rule | Violation | Priority | Line |
---|---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 3 | 34–591 |
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.plugins.extend.service.extender.config.IResourceExtenderConfigService' | 4 | 56 |
GodClass | Possible God Class (WMC=53, ATFD=202, TCC=32.967%) | 3 | 80–591 |
ImmutableField | Private field '_commentService' could be made final; it is only initialized in the declaration or constructor. | 3 | 106 |
ImmutableField | Private field '_resourceHistoryService' could be made final; it is only initialized in the declaration or constructor. | 3 | 107 |
ImmutableField | Private field '_resourceExtenderService' could be made final; it is only initialized in the declaration or constructor. | 3 | 109 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 133 |
AvoidDuplicateLiterals | The String literal " when updating a comment" appears 4 times in this file; the first occurrence is on line 136 | 3 | 136 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 173 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 212 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 267 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 300 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 300 |
BooleanInstantiation | Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. | 2 | 301 |
UseLocaleWithCaseConversions | When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 3 | 305 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 324 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 325 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 326 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 3 | 344–347 |
BooleanInstantiation | Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. | 2 | 394 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 454 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 474 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 521–529 |
Rule | Violation | Priority | Line |
---|---|---|---|
UncommentedEmptyMethodBody | Document empty method body | 3 | 87–88 |
Rule | Violation | Priority | Line |
---|---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 3 | 34–555 |
UnusedPrivateField | Avoid unused private fields such as 'JSP_URL_MANAGE_COMMENTS'. | 3 | 103 |
ImmutableField | Private field '_nDefaultItemsPerPage' could be made final; it is only initialized in the declaration or constructor. | 3 | 114 |
AvoidUsingVolatile | Use of modifier volatile is not recommended. | 2 | 116 |
ExcessiveMethodLength | Avoid really long methods. | 3 | 131–243 |
NPathComplexity | The method 'getPageAddOn(String, String, String, HttpServletRequest)' has an NPath complexity of 584 | 3 | 131–243 |
NcssCount | The method 'getPageAddOn(String, String, String, HttpServletRequest)' has a NCSS line count of 63. | 3 | 131–243 |
CyclomaticComplexity | The method 'getPageAddOn(String, String, String, HttpServletRequest)' has a cyclomatic complexity of 13. | 3 | 131–243 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 158 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 158 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 3 | 188–191 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 255 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 255 |
NcssCount | The method 'getInfoHtml(ResourceExtenderDTO, Locale, HttpServletRequest)' has a NCSS line count of 121. | 3 | 286–499 |
ExcessiveMethodLength | Avoid really long methods. | 3 | 286–499 |
NPathComplexity | The method 'getInfoHtml(ResourceExtenderDTO, Locale, HttpServletRequest)' has an NPath complexity of 3145730 | 3 | 286–499 |
CyclomaticComplexity | The method 'getInfoHtml(ResourceExtenderDTO, Locale, HttpServletRequest)' has a cyclomatic complexity of 27. | 3 | 286–499 |
BooleanInstantiation | Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. | 2 | 394 |
BooleanInstantiation | Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. | 2 | 398 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 414–415 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 417 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 417 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 430–452 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 517 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 517 |