PMD Results

The following document contains the results of PMD 3.9.

Files

javax/mail/Address.java

Violation Line
Ensure you override both equals() and hashCode() 37

javax/mail/EventQueue.java

Violation Line
Avoid empty catch blocks 159 - 161

javax/mail/FetchProfile.java

Violation Line
Avoid unused constructor parameters such as 'name'. 65 - 68

javax/mail/Flags.java

Violation Line
Avoid unused imports such as 'java.util.Iterator' 24
Avoid unused imports such as 'java.util.LinkedList' 25
Avoid unused imports such as 'java.util.List' 26
Avoid unused private fields such as 'mask'. 74

javax/mail/Folder.java

Violation Line
Avoid unnecessary return statements 525

javax/mail/Service.java

Violation Line
These nested if statements could be combined 144 - 146
These nested if statements could be combined 157 - 159
These nested if statements could be combined 179 - 181
Avoid empty catch blocks 193 - 195
Avoid empty catch blocks 250 - 251
Avoid empty catch blocks 258 - 259
These nested if statements could be combined 365 - 367

javax/mail/Session.java

Violation Line
These nested if statements could be combined 136 - 138
Avoid empty catch blocks 566 - 568
Avoid empty catch blocks 568 - 570
Avoid empty catch blocks 586 - 588
Avoid empty catch blocks 588 - 590
Avoid empty catch blocks 607 - 609
Avoid empty catch blocks 609 - 611
Avoid empty catch blocks 709 - 711
Avoid empty catch blocks 711 - 713
Avoid empty catch blocks 728 - 730
Avoid empty catch blocks 730 - 732
Avoid empty catch blocks 744 - 746
Avoid empty catch blocks 746 - 748
Avoid empty catch blocks 762 - 764
Avoid empty catch blocks 764 - 766

javax/mail/StoreClosedException.java

Violation Line
Avoid unused constructor parameters such as 'store'. 33 - 35

javax/mail/URLName.java

Violation Line
Avoid unused imports such as 'java.io.ByteArrayOutputStream' 22

javax/mail/internet/AddressException.java

Violation Line
Avoid unused constructor parameters such as 'ref'. 37 - 39

javax/mail/internet/AddressParser.java

Violation Line
Avoid unused imports such as 'java.lang.reflect.Array' 23
Avoid empty catch blocks 458 - 459
Do not start a literal by 0 unless it's an octal value 734
Do not start a literal by 0 unless it's an octal value 734
Avoid unused local variables such as 'startPosition'. 785
These nested if statements could be combined 1143 - 1145
Avoid unused private methods such as 'isSpace(char)'. 1526

javax/mail/internet/HeaderTokenizer.java

Violation Line
Avoid empty while statements 282

javax/mail/internet/InternetAddress.java

Violation Line
Avoid unused imports such as 'java.lang.reflect.Array' 23
Avoid unused imports such as 'java.util.ArrayList' 26
Avoid unused imports such as 'java.util.List' 27
Avoid unused imports such as 'java.util.StringTokenizer' 28
Avoid unused imports such as 'org.apache.geronimo.mail.util.SessionUtil' 33
Avoid empty catch blocks 425 - 427
Avoid empty catch blocks 427 - 429
Avoid empty catch blocks 429 - 431

javax/mail/internet/InternetHeaders.java

Violation Line
Avoid unused imports such as 'java.util.Arrays' 26
Avoid unused imports such as 'java.util.HashSet' 29
Avoid unused imports such as 'java.util.Iterator' 30
Avoid unused imports such as 'java.util.LinkedHashMap' 31
Avoid unused imports such as 'java.util.Map' 33
Avoid unused imports such as 'java.util.Set' 34
Avoid unused private fields such as 'lastHeaderName'. 49
These nested if statements could be combined 488 - 490
These nested if statements could be combined 508 - 510
These nested if statements could be combined 624 - 626

javax/mail/internet/MimeBodyPart.java

Violation Line
Avoid unused imports such as 'javax.swing.text.AbstractDocument.Content' 40
Avoid empty catch blocks 118 - 119
Avoid empty catch blocks 272 - 274
Avoid empty catch blocks 313 - 314
These nested if statements could be combined 553 - 574
These nested if statements could be combined 555 - 573
These nested if statements could be combined 558 - 572

javax/mail/internet/MimeMessage.java

Violation Line
Avoid empty catch blocks 537 - 539
Avoid unused local variables such as 's'. 568
Avoid empty catch blocks 638 - 640
Avoid empty catch blocks 792 - 794
Avoid empty catch blocks 857 - 858
These nested if statements could be combined 1405 - 1426
These nested if statements could be combined 1407 - 1425
These nested if statements could be combined 1410 - 1424

javax/mail/internet/MimeMultipart.java

Violation Line
Avoid unused imports such as 'java.io.ByteArrayInputStream' 23

javax/mail/internet/MimePartDataSource.java

Violation Line
Avoid empty catch blocks 93 - 95

javax/mail/internet/MimeUtility.java

Violation Line
Avoid unused imports such as 'java.io.BufferedInputStream' 22
Avoid unused imports such as 'java.io.ByteArrayInputStream' 24
Avoid unused imports such as 'org.apache.geronimo.mail.util.QuotedPrintable' 48
Avoid unused private fields such as 'defaultJavaCharset'. 71
These nested if statements could be combined 189 - 192
Avoid empty catch blocks 202 - 203
These nested if statements could be combined 345 - 348
Avoid empty catch blocks 358 - 359
Avoid empty catch blocks 784 - 785
Avoid unused local variables such as 'requiresQuoting'. 804
Avoid empty catch blocks 953 - 954
Avoid empty catch blocks 1062 - 1064
These nested if statements could be combined 1123 - 1125
Avoid unused local variables such as 'lineBreak'. 1245
These nested if statements could be combined 1250 - 1254
These nested if statements could be combined 1327 - 1329

javax/mail/internet/NewsAddress.java

Violation Line
Avoid unused imports such as 'sun.security.provider.Sun' 28

javax/mail/internet/ParameterList.java

Violation Line
Avoid unused imports such as 'java.io.UnsupportedEncodingException' 23
Avoid unused imports such as 'java.util.ArrayList' 24
Avoid unused imports such as 'java.util.List' 29
Avoid unused imports such as 'java.util.StringTokenizer' 31
Avoid empty catch blocks 191 - 193

javax/mail/search/MessageIDTerm.java

Violation Line
Ensure you override both equals() and hashCode() 50

javax/mail/search/MessageNumberTerm.java

Violation Line
Ensure you override both equals() and hashCode() 36

javax/mail/search/ReceivedDateTerm.java

Violation Line
Ensure you override both equals() and hashCode() 48

javax/mail/search/SentDateTerm.java

Violation Line
Ensure you override both equals() and hashCode() 47

javax/mail/search/SizeTerm.java

Violation Line
Ensure you override both equals() and hashCode() 41

javax/mail/search/SubjectTerm.java

Violation Line
Ensure you override both equals() and hashCode() 45

javax/mail/util/ByteArrayDataSource.java

Violation Line
Avoid empty catch blocks 101 - 103

javax/mail/util/SharedByteArrayInputStream.java

Violation Line
Avoid unused imports such as 'java.io.IOException' 23

org/apache/geronimo/mail/handlers/MessageHandler.java

Violation Line
Avoid unused imports such as 'javax.mail.internet.ContentType' 25
Avoid unused imports such as 'javax.mail.internet.MimeUtility' 31
Avoid unused imports such as 'javax.mail.internet.ParseException' 32
Avoid unused imports such as 'java.io.InputStreamReader' 35
Avoid unused imports such as 'java.io.OutputStreamWriter' 37
Avoid unused imports such as 'java.io.StringWriter' 38
Avoid unused imports such as 'java.io.UnsupportedEncodingException' 39

org/apache/geronimo/mail/handlers/MultipartHandler.java

Violation Line
Avoid unused imports such as 'javax.mail.internet.MimeMessage' 30

org/apache/geronimo/mail/handlers/TextHandler.java

Violation Line
Avoid unused imports such as 'java.io.InputStreamReader' 26
Avoid unused imports such as 'java.io.StringWriter' 29

org/apache/geronimo/mail/util/Base64DecoderStream.java

Violation Line
Avoid unused private methods such as 'getBufferedChar()'. 79
These nested if statements could be combined 110 - 112
These nested if statements could be combined 125 - 127

org/apache/geronimo/mail/util/Base64EncoderStream.java

Violation Line
These nested if statements could be combined 165 - 168

org/apache/geronimo/mail/util/HexEncoder.java

Violation Line
Avoid unused local variables such as 'b3'. 154
Avoid unused local variables such as 'b4'. 154

org/apache/geronimo/mail/util/QuotedPrintable.java

Violation Line
Avoid unused imports such as 'java.io.InputStream' 24

org/apache/geronimo/mail/util/QuotedPrintableDecoderStream.java

Violation Line
Avoid unused imports such as 'java.io.ByteArrayOutputStream' 22
Avoid unused imports such as 'java.io.UnsupportedEncodingException' 26

org/apache/geronimo/mail/util/QuotedPrintableEncoder.java

Violation Line
Avoid unused imports such as 'java.io.EOFException' 22
An empty statement (semicolon) not part of a loop 721

org/apache/geronimo/mail/util/RFC2231Encoder.java

Violation Line
Avoid unused local variables such as 'language'. 250

org/apache/geronimo/mail/util/SessionUtil.java

Violation Line
Avoid unused imports such as 'java.security.Security' 22
Avoid empty catch blocks 124 - 125
Avoid empty catch blocks 169 - 171
Avoid empty catch blocks 193 - 195
Avoid empty catch blocks 212 - 214

org/apache/geronimo/mail/util/UUDecoderStream.java

Violation Line
Avoid unused private methods such as 'getBufferedChar()'. 73
These nested if statements could be combined 98 - 100
These nested if statements could be combined 113 - 115
An empty statement (semicolon) not part of a loop 182

org/apache/geronimo/mail/util/XTextEncoder.java

Violation Line
Avoid unused local variables such as 'b3'. 137
Avoid unused local variables such as 'b4'. 137