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/resource/business/ResourceTypeDefaultImplementation.java

Rule Violation Line
FieldNamingConventions The final field name '_strResourceTypeName' doesn't match '[a-z][a-zA-Z0-9]*' 41
FieldNamingConventions The final field name '_strResourceTypeDescription' doesn't match '[a-z][a-zA-Z0-9]*' 42

fr/paris/lutece/plugins/resource/service/ResourceCacheService.java

Rule Violation Line
FieldNamingConventions The constant name '_instance' doesn't match '[A-Z][A-Z_0-9]*' 50

fr/paris/lutece/plugins/resource/service/ResourceService.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 47206

fr/paris/lutece/plugins/resource/service/listeners/DatabaseResourceTypeRemovalManager.java

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

Priority 2

fr/paris/lutece/plugins/resource/service/ResourceService.java

Rule Violation Line
AvoidUsingVolatile Use of modifier volatile is not recommended. 50

Priority 3

fr/paris/lutece/plugins/resource/business/database/DatabaseResource.java

Rule Violation Line
CloneThrowsCloneNotSupportedException clone() method should throw CloneNotSupportedException 120132

fr/paris/lutece/plugins/resource/business/database/DatabaseResourceDAO.java

Rule Violation Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 100113
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 201
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 202
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 241
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 243
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 244

fr/paris/lutece/plugins/resource/business/database/DatabaseResourceSort.java

Rule Violation Line
ImmutableField Private field '_strSort' could be made final; it is only initialized in the declaration or constructor. 45
ImmutableField Private field '_bSortAsc' could be made final; it is only initialized in the declaration or constructor. 46

fr/paris/lutece/plugins/resource/business/database/DatabaseResourceType.java

Rule Violation Line
CloneThrowsCloneNotSupportedException clone() method should throw CloneNotSupportedException 103115

fr/paris/lutece/plugins/resource/service/ResourceCacheService.java

Rule Violation Line
CallSuperInConstructor It is a good practice to call super() in a constructor 5558
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 113
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 114

fr/paris/lutece/plugins/resource/service/ResourceService.java

Rule Violation Line
NonThreadSafeSingleton Singleton is not thread safe 6770

fr/paris/lutece/plugins/resource/service/listeners/DatabaseResourceTypeRemovalManager.java

Rule Violation Line
LinguisticNaming Linguistics Antipattern - The method 'canResourceTypeBeRemoved' indicates linguistically it returns a boolean, but it returns 'String' 6273

fr/paris/lutece/plugins/resource/service/listeners/DatabaseResourceTypeResourceRemovalListener.java

Rule Violation Line
ShortVariable Avoid variables with short names like id 65

fr/paris/lutece/plugins/resource/web/ResourceJspBean.java

Rule Violation Line
ImmutableField Private field '_nDefaultItemsPerPage' could be made final; it is only initialized in the declaration or constructor. 120
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 135
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 176
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 196
ConfusingTernary Avoid if (x != y) ..; else ..; 199
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 208
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 212
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 224
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 238
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 252
ConfusingTernary Avoid if (x != y) ..; else ..; 255
ConfusingTernary Avoid if (x != y) ..; else ..; 262
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 263
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 265
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 280
ConfusingTernary Avoid if (x != y) ..; else ..; 283
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 301
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 315
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 339

fr/paris/lutece/plugins/resource/web/ResourceTypeJspBean.java

Rule Violation Line
ImmutableField Private field '_nDefaultItemsPerPage' could be made final; it is only initialized in the declaration or constructor. 100
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 121
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 139
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 147
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 186
ConfusingTernary Avoid if (x != y) ..; else ..; 193208
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 196
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 248
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 283
ConfusingTernary Avoid if (x != y) ..; else ..; 304312

Priority 4

fr/paris/lutece/plugins/resource/business/database/DatabaseResourceSort.java

Rule Violation Line
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 7780

Files

fr/paris/lutece/plugins/resource/business/ResourceTypeDefaultImplementation.java

Rule Violation Priority Line
FieldNamingConventions The final field name '_strResourceTypeName' doesn't match '[a-z][a-zA-Z0-9]*' 1 41
FieldNamingConventions The final field name '_strResourceTypeDescription' doesn't match '[a-z][a-zA-Z0-9]*' 1 42

fr/paris/lutece/plugins/resource/business/database/DatabaseResource.java

Rule Violation Priority Line
CloneThrowsCloneNotSupportedException clone() method should throw CloneNotSupportedException 3 120132

fr/paris/lutece/plugins/resource/business/database/DatabaseResourceDAO.java

Rule Violation Priority Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 100113
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 201
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 202
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 241
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 243
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 244

fr/paris/lutece/plugins/resource/business/database/DatabaseResourceSort.java

Rule Violation Priority Line
ImmutableField Private field '_strSort' could be made final; it is only initialized in the declaration or constructor. 3 45
ImmutableField Private field '_bSortAsc' could be made final; it is only initialized in the declaration or constructor. 3 46
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 7780

fr/paris/lutece/plugins/resource/business/database/DatabaseResourceType.java

Rule Violation Priority Line
CloneThrowsCloneNotSupportedException clone() method should throw CloneNotSupportedException 3 103115

fr/paris/lutece/plugins/resource/service/ResourceCacheService.java

Rule Violation Priority Line
FieldNamingConventions The constant name '_instance' doesn't match '[A-Z][A-Z_0-9]*' 1 50
CallSuperInConstructor It is a good practice to call super() in a constructor 3 5558
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 113
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 114

fr/paris/lutece/plugins/resource/service/ResourceService.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 47206
AvoidUsingVolatile Use of modifier volatile is not recommended. 2 50
NonThreadSafeSingleton Singleton is not thread safe 3 6770

fr/paris/lutece/plugins/resource/service/listeners/DatabaseResourceTypeRemovalManager.java

Rule Violation Priority Line
ClassNamingConventions The utility class name 'DatabaseResourceTypeRemovalManager' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 4374
LinguisticNaming Linguistics Antipattern - The method 'canResourceTypeBeRemoved' indicates linguistically it returns a boolean, but it returns 'String' 3 6273

fr/paris/lutece/plugins/resource/service/listeners/DatabaseResourceTypeResourceRemovalListener.java

Rule Violation Priority Line
ShortVariable Avoid variables with short names like id 3 65

fr/paris/lutece/plugins/resource/web/ResourceJspBean.java

Rule Violation Priority Line
ImmutableField Private field '_nDefaultItemsPerPage' could be made final; it is only initialized in the declaration or constructor. 3 120
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 135
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 176
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 196
ConfusingTernary Avoid if (x != y) ..; else ..; 3 199
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 208
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 212
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 224
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 238
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 252
ConfusingTernary Avoid if (x != y) ..; else ..; 3 255
ConfusingTernary Avoid if (x != y) ..; else ..; 3 262
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 263
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 265
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 280
ConfusingTernary Avoid if (x != y) ..; else ..; 3 283
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 301
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 315
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 339

fr/paris/lutece/plugins/resource/web/ResourceTypeJspBean.java

Rule Violation Priority Line
ImmutableField Private field '_nDefaultItemsPerPage' could be made final; it is only initialized in the declaration or constructor. 3 100
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 121
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 139
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 147
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 186
ConfusingTernary Avoid if (x != y) ..; else ..; 3 193208
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 196
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 248
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 283
ConfusingTernary Avoid if (x != y) ..; else ..; 3 304312