Apache logging services logo Apache log4j logo

PMD Results

The following document contains the results of PMD 5.2.3.

Files

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

Violation Line
Avoid unused imports such as 'org.apache.logging.log4j.core.config.ConfigurationSource' 34

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

Violation Line
Avoid empty catch blocks 245247
Avoid empty catch blocks 292294

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

Violation Line
Useless parentheses. 314

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

Violation Line
Avoid unused constructor parameters such as 'bufferSize'. 60

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

Violation Line
Useless parentheses. 120
Useless parentheses. 120
Useless parentheses. 120

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

Violation Line
Avoid empty catch blocks 7173

org/apache/logging/log4j/core/appender/mom/JmsManager.java

Violation Line
Avoid empty catch blocks 129130
Avoid empty catch blocks 133134

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

Violation Line
Overriding method merely calls super 7577

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

Violation Line
Avoid unused private methods such as 'patternContains(String,char)'. 272

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

Violation Line
Avoid using java.lang.ThreadGroup; it is not thread safe 35

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

Violation Line
These nested if statements could be combined 163165
These nested if statements could be combined 174176

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

Violation Line
Avoid empty if statements 189197

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

Violation Line
Useless parentheses. 77
Useless parentheses. 77

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

Violation Line
Overriding method merely calls super 154156

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

Violation Line
Avoid unused imports such as 'org.apache.logging.log4j.util.Chars' 47

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

Violation Line
Useless parentheses. 276

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

Violation Line
Useless parentheses. 87
Useless parentheses. 87

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

Violation Line
Useless parentheses. 78
Useless parentheses. 78

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

Violation Line
Useless parentheses. 102
Useless parentheses. 102

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

Violation Line
Avoid empty if statements 208210

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

Violation Line
Avoid empty catch blocks 447449
Avoid unused method parameters such as 'stackTraceElement'. 483
Avoid empty catch blocks 504506

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

Violation Line
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

Violation Line
Avoid empty if statements 7274

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

Violation Line
Avoid unused constructor parameters such as 'name'. 61

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

Violation Line
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

Violation Line
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

Violation Line
Avoid unused method parameters such as 'executor'. 269
Avoid unused method parameters such as 'executor'. 337
Avoid unused method parameters such as 'executor'. 354

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

Violation Line
Avoid modifiers which are implied by the context 70

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

Violation Line
Avoid empty catch blocks 221223

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

Violation Line
Avoid unused private fields such as 'eventPrefix'. 108
Useless parentheses. 334
Useless parentheses. 356
Useless parentheses. 495

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

Violation Line
Useless parentheses. 871

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

Violation Line
Avoid empty catch blocks 9092
Avoid empty catch blocks 218220

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

Violation Line
Avoid empty catch blocks 213215

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

Violation Line
Avoid empty catch blocks 6668
Avoid empty catch blocks 7375
Avoid empty catch blocks 7577
Avoid empty catch blocks 8486

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

Violation Line
Avoid empty catch blocks 9899

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

Violation Line
Avoid empty catch blocks 7476

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

Violation Line
Avoid empty catch blocks 326328

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

Violation Line
Useless parentheses. 211
Useless parentheses. 268
Useless parentheses. 268
Useless parentheses. 268
Useless parentheses. 381
Useless parentheses. 381

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

Violation Line
Useless parentheses. 186

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

Violation Line
Avoid unused constructor parameters such as 'options'. 34

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

Violation Line
Avoid unused constructor parameters such as 'expectedClass'. 125

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

Violation Line
Useless parentheses. 61

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

Violation Line
Useless parentheses. 53

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

Violation Line
Useless parentheses. 37

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

Violation Line
Avoid empty catch blocks 4547
Avoid empty catch blocks 7072
Avoid empty catch blocks 9597
Avoid empty catch blocks 121123
Avoid empty catch blocks 147149

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

Violation Line
Useless parentheses. 5859
Useless parentheses. 5859

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

Violation Line
Avoid empty catch blocks 5052

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

Violation Line
Avoid empty catch blocks 127129

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

Violation Line
Useless parentheses. 5053
Useless parentheses. 128135

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

Violation Line
Useless parentheses. 197
Useless parentheses. 197
Useless parentheses. 197

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

Violation Line
Useless parentheses. 147
Useless parentheses. 147148
Avoid empty catch blocks 187188