PMD Results

The following document contains the results of PMD.

Summary

FilesErrors
1055

Files

FilesViolations
org/apache/commons/jelly/tags/fmt/BundleTag.java 9
org/apache/commons/jelly/tags/fmt/Config.java 1
org/apache/commons/jelly/tags/fmt/FormatDateTag.java 11
org/apache/commons/jelly/tags/fmt/MessageTag.java 10
org/apache/commons/jelly/tags/fmt/ParamTag.java 2
org/apache/commons/jelly/tags/fmt/SetBundleTag.java 3
org/apache/commons/jelly/tags/fmt/SetLocaleTag.java 10
org/apache/commons/jelly/tags/fmt/SetTimeZoneTag.java 3
org/apache/commons/jelly/tags/fmt/TimeZoneTag.java 5
org/apache/commons/jelly/tags/fmt/TestFMTSuite.java 1

org/apache/commons/jelly/tags/fmt/BundleTag.java

ViolationLine
Avoid unused imports such as 'java.util.Enumeration' 23
The class 'BundleTag' has a Cyclomatic Complexity of 3 (Highest = 13). 37
The method 'getLocalizationContext' has a Cyclomatic Complexity of 13. 159
No need to check for null before an instanceof 172
No need to check for null before an instanceof 188
Avoid empty catch blocks 208
Avoid if (x != y) ..; else ..; 213
Avoid empty 'if' statements 215
Avoid empty catch blocks 276

org/apache/commons/jelly/tags/fmt/Config.java

ViolationLine
Avoid unused imports such as 'org.apache.commons.jelly.JellyContext' 19

org/apache/commons/jelly/tags/fmt/FormatDateTag.java

ViolationLine
Avoid unused imports such as 'org.apache.commons.jelly.Tag' 20
The class 'FormatDateTag' has a Cyclomatic Complexity of 3 (Highest = 20). 40
Too many fields 40
Avoid really long methods. 91
The method 'doTag' has a Cyclomatic Complexity of 20. 91
No need to check for null before an instanceof 104
Avoid if (x != y) ..; else ..; 109
Avoid if (x != y) ..; else ..; 150
Avoid if (x != y) ..; else ..; 168
Avoid if (x != y) ..; else ..; 188
Avoid if (x != y) ..; else ..; 189

org/apache/commons/jelly/tags/fmt/MessageTag.java

ViolationLine
The class 'MessageTag' has a Cyclomatic Complexity of 3 (Highest = 16). 40
Private field could be made final. It is only initialized in the declaration or constructor. 53
The method 'doTag' has a Cyclomatic Complexity of 16. 67
Avoid if (x != y) ..; else ..; 70
No need to check for null before an instanceof 94
Avoid if (x != y) ..; else ..; 101
Avoid empty 'if' statements 111
Avoid if (x != y) ..; else ..; 145
Avoid if (x != y) ..; else ..; 146
Avoid if (x != y) ..; else ..; 154

org/apache/commons/jelly/tags/fmt/ParamTag.java

ViolationLine
Avoid if (x != y) ..; else ..; 48
Avoid if (x != y) ..; else ..; 56

org/apache/commons/jelly/tags/fmt/SetBundleTag.java

ViolationLine
Avoid unused imports such as 'java.util.Locale' 22
Avoid if (x != y) ..; else ..; 56
Avoid if (x != y) ..; else ..; 58

org/apache/commons/jelly/tags/fmt/SetLocaleTag.java

ViolationLine
The class 'SetLocaleTag' has a Cyclomatic Complexity of 4 (Highest = 11). 34
Avoid if (x != y) ..; else ..; 77
Avoid if (x != y) ..; else ..; 144
Avoid if (x != y) ..; else ..; 149
The method 'getFormattingLocale' has a Cyclomatic Complexity of 11. 208
Avoid empty 'if' statements 224
These nested if statements could be combined 233
Avoid empty 'if' statements 234
Avoid empty 'if' statements 259
These nested if statements could be combined 294

org/apache/commons/jelly/tags/fmt/SetTimeZoneTag.java

ViolationLine
Avoid unused imports such as 'org.apache.commons.jelly.Tag' 20
Avoid unused private fields such as 'var' 36
Avoid if (x != y) ..; else ..; 70

org/apache/commons/jelly/tags/fmt/TimeZoneTag.java

ViolationLine
Avoid unused imports such as 'java.util.Enumeration' 24
Avoid unused imports such as 'java.util.Locale' 25
Avoid unused imports such as 'java.util.ResourceBundle' 26
Avoid unused imports such as 'java.util.MissingResourceException' 27
Avoid if (x != y) ..; else ..; 115

org/apache/commons/jelly/tags/fmt/TestFMTSuite.java

ViolationLine
All methods are static. Consider using Singleton instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 38