The following document contains the results of PMD 6.13.0.
Rule | Violation | Line |
---|---|---|
FieldNamingConventions | The constant name 'mapper' doesn't match '[A-Z][A-Z_0-9]*' | 58 |
Rule | Violation | Line |
---|---|---|
ClassNamingConventions | The utility class name 'RestConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 39–58 |
Rule | Violation | Line |
---|---|---|
ClassNamingConventions | The utility class name 'RestMediaTypes' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 44–63 |
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 |
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. | 41–43 |
Rule | Violation | Line |
---|---|---|
ClassNamingConventions | The utility class name 'ResourceInfoManager' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 48–88 |
Rule | Violation | Line |
---|---|---|
GuardLogStatement | Logger calls should be surrounded by log level guards. | 112 |
Rule | Violation | Line |
---|---|---|
MissingOverride | The method 'setKey(String)' is missing an @Override annotation. | 62–65 |
MissingOverride | The method 'getKey()' is missing an @Override annotation. | 70–73 |
MissingOverride | The method 'setValue(String)' is missing an @Override annotation. | 78–81 |
MissingOverride | The method 'getValue()' is missing an @Override annotation. | 86–89 |
MissingOverride | The method 'setListChildren(List)' is missing an @Override annotation. | 94–97 |
MissingOverride | The method 'getListChildren()' is missing an @Override annotation. | 102–105 |
MissingOverride | The method 'hasChildren()' is missing an @Override annotation. | 110–113 |
Rule | Violation | Line |
---|---|---|
CallSuperInConstructor | It is a good practice to call super() in a constructor | 51–55 |
MissingOverride | The method 'setResourceInfo(ResourceInfo)' is missing an @Override annotation. | 60–65 |
Rule | Violation | Line |
---|---|---|
CommentRequired | Header comments are required | 55–208 |
CommentRequired | Public method and constructor comments are required | 72–74 |
UncommentedEmptyConstructor | Document empty constructor | 72–74 |
UnnecessaryConstructor | Avoid unnecessary constructors - the compiler will generate these for you | 72–74 |
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 | 185–195 |
CommentRequired | Public method and constructor comments are required | 197–207 |
Rule | Violation | Line |
---|---|---|
CommentRequired | Header comments are required | 59–160 |
CyclomaticComplexity | The constructor 'LuteceApplicationResourceConfig()' has a cyclomatic complexity of 13. | 65–159 |
CommentRequired | Public method and constructor comments are required | 65–159 |
CallSuperInConstructor | It is a good practice to call super() in a constructor | 65–159 |
NPathComplexity | The constructor 'LuteceApplicationResourceConfig()' has an NPath complexity of 304 | 65–159 |
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 |
Rule | Violation | Line |
---|---|---|
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 |
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 |
Rule | Violation | Line |
---|---|---|
CommentRequired | Protected method constructor comments are required | 63 |
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 |
Rule | Violation | Line |
---|---|---|
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 76 |
Rule | Violation | Line |
---|---|---|
MissingOverride | The method 'getSize(List, Class, Type, Annotation, MediaType)' is missing an @Override annotation. | 92–95 |
MissingOverride | The method 'writeTo(List, Class, Type, Annotation, MediaType, MultivaluedMap, OutputStream)' is missing an @Override annotation. | 100–158 |
CyclomaticComplexity | The method 'writeTo(List, Class, Type, Annotation, MediaType, MultivaluedMap, OutputStream)' has a cyclomatic complexity of 11. | 100–158 |
AvoidUncheckedExceptionsInSignatures | A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause | 101 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 103–157 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 105 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 114–142 |
AvoidLiteralsInIfCondition | Avoid using Literals in Conditional Statements | 116 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 120–127 |
AvoidLiteralsInIfCondition | Avoid using Literals in Conditional Statements | 130 |
Rule | Violation | Line |
---|---|---|
AddEmptyString | Do not add empty strings | 70 |
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 |
Rule | Violation | Priority | Line |
---|---|---|---|
MissingOverride | The method 'setKey(String)' is missing an @Override annotation. | 3 | 62–65 |
MissingOverride | The method 'getKey()' is missing an @Override annotation. | 3 | 70–73 |
MissingOverride | The method 'setValue(String)' is missing an @Override annotation. | 3 | 78–81 |
MissingOverride | The method 'getValue()' is missing an @Override annotation. | 3 | 86–89 |
MissingOverride | The method 'setListChildren(List)' is missing an @Override annotation. | 3 | 94–97 |
MissingOverride | The method 'getListChildren()' is missing an @Override annotation. | 3 | 102–105 |
MissingOverride | The method 'hasChildren()' is missing an @Override annotation. | 3 | 110–113 |
Rule | Violation | Priority | Line |
---|---|---|---|
CallSuperInConstructor | It is a good practice to call super() in a constructor | 3 | 51–55 |
MissingOverride | The method 'setResourceInfo(ResourceInfo)' is missing an @Override annotation. | 3 | 60–65 |
Rule | Violation | Priority | Line |
---|---|---|---|
CommentRequired | Header comments are required | 3 | 55–208 |
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 | 72–74 |
UncommentedEmptyConstructor | Document empty constructor | 3 | 72–74 |
UnnecessaryConstructor | Avoid unnecessary constructors - the compiler will generate these for you | 3 | 72–74 |
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 | 185–195 |
CommentRequired | Public method and constructor comments are required | 3 | 197–207 |
Rule | Violation | Priority | Line |
---|---|---|---|
CommentRequired | Header comments are required | 3 | 59–160 |
CyclomaticComplexity | The constructor 'LuteceApplicationResourceConfig()' has a cyclomatic complexity of 13. | 3 | 65–159 |
CommentRequired | Public method and constructor comments are required | 3 | 65–159 |
CallSuperInConstructor | It is a good practice to call super() in a constructor | 3 | 65–159 |
NPathComplexity | The constructor 'LuteceApplicationResourceConfig()' has an NPath complexity of 304 | 3 | 65–159 |
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 |
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 |
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 |
Rule | Violation | Priority | Line |
---|---|---|---|
ClassNamingConventions | The utility class name 'RestConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 1 | 39–58 |
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 |
Rule | Violation | Priority | Line |
---|---|---|---|
CommentRequired | Protected method constructor comments are required | 3 | 63 |
Rule | Violation | Priority | Line |
---|---|---|---|
ClassNamingConventions | The utility class name 'RestMediaTypes' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 1 | 44–63 |
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 |
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 | 41–43 |
Rule | Violation | Priority | Line |
---|---|---|---|
ClassNamingConventions | The utility class name 'ResourceInfoManager' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 1 | 48–88 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 76 |
Rule | Violation | Priority | Line |
---|---|---|---|
MissingOverride | The method 'getSize(List, Class, Type, Annotation, MediaType)' is missing an @Override annotation. | 3 | 92–95 |
MissingOverride | The method 'writeTo(List, Class, Type, Annotation, MediaType, MultivaluedMap, OutputStream)' is missing an @Override annotation. | 3 | 100–158 |
CyclomaticComplexity | The method 'writeTo(List, Class, Type, Annotation, MediaType, MultivaluedMap, OutputStream)' has a cyclomatic complexity of 11. | 3 | 100–158 |
AvoidUncheckedExceptionsInSignatures | A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause | 3 | 101 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 103–157 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 105 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 114–142 |
AvoidLiteralsInIfCondition | Avoid using Literals in Conditional Statements | 3 | 116 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 120–127 |
AvoidLiteralsInIfCondition | Avoid using Literals in Conditional Statements | 3 | 130 |
Rule | Violation | Priority | Line |
---|---|---|---|
AddEmptyString | Do not add empty strings | 3 | 70 |