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/vault/business/Environnement.java

Rule Violation Ligne
FormalParameterNamingConventions The method parameter name '_strPath' doesn't match '[a-z][a-zA-Z0-9]*' 166
FormalParameterNamingConventions The method parameter name '_strType' doesn't match '[a-z][a-zA-Z0-9]*' 187
FormalParameterNamingConventions The method parameter name '_listProperties' doesn't match '[a-z][a-zA-Z0-9]*' 208

fr/paris/lutece/plugins/vault/business/IApplicationDAO.java

Rule Violation Ligne
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 128

fr/paris/lutece/plugins/vault/business/IEnvironnementDAO.java

Rule Violation Ligne
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 127

fr/paris/lutece/plugins/vault/business/IPropertiesDAO.java

Rule Violation Ligne
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 127

fr/paris/lutece/plugins/vault/rs/VaultAPI.java

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

fr/paris/lutece/plugins/vault/service/EnvironnementUtil.java

Rule Violation Ligne
LocalVariableNamingConventions The local variable name '_listNamesEnvironnements' doesn't match '[a-z][a-zA-Z0-9]*' 65

fr/paris/lutece/plugins/vault/service/VaultService.java

Rule Violation Ligne
LocalVariableNamingConventions The local variable name '_properties' doesn't match '[a-z][a-zA-Z0-9]*' 401

fr/paris/lutece/plugins/vault/web/PropertiesJspBean.java

Rule Violation Ligne
LocalVariableNamingConventions The local variable name '_environnement' doesn't match '[a-z][a-zA-Z0-9]*' 129

Priority 2

fr/paris/lutece/plugins/vault/web/PropertiesJspBean.java

Rule Violation Ligne
SystemPrintln System.out.println is used 278

Priority 3

fr/paris/lutece/plugins/vault/business/ApplicationDAO.java

Rule Violation Ligne
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 217220

fr/paris/lutece/plugins/vault/business/EnvironnementDAO.java

Rule Violation Ligne
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 199202

fr/paris/lutece/plugins/vault/business/EnvironnementHome.java

Rule Violation Ligne
UnusedPrivateField Avoid unused private fields such as '_count'. 60

fr/paris/lutece/plugins/vault/business/IEnvironnementDAO.java

Rule Violation Ligne
CommentRequired Public method and constructor comments are required 129
CommentRequired Public method and constructor comments are required 131

fr/paris/lutece/plugins/vault/business/IPropertiesDAO.java

Rule Violation Ligne
CommentRequired Public method and constructor comments are required 129

fr/paris/lutece/plugins/vault/business/PropertiesHome.java

Rule Violation Ligne
UnusedPrivateField Avoid unused private fields such as '_plugin'. 55

fr/paris/lutece/plugins/vault/rs/VaultAPI.java

Rule Violation Ligne
CommentRequired Header comments are required 52170
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 53170
CommentRequired Public method and constructor comments are required 5593
AvoidDuplicateLiterals The String literal "application/json" appears 4 times in this file; the first occurrence is on line 71 71
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 89
CommentRequired Public method and constructor comments are required 95125
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 121
CommentRequired Public method and constructor comments are required 127169
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 164

fr/paris/lutece/plugins/vault/service/EnvironnementUtil.java

Rule Violation Ligne
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 5081
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 6770
CommentRequired Public method and constructor comments are required 7679

fr/paris/lutece/plugins/vault/service/VaultService.java

Rule Violation Ligne
ImmutableField Private field '_listEnvAccessor' could be made final; it is only initialized in the declaration or constructor. 56
SingularField Perhaps '_listEnvSecrets' could be replaced by a local variable. 57
RedundantFieldInitializer Avoid using redundant field initializer for '_instance' 59
NonThreadSafeSingleton Singleton is not thread safe 8388
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 118
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 118
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 151
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 151
CommentRequired Public method and constructor comments are required 167193
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 268
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 268
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 298
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 298
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'listAllSecrets' 367
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 397406
UnusedLocalVariable Avoid unused local variables such as 'appId'. 399
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'secretKV' 436
AvoidPrintStackTrace Avoid printStackTrace(); use a logger call instead. 443
AvoidPrintStackTrace Avoid printStackTrace(); use a logger call instead. 480

fr/paris/lutece/plugins/vault/service/VaultUtil.java

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 4578
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 4678
RedundantFieldInitializer Avoid using redundant field initializer for '_vault' 47

fr/paris/lutece/plugins/vault/web/AbstractManageApplicationJspBean.java

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 50117
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 116
DefaultPackage Use explicit scoping instead of the default package private level 116

fr/paris/lutece/plugins/vault/web/ApplicationJspBean.java

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 62299
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 125
DefaultPackage Use explicit scoping instead of the default package private level 137144
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 138144
ConfusingTernary Avoid if (x != y) ..; else ..; 164

fr/paris/lutece/plugins/vault/web/EnvironnementJspBean.java

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 66409
ConfusingTernary Avoid if (x != y) ..; else ..; 140
DefaultPackage Use explicit scoping instead of the default package private level 163170
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 164170
ConfusingTernary Avoid if (x != y) ..; else ..; 192
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 373
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 374
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 377
UnusedLocalVariable Avoid unused local variables such as 'nIdApp'. 377

fr/paris/lutece/plugins/vault/web/PropertiesJspBean.java

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 64324
SingularField Perhaps '_listIdProperties' could be replaced by a local variable. 112
UnusedPrivateField Avoid unused private fields such as '_listIdProperties'. 112
SingularField Perhaps '_listProperties' could be replaced by a local variable. 113
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 125
ConfusingTernary Avoid if (x != y) ..; else ..; 165
UnusedLocalVariable Avoid unused local variables such as 'nIdApp'. 192
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 192
EmptyIfStmt Avoid empty if statements 310311
DefaultPackage Use explicit scoping instead of the default package private level 319323
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 320323

Priority 4

fr/paris/lutece/plugins/vault/business/EnvironnementHome.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.vault.rs.VaultAPI' 38
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.vault.service.VaultUtil' 41
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.i18n.I18nService' 42

fr/paris/lutece/plugins/vault/business/Properties.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'java.util.List' 39

fr/paris/lutece/plugins/vault/business/PropertiesHome.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.spring.SpringContextService' 41
UnusedImports Avoid unused imports such as 'fr.paris.lutece.util.ReferenceList' 42
UnusedImports Avoid unused imports such as 'java.util.List' 44
UnusedImports Avoid unused imports such as 'java.util.Optional' 45
UnusedImports Avoid unused imports such as 'org.springframework.context.i18n.LocaleContextHolder.getLocale' 47

fr/paris/lutece/plugins/vault/service/EnvironnementUtil.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.util.mvc.utils.MVCMessage' 38
UnusedImports Avoid unused imports such as 'fr.paris.lutece.util.ErrorMessage' 39
UnusedImports Avoid unused imports such as 'java.util.ArrayList' 42
UnusedImports Avoid unused imports such as 'java.util.List' 43

fr/paris/lutece/plugins/vault/web/EnvironnementJspBean.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.vault.service.VaultUtil' 42

fr/paris/lutece/plugins/vault/web/PropertiesJspBean.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.vault.service.VaultService' 39
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.vault.service.VaultUtil' 40
UnusedImports Avoid unused imports such as 'fr.paris.lutece.util.html.AbstractPaginator' 50
UnusedImports Avoid unused imports such as 'java.util.Comparator' 52
UnusedImports Avoid unused imports such as 'java.util.stream.Collectors' 57

Fichiers

fr/paris/lutece/plugins/vault/business/ApplicationDAO.java

Rule Violation Priority Ligne
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 217220

fr/paris/lutece/plugins/vault/business/Environnement.java

Rule Violation Priority Ligne
FormalParameterNamingConventions The method parameter name '_strPath' doesn't match '[a-z][a-zA-Z0-9]*' 1 166
FormalParameterNamingConventions The method parameter name '_strType' doesn't match '[a-z][a-zA-Z0-9]*' 1 187
FormalParameterNamingConventions The method parameter name '_listProperties' doesn't match '[a-z][a-zA-Z0-9]*' 1 208

fr/paris/lutece/plugins/vault/business/EnvironnementDAO.java

Rule Violation Priority Ligne
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 199202

fr/paris/lutece/plugins/vault/business/EnvironnementHome.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.vault.rs.VaultAPI' 4 38
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.vault.service.VaultUtil' 4 41
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.i18n.I18nService' 4 42
UnusedPrivateField Avoid unused private fields such as '_count'. 3 60

fr/paris/lutece/plugins/vault/business/IApplicationDAO.java

Rule Violation Priority Ligne
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 1 128

fr/paris/lutece/plugins/vault/business/IEnvironnementDAO.java

Rule Violation Priority Ligne
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 1 127
CommentRequired Public method and constructor comments are required 3 129
CommentRequired Public method and constructor comments are required 3 131

fr/paris/lutece/plugins/vault/business/IPropertiesDAO.java

Rule Violation Priority Ligne
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 1 127
CommentRequired Public method and constructor comments are required 3 129

fr/paris/lutece/plugins/vault/business/Properties.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'java.util.List' 4 39

fr/paris/lutece/plugins/vault/business/PropertiesHome.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.spring.SpringContextService' 4 41
UnusedImports Avoid unused imports such as 'fr.paris.lutece.util.ReferenceList' 4 42
UnusedImports Avoid unused imports such as 'java.util.List' 4 44
UnusedImports Avoid unused imports such as 'java.util.Optional' 4 45
UnusedImports Avoid unused imports such as 'org.springframework.context.i18n.LocaleContextHolder.getLocale' 4 47
UnusedPrivateField Avoid unused private fields such as '_plugin'. 3 55

fr/paris/lutece/plugins/vault/rs/VaultAPI.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 52170
ClassNamingConventions The utility class name 'VaultAPI' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 52170
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 3 53170
CommentRequired Public method and constructor comments are required 3 5593
AvoidDuplicateLiterals The String literal "application/json" appears 4 times in this file; the first occurrence is on line 71 3 71
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 89
CommentRequired Public method and constructor comments are required 3 95125
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 121
CommentRequired Public method and constructor comments are required 3 127169
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 164

fr/paris/lutece/plugins/vault/service/EnvironnementUtil.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.util.mvc.utils.MVCMessage' 4 38
UnusedImports Avoid unused imports such as 'fr.paris.lutece.util.ErrorMessage' 4 39
UnusedImports Avoid unused imports such as 'java.util.ArrayList' 4 42
UnusedImports Avoid unused imports such as 'java.util.List' 4 43
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 3 5081
LocalVariableNamingConventions The local variable name '_listNamesEnvironnements' doesn't match '[a-z][a-zA-Z0-9]*' 1 65
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 6770
CommentRequired Public method and constructor comments are required 3 7679

fr/paris/lutece/plugins/vault/service/VaultService.java

Rule Violation Priority Ligne
ImmutableField Private field '_listEnvAccessor' could be made final; it is only initialized in the declaration or constructor. 3 56
SingularField Perhaps '_listEnvSecrets' could be replaced by a local variable. 3 57
RedundantFieldInitializer Avoid using redundant field initializer for '_instance' 3 59
NonThreadSafeSingleton Singleton is not thread safe 3 8388
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 118
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 118
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 151
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 151
CommentRequired Public method and constructor comments are required 3 167193
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 268
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 268
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 298
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 298
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'listAllSecrets' 3 367
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 397406
UnusedLocalVariable Avoid unused local variables such as 'appId'. 3 399
LocalVariableNamingConventions The local variable name '_properties' doesn't match '[a-z][a-zA-Z0-9]*' 1 401
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'secretKV' 3 436
AvoidPrintStackTrace Avoid printStackTrace(); use a logger call instead. 3 443
AvoidPrintStackTrace Avoid printStackTrace(); use a logger call instead. 3 480

fr/paris/lutece/plugins/vault/service/VaultUtil.java

Rule Violation Priority Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 4578
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 3 4678
RedundantFieldInitializer Avoid using redundant field initializer for '_vault' 3 47

fr/paris/lutece/plugins/vault/web/AbstractManageApplicationJspBean.java

Rule Violation Priority Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 50117
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 116
DefaultPackage Use explicit scoping instead of the default package private level 3 116

fr/paris/lutece/plugins/vault/web/ApplicationJspBean.java

Rule Violation Priority Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 62299
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 125
DefaultPackage Use explicit scoping instead of the default package private level 3 137144
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 138144
ConfusingTernary Avoid if (x != y) ..; else ..; 3 164

fr/paris/lutece/plugins/vault/web/EnvironnementJspBean.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.vault.service.VaultUtil' 4 42
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 66409
ConfusingTernary Avoid if (x != y) ..; else ..; 3 140
DefaultPackage Use explicit scoping instead of the default package private level 3 163170
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 164170
ConfusingTernary Avoid if (x != y) ..; else ..; 3 192
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 373
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 374
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 377
UnusedLocalVariable Avoid unused local variables such as 'nIdApp'. 3 377

fr/paris/lutece/plugins/vault/web/PropertiesJspBean.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.vault.service.VaultService' 4 39
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.vault.service.VaultUtil' 4 40
UnusedImports Avoid unused imports such as 'fr.paris.lutece.util.html.AbstractPaginator' 4 50
UnusedImports Avoid unused imports such as 'java.util.Comparator' 4 52
UnusedImports Avoid unused imports such as 'java.util.stream.Collectors' 4 57
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 64324
SingularField Perhaps '_listIdProperties' could be replaced by a local variable. 3 112
UnusedPrivateField Avoid unused private fields such as '_listIdProperties'. 3 112
SingularField Perhaps '_listProperties' could be replaced by a local variable. 3 113
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 125
LocalVariableNamingConventions The local variable name '_environnement' doesn't match '[a-z][a-zA-Z0-9]*' 1 129
ConfusingTernary Avoid if (x != y) ..; else ..; 3 165
UnusedLocalVariable Avoid unused local variables such as 'nIdApp'. 3 192
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 192
SystemPrintln System.out.println is used 2 278
EmptyIfStmt Avoid empty if statements 3 310311
DefaultPackage Use explicit scoping instead of the default package private level 3 319323
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 320323