Fork me on GitHub

Résultats PMD

Le document suivant contient les résultats de PMD 6.13.0.

Violations By Priority

Priority 1

fr/paris/lutece/plugins/rest/filter/LuteceJerseyLoggingFilter.java

Rule Violation Ligne
FieldNamingConventions The constant name 'mapper' doesn't match '[A-Z][A-Z_0-9]*' 58

fr/paris/lutece/plugins/rest/service/RestConstants.java

Rule Violation Ligne
ClassNamingConventions The utility class name 'RestConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 3958

fr/paris/lutece/plugins/rest/service/mediatype/RestMediaTypes.java

Rule Violation Ligne
ClassNamingConventions The utility class name 'RestMediaTypes' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 4463

fr/paris/lutece/plugins/rest/service/param/AbstractParam.java

Rule Violation Ligne
FieldNamingConventions The final field name '_strOriginalParam' doesn't match '[a-z][a-zA-Z0-9]*' 48
FieldNamingConventions The final field name '_value' doesn't match '[a-z][a-zA-Z0-9]*' 49
ConstructorCallsOverridableMethod Overridable method 'onError' called during object construction 69

fr/paris/lutece/plugins/rest/service/resourceinfo/AbstractResourceInfoProvider.java

Rule Violation Ligne
AbstractClassWithoutAnyMethod No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 4143

fr/paris/lutece/plugins/rest/service/resourceinfo/ResourceInfoManager.java

Rule Violation Ligne
ClassNamingConventions The utility class name 'ResourceInfoManager' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 4888

Priority 2

fr/paris/lutece/plugins/rest/filter/LuteceJerseyLoggingFilter.java

Rule Violation Ligne
GuardLogStatement Logger calls should be surrounded by log level guards. 112

Priority 3

fr/paris/lutece/plugins/rest/business/resourceinfo/AbstractResourceInfo.java

Rule Violation Ligne
MissingOverride The method 'setKey(String)' is missing an @Override annotation. 6265
MissingOverride The method 'getKey()' is missing an @Override annotation. 7073
MissingOverride The method 'setValue(String)' is missing an @Override annotation. 7881
MissingOverride The method 'getValue()' is missing an @Override annotation. 8689
MissingOverride The method 'setListChildren(List)' is missing an @Override annotation. 9497
MissingOverride The method 'getListChildren()' is missing an @Override annotation. 102105
MissingOverride The method 'hasChildren()' is missing an @Override annotation. 110113

fr/paris/lutece/plugins/rest/business/resourceinfo/ResourceInfo.java

Rule Violation Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 5155
MissingOverride The method 'setResourceInfo(ResourceInfo)' is missing an @Override annotation. 6065

fr/paris/lutece/plugins/rest/filter/LuteceJerseyLoggingFilter.java

Rule Violation Ligne
CommentRequired Header comments are required 55208
CommentRequired Public method and constructor comments are required 7274
UncommentedEmptyConstructor Document empty constructor 7274
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 7274
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 93
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 102
ShortVariable Avoid variables with short names like sb 118
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 121
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 123
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 126
ShortVariable Avoid variables with short names like sb 137
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 140
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 142
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 142
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 143
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 143
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 144
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 144
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 147
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 150
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'in': resource specifications are implicitly final 164
ShortVariable Avoid variables with short names like in 164
ShortVariable Avoid variables with short names like b 166
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 177
CommentRequired Public method and constructor comments are required 185195
CommentRequired Public method and constructor comments are required 197207

fr/paris/lutece/plugins/rest/service/LuteceApplicationResourceConfig.java

Rule Violation Ligne
CommentRequired Header comments are required 59160
CyclomaticComplexity The constructor 'LuteceApplicationResourceConfig()' has a cyclomatic complexity of 13. 65159
CommentRequired Public method and constructor comments are required 65159
CallSuperInConstructor It is a good practice to call super() in a constructor 65159
NPathComplexity The constructor 'LuteceApplicationResourceConfig()' has an NPath complexity of 304 65159
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 99
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 153

fr/paris/lutece/plugins/rest/service/LuteceJerseySpringServlet.java

Rule Violation Ligne
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the LOGGER field if you want a default access modifier 76
DefaultPackage Use explicit scoping instead of the default package private level 76
ShortVariable Avoid variables with short names like ra 143

fr/paris/lutece/plugins/rest/service/mapper/GenericUncaughtExceptionMapper.java

Rule Violation Ligne
CommentRequired Protected method constructor comments are required 65
CommentRequired Protected method constructor comments are required 67
CommentRequired Protected method constructor comments are required 69

fr/paris/lutece/plugins/rest/service/mapper/GenericUncaughtJerseyExceptionMapper.java

Rule Violation Ligne
CommentRequired Protected method constructor comments are required 63

fr/paris/lutece/plugins/rest/service/param/AbstractParam.java

Rule Violation Ligne
AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 59
AvoidCatchingThrowable A catch statement should never catch throwable since it includes errors. 67
ShortVariable Avoid variables with short names like e 112
ShortVariable Avoid variables with short names like e 126

fr/paris/lutece/plugins/rest/service/resourceinfo/ResourceInfoManager.java

Rule Violation Ligne
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 76

fr/paris/lutece/plugins/rest/service/writers/AbstractWriter.java

Rule Violation Ligne
MissingOverride The method 'getSize(List, Class, Type, Annotation, MediaType)' is missing an @Override annotation. 9295
MissingOverride The method 'writeTo(List, Class, Type, Annotation, MediaType, MultivaluedMap, OutputStream)' is missing an @Override annotation. 100158
CyclomaticComplexity The method 'writeTo(List, Class, Type, Annotation, MediaType, MultivaluedMap, OutputStream)' has a cyclomatic complexity of 11. 100158
AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 101
ConfusingTernary Avoid if (x != y) ..; else ..; 103157
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 105
ConfusingTernary Avoid if (x != y) ..; else ..; 114142
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 116
ConfusingTernary Avoid if (x != y) ..; else ..; 120127
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 130

fr/paris/lutece/plugins/rest/util/xml/XMLUtil.java

Rule Violation Ligne
AddEmptyString Do not add empty strings 70

Priority 4

fr/paris/lutece/plugins/rest/service/LuteceJerseySpringServlet.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.rest.service.mediatype.MediaTypeMapping' 36
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.rest.service.mediatype.RestMediaTypes' 37
UnusedImports Avoid unused imports such as 'org.apache.commons.lang3.StringUtils' 41
UnusedImports Avoid unused imports such as 'org.apache.log4j.Level' 43
UnusedImports Avoid unused imports such as 'org.glassfish.jersey.server.ResourceConfig' 46
UnusedImports Avoid unused imports such as 'java.util.List' 55
UnusedImports Avoid unused imports such as 'java.util.Map' 56

Fichiers

fr/paris/lutece/plugins/rest/business/resourceinfo/AbstractResourceInfo.java

Rule Violation Priority Ligne
MissingOverride The method 'setKey(String)' is missing an @Override annotation. 3 6265
MissingOverride The method 'getKey()' is missing an @Override annotation. 3 7073
MissingOverride The method 'setValue(String)' is missing an @Override annotation. 3 7881
MissingOverride The method 'getValue()' is missing an @Override annotation. 3 8689
MissingOverride The method 'setListChildren(List)' is missing an @Override annotation. 3 9497
MissingOverride The method 'getListChildren()' is missing an @Override annotation. 3 102105
MissingOverride The method 'hasChildren()' is missing an @Override annotation. 3 110113

fr/paris/lutece/plugins/rest/business/resourceinfo/ResourceInfo.java

Rule Violation Priority Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 3 5155
MissingOverride The method 'setResourceInfo(ResourceInfo)' is missing an @Override annotation. 3 6065

fr/paris/lutece/plugins/rest/filter/LuteceJerseyLoggingFilter.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 55208
FieldNamingConventions The constant name 'mapper' doesn't match '[A-Z][A-Z_0-9]*' 1 58
CommentRequired Public method and constructor comments are required 3 7274
UncommentedEmptyConstructor Document empty constructor 3 7274
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 7274
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 93
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 102
GuardLogStatement Logger calls should be surrounded by log level guards. 2 112
ShortVariable Avoid variables with short names like sb 3 118
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 121
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 123
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 126
ShortVariable Avoid variables with short names like sb 3 137
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 140
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 142
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 142
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 143
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 143
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 144
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 144
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 147
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 150
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'in': resource specifications are implicitly final 3 164
ShortVariable Avoid variables with short names like in 3 164
ShortVariable Avoid variables with short names like b 3 166
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 177
CommentRequired Public method and constructor comments are required 3 185195
CommentRequired Public method and constructor comments are required 3 197207

fr/paris/lutece/plugins/rest/service/LuteceApplicationResourceConfig.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 59160
CyclomaticComplexity The constructor 'LuteceApplicationResourceConfig()' has a cyclomatic complexity of 13. 3 65159
CommentRequired Public method and constructor comments are required 3 65159
CallSuperInConstructor It is a good practice to call super() in a constructor 3 65159
NPathComplexity The constructor 'LuteceApplicationResourceConfig()' has an NPath complexity of 304 3 65159
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 99
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 153

fr/paris/lutece/plugins/rest/service/LuteceJerseySpringServlet.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.rest.service.mediatype.MediaTypeMapping' 4 36
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.rest.service.mediatype.RestMediaTypes' 4 37
UnusedImports Avoid unused imports such as 'org.apache.commons.lang3.StringUtils' 4 41
UnusedImports Avoid unused imports such as 'org.apache.log4j.Level' 4 43
UnusedImports Avoid unused imports such as 'org.glassfish.jersey.server.ResourceConfig' 4 46
UnusedImports Avoid unused imports such as 'java.util.List' 4 55
UnusedImports Avoid unused imports such as 'java.util.Map' 4 56
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the LOGGER field if you want a default access modifier 3 76
DefaultPackage Use explicit scoping instead of the default package private level 3 76
ShortVariable Avoid variables with short names like ra 3 143

fr/paris/lutece/plugins/rest/service/RestConstants.java

Rule Violation Priority Ligne
ClassNamingConventions The utility class name 'RestConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 3958

fr/paris/lutece/plugins/rest/service/mapper/GenericUncaughtExceptionMapper.java

Rule Violation Priority Ligne
CommentRequired Protected method constructor comments are required 3 65
CommentRequired Protected method constructor comments are required 3 67
CommentRequired Protected method constructor comments are required 3 69

fr/paris/lutece/plugins/rest/service/mapper/GenericUncaughtJerseyExceptionMapper.java

Rule Violation Priority Ligne
CommentRequired Protected method constructor comments are required 3 63

fr/paris/lutece/plugins/rest/service/mediatype/RestMediaTypes.java

Rule Violation Priority Ligne
ClassNamingConventions The utility class name 'RestMediaTypes' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 4463

fr/paris/lutece/plugins/rest/service/param/AbstractParam.java

Rule Violation Priority Ligne
FieldNamingConventions The final field name '_strOriginalParam' doesn't match '[a-z][a-zA-Z0-9]*' 1 48
FieldNamingConventions The final field name '_value' doesn't match '[a-z][a-zA-Z0-9]*' 1 49
AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 3 59
AvoidCatchingThrowable A catch statement should never catch throwable since it includes errors. 3 67
ConstructorCallsOverridableMethod Overridable method 'onError' called during object construction 1 69
ShortVariable Avoid variables with short names like e 3 112
ShortVariable Avoid variables with short names like e 3 126

fr/paris/lutece/plugins/rest/service/resourceinfo/AbstractResourceInfoProvider.java

Rule Violation Priority Ligne
AbstractClassWithoutAnyMethod No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 1 4143

fr/paris/lutece/plugins/rest/service/resourceinfo/ResourceInfoManager.java

Rule Violation Priority Ligne
ClassNamingConventions The utility class name 'ResourceInfoManager' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 4888
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 76

fr/paris/lutece/plugins/rest/service/writers/AbstractWriter.java

Rule Violation Priority Ligne
MissingOverride The method 'getSize(List, Class, Type, Annotation, MediaType)' is missing an @Override annotation. 3 9295
MissingOverride The method 'writeTo(List, Class, Type, Annotation, MediaType, MultivaluedMap, OutputStream)' is missing an @Override annotation. 3 100158
CyclomaticComplexity The method 'writeTo(List, Class, Type, Annotation, MediaType, MultivaluedMap, OutputStream)' has a cyclomatic complexity of 11. 3 100158
AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 3 101
ConfusingTernary Avoid if (x != y) ..; else ..; 3 103157
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 105
ConfusingTernary Avoid if (x != y) ..; else ..; 3 114142
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 116
ConfusingTernary Avoid if (x != y) ..; else ..; 3 120127
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 130

fr/paris/lutece/plugins/rest/util/xml/XMLUtil.java

Rule Violation Priority Ligne
AddEmptyString Do not add empty strings 3 70