PMD Results

The following document contains the results of PMD 5.3.5.

Files

cn/home1/oss/boot/autoconfigure/AppProperties.java

Violation Line
Document empty method body 114115

cn/home1/oss/boot/autoconfigure/AppUtils.java

Violation Line
Abstract classes should be named AbstractXXX 1453
This abstract class does not have any abstract methods 1453
A class which only has private constructors should be final 1453

cn/home1/oss/boot/autoconfigure/PathUtils.java

Violation Line
A class which only has private constructors should be final 1298
Abstract classes should be named AbstractXXX 1298
This abstract class does not have any abstract methods 1298
Local variable 'matcher' could be declared final 53
Do not add empty strings 63

cn/home1/oss/lib/common/BasicAuthUtils.java

Violation Line
A class which only has private constructors should be final 1589
Abstract classes should be named AbstractXXX 1589
This abstract class does not have any abstract methods 1589
In J2EE, getClassLoader() might not work as expected. Use Thread.currentThread().getContextClassLoader() instead. 26
New exception is thrown in catch block, original stack trace may be lost 5659

cn/home1/oss/lib/common/CodecUtils.java

Violation Line
A class which only has private constructors should be final 1275
This abstract class does not have any abstract methods 1275
Abstract classes should be named AbstractXXX 1275
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 53

cn/home1/oss/lib/common/CurlUtils.java

Violation Line
A class which only has private constructors should be final 40134
Abstract classes should be named AbstractXXX 40134
This abstract class does not have any abstract methods 40134
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 4546
A method should have only one exit point, and that should be the last statement in the method 128

cn/home1/oss/lib/common/DateTimeFormatterWrapper.java

Violation Line
It is a good practice to call super() in a constructor 1921

cn/home1/oss/lib/common/Defaults.java

Violation Line
Abstract classes should be named AbstractXXX 1653
This abstract class does not have any abstract methods 1653
A class which only has private constructors should be final 1653
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 21
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 23
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 25
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 27
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 29
Variables that are final and static should be all capitals, 'yyyyMMdd_HHmmss' is not all capitals. 29
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 30
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 46
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 47
Unnecessary use of fully qualified name 'DateTimeFormat.forPattern' due to existing static import 'org.joda.time.format.DateTimeFormat.forPattern' 51

cn/home1/oss/lib/common/Jackson2Configurator.java

Violation Line
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 42
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 43
When instantiating a SimpleDateFormat object, specify a Locale 116

cn/home1/oss/lib/common/Jackson2Utils.java

Violation Line
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 2834

cn/home1/oss/lib/common/JaxbMapAdapter.java

Violation Line
Local variable 'node' could be declared final 24
Local variable 'node' could be declared final 28
Local variable 'child' could be declared final 29

cn/home1/oss/lib/common/JaxbMapWrapper.java

Violation Line
Avoid unused private fields such as 'elements'. 18
Private field 'elements' could be made final; it is only initialized in the declaration or constructor. 18

cn/home1/oss/lib/common/JaxbUtils.java

Violation Line
Parameter 's' is not assigned and could be declared final 64
Parameter 'date' is not assigned and could be declared final 69

cn/home1/oss/lib/common/RequestUtlis.java

Violation Line
Abstract classes should be named AbstractXXX 1551
A class which only has private constructors should be final 1551
This abstract class does not have any abstract methods 1551
A method should have only one exit point, and that should be the last statement in the method 41

cn/home1/oss/lib/common/crypto/AesCbcKey.java

Violation Line
Perhaps 'keySpec' could be replaced by a local variable. 25
Avoid unused private fields such as 'keySpec'. 25
Field keySpec has the same name as a method 25
Avoid unused private fields such as 'cbcIv'. 27
Perhaps 'cbcIv' could be replaced by a local variable. 27
Perhaps 'cbcIvLength' could be replaced by a local variable. 29
Field cbcIvLength has the same name as a method 29
Avoid unused private fields such as 'cbcIvLength'. 29
Unnecessary use of fully qualified name 'Preconditions.checkArgument' due to existing static import 'com.google.common.base.Preconditions.checkArgument' 42

cn/home1/oss/lib/common/crypto/AesException.java

Violation Line
Avoid unused private fields such as 'aesError'. 9

cn/home1/oss/lib/common/crypto/AesKeyGenerator.java

Violation Line
Avoid using Literals in Conditional Statements 38

cn/home1/oss/lib/common/crypto/Cryptos.java

Violation Line
Abstract classes should be named AbstractXXX 16116
A class which only has private constructors should be final 16116
This abstract class does not have any abstract methods 16116

cn/home1/oss/lib/common/crypto/JwtKey.java

Violation Line
Perhaps 'keyExpression' could be replaced by a local variable. 17
Perhaps 'signatureAlgorithm' could be replaced by a local variable. 19
Perhaps 'signatureKey' could be replaced by a local variable. 21
Avoid unused private fields such as 'signatureKey'. 21

cn/home1/oss/lib/common/crypto/JwtKeyGenerator.java

Violation Line
Do not add empty strings 47

cn/home1/oss/lib/common/crypto/KeyExpression.java

Violation Line
Do not add empty strings 62

cn/home1/oss/lib/common/crypto/RsaKey.java

Violation Line
Avoid unused private fields such as 'rsaPublicKey'. 57
Avoid unused private fields such as 'rsaPrivateKey'. 59
Field keyFormat has the same name as a method 61
Field keySize has the same name as a method 63
Field keyType has the same name as a method 65
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 189
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 189

cn/home1/oss/lib/common/crypto/RsaKeyGenerator.java

Violation Line
Avoid unused private fields such as 'spec'. 35
Perhaps 'spec' could be replaced by a local variable. 35
Perhaps 'keyType' could be replaced by a local variable. 41
Unnecessary use of fully qualified name 'Preconditions.checkArgument' due to existing static import 'com.google.common.base.Preconditions.checkArgument' 50
Unnecessary use of fully qualified name 'Preconditions.checkArgument' due to existing static import 'com.google.common.base.Preconditions.checkArgument' 51
Avoid declaring a variable if it is unreferenced before a possible exit point. 103

cn/home1/oss/lib/common/msginterpolate/SpelMessageInterpolator.java

Violation Line
Variables that are final and static should be all capitals, 'log' is not all capitals. 28