Fork me on GitHub

PMD Results

The following document contains the results of PMD 6.13.0.

Violations By Priority

Priority 1

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

Rule Violation Line
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 Line
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 Line
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 Line
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 Line
ClassNamingConventions The utility class name 'ResourceInfoManager' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 4888

Priority 3

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

Rule Violation Line
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 Line
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/service/LuteceApplicationResourceConfig.java

Rule Violation Line
CommentRequired Header comments are required 58152
CallSuperInConstructor It is a good practice to call super() in a constructor 63151
CyclomaticComplexity The constructor 'LuteceApplicationResourceConfig()' has a cyclomatic complexity of 12. 63151
CommentRequired Public method and constructor comments are required 63151
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 91
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 145

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

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

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

Rule Violation Line
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 Line
CommentRequired Protected method constructor comments are required 63

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

Rule Violation Line
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 Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 76

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

Rule Violation Line
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 Line
AddEmptyString Do not add empty strings 70

Priority 4

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

Rule Violation Line
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

Files

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

Rule Violation Priority Line
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 Line
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/service/LuteceApplicationResourceConfig.java

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

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

Rule Violation Priority Line
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
DefaultPackage Use explicit scoping instead of the default package private level 3 76
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the LOGGER field if you want a default access modifier 3 76
ShortVariable Avoid variables with short names like ra 3 143

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

Rule Violation Priority Line
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 Line
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 Line
CommentRequired Protected method constructor comments are required 3 63

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

Rule Violation Priority Line
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 Line
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 Line
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 Line
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 Line
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 Line
AddEmptyString Do not add empty strings 3 70