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 49
Useless parentheses. 4 106
Useless parentheses. 4 106

org/apache/log4j/Category.java

Violation Priority Line
Ternary operators that can be simplified with || or && 3 410
Unnecessary use of fully qualified name 'org.apache.logging.log4j.spi.LoggerContext' due to existing import 'org.apache.logging.log4j.spi.LoggerContext' 4 543
Unnecessary use of fully qualified name 'org.apache.logging.log4j.spi.LoggerContext' due to existing import 'org.apache.logging.log4j.spi.LoggerContext' 4 548

org/apache/log4j/LogManager.java

Violation Priority Line
Avoid empty catch blocks 3 7981

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/LogEventWrapper.java

Violation Priority Line
Overriding method merely calls super 3 203205

org/apache/log4j/builders/appender/AsyncAppenderBuilder.java

Violation Priority Line
Too many static imports may lead to messy code 3 17169

org/apache/log4j/builders/appender/ConsoleAppenderBuilder.java

Violation Priority Line
Too many static imports may lead to messy code 3 17160

org/apache/log4j/builders/appender/DailyRollingFileAppenderBuilder.java

Violation Priority Line
Too many static imports may lead to messy code 3 17191
Avoid unused method parameters such as 'append'. 3 155

org/apache/log4j/builders/appender/FileAppenderBuilder.java

Violation Priority Line
Too many static imports may lead to messy code 3 17179

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 17153

org/apache/log4j/builders/appender/RollingFileAppenderBuilder.java

Violation Priority Line
Too many static imports may lead to messy code 3 17214

org/apache/log4j/builders/appender/SyslogAppenderBuilder.java

Violation Priority Line
Too many static imports may lead to messy code 3 17183

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 private fields such as 'LOGGER'. 3 46

org/apache/log4j/builders/filter/LevelRangeFilterBuilder.java

Violation Priority Line
Avoid unused private fields such as 'LOGGER'. 3 46

org/apache/log4j/builders/layout/HtmlLayoutBuilder.java

Violation Priority Line
Avoid unused private fields such as 'LOGGER'. 3 44

org/apache/log4j/builders/layout/PatternLayoutBuilder.java

Violation Priority Line
These nested if statements could be combined 3 6669

org/apache/log4j/builders/layout/SimpleLayoutBuilder.java

Violation Priority Line
Avoid unused private fields such as 'LOGGER'. 3 37

org/apache/log4j/builders/layout/TTCCLayoutBuilder.java

Violation Priority Line
Too many static imports may lead to messy code 3 17136
Avoid unused private fields such as 'LOGGER'. 3 47

org/apache/log4j/builders/layout/XmlLayoutBuilder.java

Violation Priority Line
Avoid unused private fields such as 'LOGGER'. 3 43

org/apache/log4j/config/Log4j1ConfigurationConverter.java

Violation Priority Line
Avoid modifiers which are implied by the context 3 186
Avoid modifiers which are implied by the context 3 187
Avoid modifiers which are implied by the context 3 223
Avoid modifiers which are implied by the context 3 223

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 151157
Avoid unused private methods such as 'buildAttributeWithDefault(String,ComponentBuilder,String,String,String)'. 3 268269

org/apache/log4j/config/PropertiesConfiguration.java

Violation Priority Line
Useless parentheses. 4 365
Useless parentheses. 4 365
Avoid unused method parameters such as 'optionKey'. 3 374
Useless parentheses. 4 419
Avoid unused method parameters such as 'appenderName'. 3 573

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 191
Unnecessary use of fully qualified name 'java.lang.reflect.InvocationTargetException' due to existing import 'java.lang.reflect.InvocationTargetException' 4 205

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 3234

org/apache/log4j/spi/ThrowableInformation.java

Violation Priority Line
Avoid empty catch blocks 3 4143
Avoid empty catch blocks 3 5961

org/apache/log4j/xml/XmlConfiguration.java

Violation Priority Line
Useless parentheses. 4 264
Useless parentheses. 4 669

org/apache/log4j/xml/XmlConfigurationFactory.java

Violation Priority Line
Avoid unused private fields such as 'LOGGER'. 3 39