Apache logging services logo Apache log4j logo

PMD Results

The following document contains the results of PMD 5.0.5.

Files

org/apache/logging/log4j/core/LoggerContext.java

ViolationLine
Avoid unused imports such as 'org.apache.logging.log4j.core.config.ConfigurationSource'38

org/apache/logging/log4j/core/appender/AsyncAppender.java

ViolationLine
Avoid empty catch blocks243245
Avoid empty catch blocks289291

org/apache/logging/log4j/core/appender/RollingRandomAccessFileAppender.java

ViolationLine
Avoid unused constructor parameters such as 'bufferSize'.58

org/apache/logging/log4j/core/appender/TlsSyslogFrame.java

ViolationLine
Overriding method merely calls super5961
Ensure you override both equals() and hashCode()59

org/apache/logging/log4j/core/appender/db/jdbc/ColumnConfig.java

ViolationLine
Useless parentheses.120
Useless parentheses.120
Useless parentheses.120

org/apache/logging/log4j/core/appender/db/jpa/converter/StackTraceElementAttributeConverter.java

ViolationLine
Avoid empty catch blocks7173

org/apache/logging/log4j/core/appender/rewrite/RewriteAppender.java

ViolationLine
Avoid unused imports such as 'java.util.Map'19
Overriding method merely calls super7375

org/apache/logging/log4j/core/appender/rolling/PatternProcessor.java

ViolationLine
Useless parentheses.183
Avoid unused private methods such as 'patternContains(String,char...)'.263

org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java

ViolationLine
These nested if statements could be combined8083

org/apache/logging/log4j/core/async/DaemonThreadFactory.java

ViolationLine
Avoid using java.lang.ThreadGroup; it is not thread safe35

org/apache/logging/log4j/core/async/RingBufferLogEvent.java

ViolationLine
These nested if statements could be combined163165
These nested if statements could be combined174176

org/apache/logging/log4j/core/config/AbstractConfiguration.java

ViolationLine
Avoid empty if statements178186

org/apache/logging/log4j/core/config/FileConfigurationMonitor.java

ViolationLine
Useless parentheses.77
Useless parentheses.77

org/apache/logging/log4j/core/config/LoggerConfig.java

ViolationLine
Overriding method merely calls super152154

org/apache/logging/log4j/core/config/LoggersPlugin.java

ViolationLine
No need to import a type that lives in the same package22
No need to import a type that lives in the same package23

org/apache/logging/log4j/core/config/plugins/util/PluginManager.java

ViolationLine
Avoid unused method parameters such as 'start'.143
Avoid unused method parameters such as 'preLoad'.143
These nested if statements could be combined145147

org/apache/logging/log4j/core/config/plugins/util/TypeConverters.java

ViolationLine
Avoid unused private fields such as 'INSTANCE'.221

org/apache/logging/log4j/core/config/plugins/visitors/AbstractPluginVisitor.java

ViolationLine
Avoid unused local variables such as 'a'.60

org/apache/logging/log4j/core/config/xml/XmlConfiguration.java

ViolationLine
Useless parentheses.274

org/apache/logging/log4j/core/filter/MapFilter.java

ViolationLine
Useless parentheses.82
Useless parentheses.82

org/apache/logging/log4j/core/filter/StructuredDataFilter.java

ViolationLine
Useless parentheses.74
Useless parentheses.74

org/apache/logging/log4j/core/filter/ThreadContextMapFilter.java

ViolationLine
Useless parentheses.98
Useless parentheses.98

org/apache/logging/log4j/core/impl/Log4jLogEvent.java

ViolationLine
Avoid unused method parameters such as 'stream'.405

org/apache/logging/log4j/core/impl/ThrowableFormatOptions.java

ViolationLine
Avoid empty if statements208210

org/apache/logging/log4j/core/impl/ThrowableProxy.java

ViolationLine
Avoid unused method parameters such as 'element'.259
Avoid empty catch blocks504506
Avoid unused method parameters such as 'stackTraceElement'.532
Avoid empty catch blocks553555

org/apache/logging/log4j/core/jackson/ExtendedStackTraceElementMixIn.java

ViolationLine
Avoid unused constructor parameters such as 'declaringClass'.41
Avoid unused constructor parameters such as 'methodName'.42
Avoid unused constructor parameters such as 'fileName'.43
Avoid unused constructor parameters such as 'lineNumber'.44
Avoid unused constructor parameters such as 'exact'.45
Avoid unused constructor parameters such as 'location'.46
Avoid unused constructor parameters such as 'version'.47

org/apache/logging/log4j/core/jackson/Log4jStackTraceElementDeserializer.java

ViolationLine
Avoid empty if statements7274

org/apache/logging/log4j/core/jackson/MarkerMixIn.java

ViolationLine
Avoid unused imports such as 'com.fasterxml.jackson.annotation.JsonIgnore'22
Avoid unused constructor parameters such as 'name'.61

org/apache/logging/log4j/core/jackson/StackTraceElementMixIn.java

ViolationLine
Avoid unused constructor parameters such as 'declaringClass'.37
Avoid unused constructor parameters such as 'methodName'.38
Avoid unused constructor parameters such as 'fileName'.39
Avoid unused constructor parameters such as 'lineNumber'.40

org/apache/logging/log4j/core/jackson/ThrowableProxyMixIn.java

ViolationLine
Avoid unused private fields such as 'causeProxy'.34
Avoid unused private fields such as 'commonElementCount'.38
Avoid unused private fields such as 'extendedStackTrace'.43
Avoid unused private fields such as 'localizedMessage'.47
Avoid unused private fields such as 'message'.51
Avoid unused private fields such as 'name'.55
Avoid unused private fields such as 'throwable'.58

org/apache/logging/log4j/core/jmx/Server.java

ViolationLine
Avoid unused method parameters such as 'executor'.249
Avoid unused method parameters such as 'executor'.317
Avoid unused method parameters such as 'executor'.334

org/apache/logging/log4j/core/jmx/StatusLoggerAdminMBean.java

ViolationLine
Avoid modifiers which are implied by the context70

org/apache/logging/log4j/core/layout/HtmlLayout.java

ViolationLine
Avoid empty catch blocks230232

org/apache/logging/log4j/core/layout/JsonLayout.java

ViolationLine
Useless parentheses.826

org/apache/logging/log4j/core/layout/Rfc5424Layout.java

ViolationLine
Avoid unused private fields such as 'eventPrefix'.103
Useless parentheses.327
Useless parentheses.349
Useless parentheses.492

org/apache/logging/log4j/core/layout/XmlLayout.java

ViolationLine
Useless parentheses.233

org/apache/logging/log4j/core/lookup/StrSubstitutor.java

ViolationLine
Useless parentheses.840
Useless parentheses.939
Useless parentheses.939

org/apache/logging/log4j/core/net/MulticastDnsAdvertiser.java

ViolationLine
Avoid empty catch blocks9092
Avoid empty catch blocks218220

org/apache/logging/log4j/core/net/TcpSocketManager.java

ViolationLine
Avoid empty catch blocks201203

org/apache/logging/log4j/core/net/server/AbstractSocketServer.java

ViolationLine
Avoid empty catch blocks6668
Avoid empty catch blocks7375
Avoid empty catch blocks7577
Avoid empty catch blocks8486

org/apache/logging/log4j/core/net/server/TcpSocketServer.java

ViolationLine
Avoid empty catch blocks7476

org/apache/logging/log4j/core/net/ssl/SslConfiguration.java

ViolationLine
Avoid unused imports such as 'java.security.KeyStore'20

org/apache/logging/log4j/core/pattern/AnsiEscape.java

ViolationLine
Avoid empty catch blocks326328

org/apache/logging/log4j/core/pattern/CachedDateFormat.java

ViolationLine
Useless parentheses.211
Useless parentheses.268
Useless parentheses.268
Useless parentheses.268
Useless parentheses.380
Useless parentheses.380

org/apache/logging/log4j/core/pattern/MarkerPatternConverter.java

ViolationLine
Avoid unused constructor parameters such as 'options'.34

org/apache/logging/log4j/core/pattern/PatternParser.java

ViolationLine
Avoid unused constructor parameters such as 'expectedClass'.125
Useless parentheses.522

org/apache/logging/log4j/core/pattern/StyleConverter.java

ViolationLine
Useless parentheses.61

org/apache/logging/log4j/core/pattern/UuidPatternConverter.java

ViolationLine
Useless parentheses.53

org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java

ViolationLine
Avoid empty catch blocks115117
Avoid empty catch blocks145147

org/apache/logging/log4j/core/util/Booleans.java

ViolationLine
Useless parentheses.37

org/apache/logging/log4j/core/util/Closer.java

ViolationLine
Avoid empty catch blocks4547
Avoid empty catch blocks7072
Avoid empty catch blocks9597
Avoid empty catch blocks121123
Avoid empty catch blocks147149

org/apache/logging/log4j/core/util/FileUtils.java

ViolationLine
Useless parentheses.5657
Useless parentheses.57

org/apache/logging/log4j/core/util/JndiCloser.java

ViolationLine
Avoid empty catch blocks5052

org/apache/logging/log4j/core/util/Throwables.java

ViolationLine
Avoid empty catch blocks126128

org/apache/logging/log4j/core/util/Transform.java

ViolationLine
Useless parentheses.5053
Useless parentheses.128135

org/apache/logging/log4j/core/util/UuidUtil.java

ViolationLine
Avoid empty catch blocks99101
Useless parentheses.177178
Useless parentheses.177
Useless parentheses.178