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/address/rs/AddressRest.java

Rule Violation Ligne
FieldNamingConventions The final field name '_logger' doesn't match '[a-z][a-zA-Z0-9]*' 60

fr/paris/lutece/plugins/address/rs/Constants.java

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

fr/paris/lutece/plugins/address/service/AddressServiceProvider.java

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

fr/paris/lutece/plugins/address/service/DummyAddressService.java

Rule Violation Ligne
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 407

Priority 2

fr/paris/lutece/plugins/address/rs/AddressRest.java

Rule Violation Ligne
LoggerIsNotStaticFinal The Logger variable declaration does not contain the static and final modifiers 60

fr/paris/lutece/plugins/address/service/RestAddressService.java

Rule Violation Ligne
MoreThanOneLogger Class contains more than one logger. 61329

Priority 3

fr/paris/lutece/plugins/address/rs/AddressRest.java

Rule Violation Ligne
TooFewBranchesForASwitchStatement A switch with less than three branches is inefficient, use a if statement instead. 7985

fr/paris/lutece/plugins/address/rs/Constants.java

Rule Violation Ligne
ShortVariable Avoid variables with short names like ID 45

fr/paris/lutece/plugins/address/service/AddressServiceProvider.java

Rule Violation Ligne
ShortVariable Avoid variables with short names like id 103
ShortVariable Avoid variables with short names like id 135

fr/paris/lutece/plugins/address/service/DummyAddressService.java

Rule Violation Ligne
MissingOverride The method 'searchAddress(HttpServletRequest, String)' is missing an @Override annotation. 89157
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 102
ShortVariable Avoid variables with short names like jc 112
ShortVariable Avoid variables with short names like u 118
MissingOverride The method 'searchAddress(HttpServletRequest, String, String)' is missing an @Override annotation. 169237
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 182
ShortVariable Avoid variables with short names like jc 192
ShortVariable Avoid variables with short names like u 198
MissingOverride The method 'getGeolocalisation(HttpServletRequest, long, String, String, boolean)' is missing an @Override annotation. 251320
ShortVariable Avoid variables with short names like id 251
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 264
ShortVariable Avoid variables with short names like jc 274
ShortVariable Avoid variables with short names like u 280
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 298
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 300
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 301
ShortVariable Avoid variables with short names like id 332
MissingOverride The method 'getAdresseInfo(HttpServletRequest, long, boolean)' is missing an @Override annotation. 332395
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 345
ShortVariable Avoid variables with short names like jc 355
ShortVariable Avoid variables with short names like u 361
SignatureDeclareThrowsException A method/constructor should not explicitly throw java.lang.Exception 405
ShortVariable Avoid variables with short names like fc 409
ShortVariable Avoid variables with short names like bb 411
MissingOverride The method 'getGeolocalisation(HttpServletRequest, String, String, boolean)' is missing an @Override annotation. 531534
CommentRequired Public method and constructor comments are required 531534
MissingOverride The method 'searchAddress(HttpServletRequest, String, String, String)' is missing an @Override annotation. 540543

fr/paris/lutece/plugins/address/service/IAddressService.java

Rule Violation Ligne
ShortVariable Avoid variables with short names like id 102
UnnecessaryModifier Unnecessary modifier 'public' on method 'getGeolocalisation': the method is declared in an interface type 117
ShortVariable Avoid variables with short names like id 131

fr/paris/lutece/plugins/address/service/RestAddressService.java

Rule Violation Ligne
UnusedPrivateField Avoid unused private fields such as 'CONSTANT_KEY_NUM_DISTRICT'. 73
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 90
UnusedLocalVariable Avoid unused local variables such as 'list'. 90
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 94
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 96
ShortVariable Avoid variables with short names like ha 96
ShortVariable Avoid variables with short names like id 202
ShortVariable Avoid variables with short names like ha 230
UselessStringValueOf No need to call String.valueOf to append to a string. 232
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 283289
MissingOverride The method 'getAdresseInfo(HttpServletRequest, long, boolean)' is missing an @Override annotation. 309315
ShortVariable Avoid variables with short names like id 309
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'adresseReturn' 314

fr/paris/lutece/plugins/address/service/WebServiceAddressService.java

Rule Violation Ligne
GodClass Possible God Class (WMC=65, ATFD=69, TCC=5.138%) 73844
UseUnderscoresInNumericLiterals Number 27561 should separate every third digit with an underscore 88
MissingOverride The method 'getGeolocalisation(HttpServletRequest, String, String, boolean)' is missing an @Override annotation. 118121
MissingOverride The method 'getGeolocalisation(HttpServletRequest, long, String, String, boolean)' is missing an @Override annotation. 135183
ShortVariable Avoid variables with short names like id 135
ShortVariable Avoid variables with short names like id 197
MissingOverride The method 'getAdresseInfo(HttpServletRequest, long, boolean)' is missing an @Override annotation. 197291
ShortVariable Avoid variables with short names like jc 241
ShortVariable Avoid variables with short names like u 247
MissingOverride The method 'searchAddress(HttpServletRequest, String)' is missing an @Override annotation. 303425
NPathComplexity The method 'searchAddress(HttpServletRequest, String)' has an NPath complexity of 270 303425
ExcessiveMethodLength Avoid really long methods. 303425
CyclomaticComplexity The method 'searchAddress(HttpServletRequest, String)' has a cyclomatic complexity of 14. 303425
ShortVariable Avoid variables with short names like jc 353
ShortVariable Avoid variables with short names like u 359
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 381
MissingOverride The method 'searchAddress(HttpServletRequest, String, String)' is missing an @Override annotation. 440443
ExcessiveMethodLength Avoid really long methods. 459601
NcssCount The method 'searchAddress(HttpServletRequest, String, String, String)' has a NCSS line count of 63. 459601
NPathComplexity The method 'searchAddress(HttpServletRequest, String, String, String)' has an NPath complexity of 1026 459601
MissingOverride The method 'searchAddress(HttpServletRequest, String, String, String)' is missing an @Override annotation. 459601
CyclomaticComplexity The method 'searchAddress(HttpServletRequest, String, String, String)' has a cyclomatic complexity of 17. 459601
ShortVariable Avoid variables with short names like jc 509
ShortVariable Avoid variables with short names like u 515
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 537
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 569
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 570
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 573
CollapsibleIfStatements These nested if statements could be combined 590593
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 745
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 761
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 776
ImmutableField Private field '_idAdresse' could be made final; it is only initialized in the declaration or constructor. 785
ImmutableField Private field '_labelAdresse' could be made final; it is only initialized in the declaration or constructor. 786
MissingOverride The method 'hashCode()' is missing an @Override annotation. 827830
ShortVariable Avoid variables with short names like o 837
MissingOverride The method 'equals(Object)' is missing an @Override annotation. 837842

fr/paris/lutece/plugins/address/util/LibraryAddressUtils.java

Rule Violation Ligne
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 217
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 233
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 234

Priority 4

fr/paris/lutece/plugins/address/service/RestAddressService.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'javassist.bytecode.stackmap.BasicBlock' 52

Fichiers

fr/paris/lutece/plugins/address/rs/AddressRest.java

Rule Violation Priority Ligne
FieldNamingConventions The final field name '_logger' doesn't match '[a-z][a-zA-Z0-9]*' 1 60
LoggerIsNotStaticFinal The Logger variable declaration does not contain the static and final modifiers 2 60
TooFewBranchesForASwitchStatement A switch with less than three branches is inefficient, use a if statement instead. 3 7985

fr/paris/lutece/plugins/address/rs/Constants.java

Rule Violation Priority Ligne
ClassNamingConventions The utility class name 'Constants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 3963
ShortVariable Avoid variables with short names like ID 3 45

fr/paris/lutece/plugins/address/service/AddressServiceProvider.java

Rule Violation Priority Ligne
ClassNamingConventions The utility class name 'AddressServiceProvider' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 47149
ShortVariable Avoid variables with short names like id 3 103
ShortVariable Avoid variables with short names like id 3 135

fr/paris/lutece/plugins/address/service/DummyAddressService.java

Rule Violation Priority Ligne
MissingOverride The method 'searchAddress(HttpServletRequest, String)' is missing an @Override annotation. 3 89157
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 102
ShortVariable Avoid variables with short names like jc 3 112
ShortVariable Avoid variables with short names like u 3 118
MissingOverride The method 'searchAddress(HttpServletRequest, String, String)' is missing an @Override annotation. 3 169237
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 182
ShortVariable Avoid variables with short names like jc 3 192
ShortVariable Avoid variables with short names like u 3 198
MissingOverride The method 'getGeolocalisation(HttpServletRequest, long, String, String, boolean)' is missing an @Override annotation. 3 251320
ShortVariable Avoid variables with short names like id 3 251
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 264
ShortVariable Avoid variables with short names like jc 3 274
ShortVariable Avoid variables with short names like u 3 280
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 298
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 300
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 301
ShortVariable Avoid variables with short names like id 3 332
MissingOverride The method 'getAdresseInfo(HttpServletRequest, long, boolean)' is missing an @Override annotation. 3 332395
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 345
ShortVariable Avoid variables with short names like jc 3 355
ShortVariable Avoid variables with short names like u 3 361
SignatureDeclareThrowsException A method/constructor should not explicitly throw java.lang.Exception 3 405
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 1 407
ShortVariable Avoid variables with short names like fc 3 409
ShortVariable Avoid variables with short names like bb 3 411
MissingOverride The method 'getGeolocalisation(HttpServletRequest, String, String, boolean)' is missing an @Override annotation. 3 531534
CommentRequired Public method and constructor comments are required 3 531534
MissingOverride The method 'searchAddress(HttpServletRequest, String, String, String)' is missing an @Override annotation. 3 540543

fr/paris/lutece/plugins/address/service/IAddressService.java

Rule Violation Priority Ligne
ShortVariable Avoid variables with short names like id 3 102
UnnecessaryModifier Unnecessary modifier 'public' on method 'getGeolocalisation': the method is declared in an interface type 3 117
ShortVariable Avoid variables with short names like id 3 131

fr/paris/lutece/plugins/address/service/RestAddressService.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'javassist.bytecode.stackmap.BasicBlock' 4 52
MoreThanOneLogger Class contains more than one logger. 2 61329
UnusedPrivateField Avoid unused private fields such as 'CONSTANT_KEY_NUM_DISTRICT'. 3 73
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 90
UnusedLocalVariable Avoid unused local variables such as 'list'. 3 90
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 94
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 96
ShortVariable Avoid variables with short names like ha 3 96
ShortVariable Avoid variables with short names like id 3 202
ShortVariable Avoid variables with short names like ha 3 230
UselessStringValueOf No need to call String.valueOf to append to a string. 3 232
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 283289
MissingOverride The method 'getAdresseInfo(HttpServletRequest, long, boolean)' is missing an @Override annotation. 3 309315
ShortVariable Avoid variables with short names like id 3 309
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'adresseReturn' 3 314

fr/paris/lutece/plugins/address/service/WebServiceAddressService.java

Rule Violation Priority Ligne
GodClass Possible God Class (WMC=65, ATFD=69, TCC=5.138%) 3 73844
UseUnderscoresInNumericLiterals Number 27561 should separate every third digit with an underscore 3 88
MissingOverride The method 'getGeolocalisation(HttpServletRequest, String, String, boolean)' is missing an @Override annotation. 3 118121
MissingOverride The method 'getGeolocalisation(HttpServletRequest, long, String, String, boolean)' is missing an @Override annotation. 3 135183
ShortVariable Avoid variables with short names like id 3 135
ShortVariable Avoid variables with short names like id 3 197
MissingOverride The method 'getAdresseInfo(HttpServletRequest, long, boolean)' is missing an @Override annotation. 3 197291
ShortVariable Avoid variables with short names like jc 3 241
ShortVariable Avoid variables with short names like u 3 247
MissingOverride The method 'searchAddress(HttpServletRequest, String)' is missing an @Override annotation. 3 303425
NPathComplexity The method 'searchAddress(HttpServletRequest, String)' has an NPath complexity of 270 3 303425
ExcessiveMethodLength Avoid really long methods. 3 303425
CyclomaticComplexity The method 'searchAddress(HttpServletRequest, String)' has a cyclomatic complexity of 14. 3 303425
ShortVariable Avoid variables with short names like jc 3 353
ShortVariable Avoid variables with short names like u 3 359
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 381
MissingOverride The method 'searchAddress(HttpServletRequest, String, String)' is missing an @Override annotation. 3 440443
ExcessiveMethodLength Avoid really long methods. 3 459601
NcssCount The method 'searchAddress(HttpServletRequest, String, String, String)' has a NCSS line count of 63. 3 459601
NPathComplexity The method 'searchAddress(HttpServletRequest, String, String, String)' has an NPath complexity of 1026 3 459601
MissingOverride The method 'searchAddress(HttpServletRequest, String, String, String)' is missing an @Override annotation. 3 459601
CyclomaticComplexity The method 'searchAddress(HttpServletRequest, String, String, String)' has a cyclomatic complexity of 17. 3 459601
ShortVariable Avoid variables with short names like jc 3 509
ShortVariable Avoid variables with short names like u 3 515
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 537
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 569
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 570
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 573
CollapsibleIfStatements These nested if statements could be combined 3 590593
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 745
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 761
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 776
ImmutableField Private field '_idAdresse' could be made final; it is only initialized in the declaration or constructor. 3 785
ImmutableField Private field '_labelAdresse' could be made final; it is only initialized in the declaration or constructor. 3 786
MissingOverride The method 'hashCode()' is missing an @Override annotation. 3 827830
ShortVariable Avoid variables with short names like o 3 837
MissingOverride The method 'equals(Object)' is missing an @Override annotation. 3 837842

fr/paris/lutece/plugins/address/util/LibraryAddressUtils.java

Rule Violation Priority Ligne
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 217
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 233
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 234