PMD Results

The following document contains the results of PMD 6.4.0.

Files

spring-cloud-config-monitor - cn/home1/cloud/config/server/monitor/AbstraceNotificationExtractor.java

Violation Priority Line
The method 'addAllPaths(Set, Map, String)' has a NCSS line count of 27. 3 2965
A method should have only one exit point, and that should be the last statement in the method 3 31
A method should have only one exit point, and that should be the last statement in the method 3 38
Prefer StringBuffer over += for concatenating strings 3 59

spring-cloud-config-monitor - cn/home1/cloud/config/server/monitor/GitlabRepositoryPathNotificationExtractor.java

Violation Priority Line
The method 'extract(MultiValueMap, Map)' has a NCSS line count of 17. 3 2449

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

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

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

Violation Priority Line
The method 'findOne(String, String, String)' has a NCSS line count of 19. 3 3369
Use one line for each declaration, it enhances code readability. 4 40
Avoid assignments in operands 3 41
The method 'getParentEnvironment(Environment, String)' has a NCSS line count of 21. 3 72103
A method should have only one exit point, and that should be the last statement in the method 3 75

spring-cloud-config-server - 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

spring-cloud-config-server - cn/home1/cloud/config/server/security/ApplicationWebSecurityConfigurerAdapter.java

Violation Priority Line
Overriding method merely calls super 3 4143
Avoid unused local variables such as 'loginEndpoint'. 3 53

spring-cloud-config-server - 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
The method 'verifyParentPassword(String, String, String, String)' has a NCSS line count of 28. 3 142185
Rather than using a lot of String arguments, consider using a container object for those values. 3 142
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

spring-cloud-config-server - 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

spring-cloud-config-server - 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

spring-cloud-config-server - 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

spring-cloud-config-server - 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

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

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

spring-cloud-config-server - 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

spring-cloud-config-server - 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