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 114–115

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

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

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

Violation Line
A class which only has private constructors should be final 12–98
Abstract classes should be named AbstractXXX 12–98
This abstract class does not have any abstract methods 12–98
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 15–89
Abstract classes should be named AbstractXXX 15–89
This abstract class does not have any abstract methods 15–89
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 56–59

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

Violation Line
A class which only has private constructors should be final 12–75
This abstract class does not have any abstract methods 12–75
Abstract classes should be named AbstractXXX 12–75
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 40–134
Abstract classes should be named AbstractXXX 40–134
This abstract class does not have any abstract methods 40–134
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 45–46
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 19–21

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

Violation Line
Abstract classes should be named AbstractXXX 16–53
This abstract class does not have any abstract methods 16–53
A class which only has private constructors should be final 16–53
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. 28–34

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 15–51
A class which only has private constructors should be final 15–51
This abstract class does not have any abstract methods 15–51
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 16–116
A class which only has private constructors should be final 16–116
This abstract class does not have any abstract methods 16–116

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