Apache logging services logo Apache log4j logo

PMD Results

The following document contains the results of PMD 5.3.2.

Files

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

Violation Line
Avoid empty catch blocks 268270
Avoid empty catch blocks 313315

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

Violation Line
Useless parentheses. 327

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/appender/rolling/action/Duration.java

Violation Line
These nested if statements could be combined 122138
Useless parentheses. 168

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

Violation Line
These nested if statements could be combined 111114

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

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

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

Violation Line
These nested if statements could be combined 166168
These nested if statements could be combined 177179

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

Violation Line
Overriding method merely calls super 145147
These nested if statements could be combined 195197

org/apache/logging/log4j/core/config/properties/PropertiesConfigurationFactory.java

Violation Line
Avoid unused method parameters such as 'name'. 403

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

Violation Line
Useless parentheses. 308

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

Violation Line
Useless parentheses. 86
Useless parentheses. 86

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

Violation Line
These nested if statements could be combined 146149

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 213215

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

Violation Line
Avoid empty catch blocks 491493
Avoid unused method parameters such as 'stackTraceElement'. 527
Avoid empty catch blocks 548550

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'. 278
Avoid unused method parameters such as 'executor'. 350
Avoid unused method parameters such as 'executor'. 367

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 218220

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

Violation Line
Avoid unused imports such as 'org.apache.logging.log4j.core.util.KeyValuePair' 31

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

Violation Line
Avoid unused private fields such as 'eventPrefix'. 109
Useless parentheses. 334
Useless parentheses. 357
Useless parentheses. 497

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

Violation Line
These nested if statements could be combined 113116

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

Violation Line
Avoid empty catch blocks 9294
Avoid empty catch blocks 215217

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 6870
Avoid empty catch blocks 7577
Avoid empty catch blocks 7779
Avoid empty catch blocks 8688

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

Violation Line
Avoid unused imports such as 'org.apache.logging.log4j.Logger' 27
Avoid unused imports such as 'org.apache.logging.log4j.status.StatusLogger' 34
Avoid empty catch blocks 101102

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

Violation Line
Avoid empty catch blocks 7678

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

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

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

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

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

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

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

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

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

Violation Line
Useless parentheses. 53

org/apache/logging/log4j/core/script/ScriptManager.java

Violation Line
Avoid unused private fields such as 'SECURITY_MANAGER'. 53
Avoid modifiers which are implied by the context 157
Avoid modifiers which are implied by the context 159
Avoid modifiers which are implied by the context 161

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

Violation Line
Useless parentheses. 294
Useless parentheses. 294
Useless parentheses. 294
These nested if statements could be combined 482485
Useless parentheses. 504
Useless parentheses. 504
Useless parentheses. 504
Useless parentheses. 504
Useless parentheses. 504
Useless parentheses. 574
Useless parentheses. 622
Useless parentheses. 624
Useless parentheses. 626
Useless parentheses. 628
Useless parentheses. 764
Useless parentheses. 934
Useless parentheses. 940
Useless parentheses. 945
Useless parentheses. 946
Useless parentheses. 951
Useless parentheses. 956
These nested if statements could be combined 956960
Useless parentheses. 957
Useless parentheses. 1109
Unnecessary use of fully qualified name 'java.util.Calendar.getInstance' due to existing import 'java.util.Calendar' 1258
Unnecessary use of fully qualified name 'java.util.Calendar' due to existing import 'java.util.Calendar' 1258
Unnecessary use of fully qualified name 'java.util.Calendar' due to existing import 'java.util.Calendar' 1294
Unnecessary use of fully qualified name 'java.util.Calendar.getInstance' due to existing import 'java.util.Calendar' 1294
Unnecessary use of fully qualified name 'java.util.Calendar.HOUR_OF_DAY' due to existing import 'java.util.Calendar' 1558
Unnecessary use of fully qualified name 'java.util.Calendar.HOUR_OF_DAY' due to existing import 'java.util.Calendar' 1559
Unnecessary use of fully qualified name 'java.util.Calendar.HOUR_OF_DAY' due to existing import 'java.util.Calendar' 1560
Useless parentheses. 1583
Useless parentheses. 1583
Useless parentheses. 1592

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

Violation Line
Avoid unused imports such as 'java.nio.file.FileSystem' 27
Avoid unused imports such as 'java.nio.file.FileSystems' 28
Avoid unused imports such as 'java.nio.file.Path' 29
Useless parentheses. 5859
Useless parentheses. 5859

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

Violation Line
Avoid unused imports such as 'java.io.InputStream' 20
Avoid unused imports such as 'java.io.OutputStream' 21

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

Violation Line
Avoid empty catch blocks 5355

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

Violation Line
Useless parentheses. 81
Useless parentheses. 97
Useless parentheses. 97
Useless parentheses. 98
Useless parentheses. 105

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

Violation Line
Avoid empty catch blocks 102104

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. 198
Useless parentheses. 198
Useless parentheses. 198

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

Violation Line
Useless parentheses. 143144
Useless parentheses. 143
Avoid empty catch blocks 183185

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

Violation Line
Avoid unused imports such as 'org.apache.logging.log4j.core.config.Configuration' 21
Avoid unused imports such as 'java.util.concurrent.ScheduledExecutorService' 29