PMD Results

The following document contains the results of PMD 6.4.0.

Files

cn/home1/cloud/config/server/ConfigServer.java

Violation Priority Line
Avoid unused private fields such as 'environment'. 3 83
Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 144
Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 145
A method should have only one exit point, and that should be the last statement in the method 3 146

cn/home1/cloud/config/server/environment/GitParentSupportMultipleJGitEnvironmentRepository.java

Violation Priority Line
Parameter 'environment' is not assigned and could be declared final 3 29
The method 'findOne(String, String, String)' has a NCSS line count of 19. 3 3470
Use one line for each declaration, it enhances code readability. 4 41
Avoid assignments in operands 3 42
The method 'getParentEnvironment(Environment, String)' has a NCSS line count of 21. 3 73104
A method should have only one exit point, and that should be the last statement in the method 3 76

cn/home1/cloud/config/server/security/ApplicationConfigSecurity.java

Violation Priority Line
The method 'checkAuthentication(String, String)' has a NCSS line count of 21. 3 3969
Avoid using Literals in Conditional Statements 3 49
To avoid mistakes add a comment at the beginning of the isRequestValid method if you want a default access modifier 3 7189

cn/home1/cloud/config/server/security/ApplicationSecurityAutoConfiguration.java

Violation Priority Line
Parameter 'publisher' is not assigned and could be declared final 3 51
To avoid mistakes add a comment at the beginning of the ApplicationWebSecurityConfigurerAdapter nested class if you want a default access modifier 3 59153
Avoid unused private fields such as 'managementContextPath'. 3 81
Overriding method merely calls super 3 8486
The method 'userDetailsService()' is missing an @Override annotation. 3 145152

cn/home1/cloud/config/server/security/ConfigSecurity.java

Violation Priority Line
To avoid mistakes add a comment at the beginning of the TOKEN_PREFIX field if you want a default access modifier 3 36
To avoid mistakes add a comment at the beginning of the decryptProperty method if you want a default access modifier 3 6372
The method 'encryptParentPassword(String, String, String)' has a NCSS line count of 13. 3 99131
Rather than using a lot of String arguments, consider using a container object for those values. 3 142
The method 'verifyParentPassword(String, String, String, String)' has a NCSS line count of 28. 3 142185
Avoid declaring a variable if it is unreferenced before a possible exit point. 3 160
Avoid unused local variables such as 'random'. 3 160
A method should have only one exit point, and that should be the last statement in the method 3 170
To avoid mistakes add a comment at the beginning of the isPasswordMatch method if you want a default access modifier 3 187189
To avoid mistakes add a comment at the beginning of the decryptProperty method if you want a default access modifier 3 191193

cn/home1/cloud/config/server/security/GitFileConfigUserDetailsService.java

Violation Priority Line
The method 'loadUserByUsername(String)' has a NCSS line count of 32. 3 58104
The method 'loadUserByUsername(String)' has a cyclomatic complexity of 11. 3 58104
A method should have only one exit point, and that should be the last statement in the method 3 60
A method should have only one exit point, and that should be the last statement in the method 3 66
A method should have only one exit point, and that should be the last statement in the method 3 70
Avoid declaring a variable if it is unreferenced before a possible exit point. 3 9293
To avoid mistakes add a comment at the beginning of the findExpectedPassword method if you want a default access modifier 3 106117
To avoid mistakes add a comment at the beginning of the findExpectedPassword method if you want a default access modifier 3 119135

cn/home1/cloud/config/server/security/PrivilegedUserProperties.java

Violation Priority Line
Avoid the use of value in annotations when its the only element 3 25
Avoid unused private methods such as 'init()'. 3 47

cn/home1/cloud/config/server/ssh/CustomJschConfigSessionFactory.java

Violation Priority Line
It is a good practice to call super() in a constructor 3 2123
The user-supplied array 'identityKeyPaths' is stored directly. 3 21

cn/home1/cloud/config/server/ssh/DeployKey.java

Violation Priority Line
JUnit 4 tests that set up tests should use the @Before annotation 3 3048
Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 1 52
Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 1 61

cn/home1/cloud/config/server/util/Consts.java

Violation Priority Line
This abstract class does not have any abstract methods 3 816
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 1 816

cn/home1/cloud/config/server/util/EnvironmentUtils.java

Violation Priority Line
This abstract class does not have any abstract methods 3 1695
Do not add empty strings 3 45
The method 'getParentApplication(Environment)' has a NCSS line count of 13. 3 6383
A method should have only one exit point, and that should be the last statement in the method 3 65
A method should have only one exit point, and that should be the last statement in the method 3 70

cn/home1/cloud/config/server/util/ResourceUtils.java

Violation Priority Line
This abstract class does not have any abstract methods 3 1956
The method 'findResourceFile(String, String)' has a NCSS line count of 17. 3 2955
In J2EE, getClassLoader() might not work as expected. Use Thread.currentThread().getContextClassLoader() instead. 3 36
This call to String.startsWith can be rewritten using String.charAt(0) 3 42