PMD Results
The following document contains the results of PMD 6.4.0.
Files
org/apache/log4j/AppenderSkeleton.java
Violation |
Priority |
Line |
Avoid unused constructor parameters such as 'isActive'. |
3 |
50 |
Useless parentheses. |
4 |
108 |
Useless parentheses. |
4 |
108 |
org/apache/log4j/Category.java
Violation |
Priority |
Line |
Ternary operators that can be simplified with || or && |
3 |
402 |
Unnecessary use of fully qualified name 'org.apache.logging.log4j.spi.LoggerContext' due to existing import 'org.apache.logging.log4j.spi.LoggerContext' |
4 |
519 |
Unnecessary use of fully qualified name 'org.apache.logging.log4j.spi.LoggerContext' due to existing import 'org.apache.logging.log4j.spi.LoggerContext' |
4 |
524 |
org/apache/log4j/LogManager.java
Violation |
Priority |
Line |
Avoid empty catch blocks |
3 |
79–81 |
org/apache/log4j/PatternLayout.java
Violation |
Priority |
Line |
Avoid unused constructor parameters such as 'pattern'. |
3 |
27 |
org/apache/log4j/bridge/AppenderAdapter.java
Violation |
Priority |
Line |
Unnecessary use of fully qualified name 'org.apache.logging.log4j.core.Filter' due to existing import 'org.apache.logging.log4j.core.Filter' |
4 |
45 |
Unnecessary use of fully qualified name 'org.apache.logging.log4j.core.Filter' due to existing import 'org.apache.logging.log4j.core.Filter' |
4 |
49 |
org/apache/log4j/bridge/AppenderWrapper.java
Violation |
Priority |
Line |
Avoid unused imports such as 'org.apache.log4j.spi.AppenderAttachable' |
4 |
22 |
Avoid unused imports such as 'java.util.ArrayList' |
4 |
30 |
Avoid unused imports such as 'java.util.Enumeration' |
4 |
31 |
Avoid unused imports such as 'java.util.List' |
4 |
32 |
org/apache/log4j/bridge/LogEventWrapper.java
Violation |
Priority |
Line |
Overriding method merely calls super |
3 |
202–204 |
org/apache/log4j/builders/appender/AsyncAppenderBuilder.java
Violation |
Priority |
Line |
Too many static imports may lead to messy code |
3 |
17–170 |
Avoid unused imports such as 'org.apache.log4j.bridge.AppenderAdapter' |
4 |
20 |
Avoid unused imports such as 'org.apache.log4j.xml.XmlConfiguration.REF_ATTR' |
4 |
43 |
org/apache/log4j/builders/appender/ConsoleAppenderBuilder.java
Violation |
Priority |
Line |
Too many static imports may lead to messy code |
3 |
17–161 |
org/apache/log4j/builders/appender/DailyRollingFileAppenderBuilder.java
Violation |
Priority |
Line |
Too many static imports may lead to messy code |
3 |
17–192 |
Avoid unused imports such as 'org.apache.log4j.bridge.FilterAdapter' |
4 |
22 |
Avoid unused imports such as 'org.apache.log4j.bridge.FilterWrapper' |
4 |
23 |
Avoid unused method parameters such as 'append'. |
3 |
156 |
org/apache/log4j/builders/appender/FileAppenderBuilder.java
Violation |
Priority |
Line |
Too many static imports may lead to messy code |
3 |
17–180 |
Avoid unused imports such as 'org.apache.log4j.bridge.FilterAdapter' |
4 |
22 |
Avoid unused imports such as 'org.apache.log4j.bridge.FilterWrapper' |
4 |
23 |
org/apache/log4j/builders/appender/NullAppenderBuilder.java
Violation |
Priority |
Line |
Avoid unused private fields such as 'LOGGER'. |
3 |
39 |
org/apache/log4j/builders/appender/RewriteAppenderBuilder.java
Violation |
Priority |
Line |
Too many static imports may lead to messy code |
3 |
17–152 |
org/apache/log4j/builders/appender/RollingFileAppenderBuilder.java
Violation |
Priority |
Line |
Too many static imports may lead to messy code |
3 |
17–215 |
Avoid unused imports such as 'org.apache.log4j.bridge.FilterAdapter' |
4 |
22 |
Avoid unused imports such as 'org.apache.log4j.bridge.FilterWrapper' |
4 |
23 |
org/apache/log4j/builders/appender/SyslogAppenderBuilder.java
Violation |
Priority |
Line |
Too many static imports may lead to messy code |
3 |
17–173 |
Avoid unused local variables such as 'urlPort'. |
3 |
154 |
org/apache/log4j/builders/filter/DenyAllFilterBuilder.java
Violation |
Priority |
Line |
Avoid unused private fields such as 'LOGGER'. |
3 |
37 |
org/apache/log4j/builders/filter/LevelMatchFilterBuilder.java
Violation |
Priority |
Line |
Avoid unused imports such as 'org.apache.log4j.builders.BuilderManager.CATEGORY' |
4 |
35 |
Avoid duplicate imports such as 'org.apache.log4j.xml.XmlConfiguration.VALUE_ATTR' |
4 |
37 |
Avoid unused private fields such as 'LOGGER'. |
3 |
45 |
org/apache/log4j/builders/filter/LevelRangeFilterBuilder.java
Violation |
Priority |
Line |
Avoid unused imports such as 'org.apache.log4j.builders.BuilderManager.CATEGORY' |
4 |
36 |
Avoid unused private fields such as 'LOGGER'. |
3 |
45 |
org/apache/log4j/builders/filter/StringMatchFilterBuilder.java
Violation |
Priority |
Line |
Avoid unused imports such as 'java.util.Properties' |
4 |
32 |
Avoid unused imports such as 'org.apache.log4j.builders.BuilderManager.CATEGORY' |
4 |
34 |
org/apache/log4j/builders/layout/HtmlLayoutBuilder.java
Violation |
Priority |
Line |
Avoid unused imports such as 'org.apache.log4j.builders.BuilderManager.CATEGORY' |
4 |
34 |
Avoid unused private fields such as 'LOGGER'. |
3 |
43 |
org/apache/log4j/builders/layout/PatternLayoutBuilder.java
Violation |
Priority |
Line |
These nested if statements could be combined |
3 |
66–69 |
org/apache/log4j/builders/layout/SimpleLayoutBuilder.java
Violation |
Priority |
Line |
Avoid unused imports such as 'java.util.Properties' |
4 |
29 |
Avoid unused private fields such as 'LOGGER'. |
3 |
39 |
org/apache/log4j/builders/layout/TTCCLayoutBuilder.java
Violation |
Priority |
Line |
Avoid unused imports such as 'org.apache.log4j.builders.BuilderManager.CATEGORY' |
4 |
35 |
Avoid unused private fields such as 'LOGGER'. |
3 |
44 |
org/apache/log4j/builders/layout/XmlLayoutBuilder.java
Violation |
Priority |
Line |
Avoid unused private fields such as 'LOGGER'. |
3 |
44 |
org/apache/log4j/config/Log4j1Configuration.java
Violation |
Priority |
Line |
Avoid unused imports such as 'org.apache.logging.log4j.core.config.Node' |
4 |
24 |
org/apache/log4j/config/Log4j1ConfigurationConverter.java
Violation |
Priority |
Line |
Avoid modifiers which are implied by the context |
3 |
179 |
Avoid modifiers which are implied by the context |
3 |
180 |
Avoid modifiers which are implied by the context |
3 |
205 |
Avoid modifiers which are implied by the context |
3 |
205 |
org/apache/log4j/config/Log4j1ConfigurationFactory.java
Violation |
Priority |
Line |
Avoid modifiers which are implied by the context |
3 |
45 |
org/apache/log4j/config/Log4j1ConfigurationParser.java
Violation |
Priority |
Line |
These nested if statements could be combined |
3 |
150–156 |
Avoid unused private methods such as 'buildAttributeWithDefault(String,ComponentBuilder,String,String,String)'. |
3 |
267–268 |
org/apache/log4j/config/PropertiesConfiguration.java
Violation |
Priority |
Line |
Avoid unused imports such as 'org.apache.log4j.builders.BuilderManager' |
4 |
25 |
Useless parentheses. |
4 |
345 |
Useless parentheses. |
4 |
345 |
Avoid unused method parameters such as 'optionKey'. |
3 |
354 |
Useless parentheses. |
4 |
399 |
Avoid unused method parameters such as 'appenderName'. |
3 |
554 |
org/apache/log4j/helpers/OptionConverter.java
Violation |
Priority |
Line |
Unnecessary use of fully qualified name 'org.apache.log4j.Level' due to existing import 'org.apache.log4j.Level' |
4 |
192 |
Unnecessary use of fully qualified name 'java.lang.reflect.InvocationTargetException' due to existing import 'java.lang.reflect.InvocationTargetException' |
4 |
207 |
org/apache/log4j/spi/Configurator.java
Violation |
Priority |
Line |
Avoid modifiers which are implied by the context |
3 |
29 |
Avoid modifiers which are implied by the context |
3 |
31 |
org/apache/log4j/spi/ErrorCode.java
Violation |
Priority |
Line |
Avoid modifiers which are implied by the context |
3 |
26 |
Avoid modifiers which are implied by the context |
3 |
27 |
Avoid modifiers which are implied by the context |
3 |
28 |
Avoid modifiers which are implied by the context |
3 |
29 |
Avoid modifiers which are implied by the context |
3 |
30 |
Avoid modifiers which are implied by the context |
3 |
31 |
Avoid modifiers which are implied by the context |
3 |
32 |
org/apache/log4j/spi/Filter.java
Violation |
Priority |
Line |
Avoid unused private fields such as 'adapter'. |
3 |
25 |
Avoid empty catch blocks |
3 |
32–34 |
org/apache/log4j/spi/ThrowableInformation.java
Violation |
Priority |
Line |
Avoid unused imports such as 'org.apache.logging.log4j.core.util.Throwables' |
4 |
23 |
Avoid empty catch blocks |
3 |
43–45 |
Avoid empty catch blocks |
3 |
62–64 |
org/apache/log4j/xml/XmlConfiguration.java
Violation |
Priority |
Line |
Useless parentheses. |
4 |
241 |
Useless parentheses. |
4 |
651 |
org/apache/log4j/xml/XmlConfigurationFactory.java
Violation |
Priority |
Line |
Avoid unused private fields such as 'LOGGER'. |
3 |
36 |