PMD Results

The following document contains the results of PMD

Files

javax/mail/Address.java

ViolationLine
Ensure you override both equals() and hashCode()35

javax/mail/FetchProfile.java

ViolationLine
Avoid unused constructor parameters such as 'name'63 - 66

javax/mail/Flags.java

ViolationLine
Avoid unused imports such as 'java.util.Iterator'22
Avoid unused imports such as 'java.util.LinkedList'23
Avoid unused imports such as 'java.util.List'24
Avoid unused private fields such as 'mask'72

javax/mail/Folder.java

ViolationLine
Avoid unnecessary return statements518

javax/mail/internet/AddressException.java

ViolationLine
Avoid unused constructor parameters such as 'ref'35 - 37

javax/mail/internet/AddressParser.java

ViolationLine
Avoid unused imports such as 'java.lang.reflect.Array'21
Avoid empty catch blocks456 - 457
Avoid unused local variables such as 'startPosition'783
These nested if statements could be combined1141 - 1143
Avoid unused private methods such as 'isSpace(char)'1524

javax/mail/internet/HeaderTokenizer.java

ViolationLine
Avoid empty while statements280

javax/mail/internet/InternetAddress.java

ViolationLine
Avoid unused imports such as 'java.lang.reflect.Array'20
Avoid unused imports such as 'java.util.ArrayList'23
Avoid unused imports such as 'java.util.List'24
Avoid unused imports such as 'java.util.StringTokenizer'25
Avoid unused imports such as 'org.apache.geronimo.mail.util.SessionUtil'30
Avoid empty catch blocks422 - 424
Avoid empty catch blocks424 - 426
Avoid empty catch blocks426 - 428

javax/mail/internet/InternetHeaders.java

ViolationLine
Avoid unused imports such as 'java.util.Arrays'24
Avoid unused imports such as 'java.util.HashSet'27
Avoid unused imports such as 'java.util.Iterator'28
Avoid unused imports such as 'java.util.LinkedHashMap'29
Avoid unused imports such as 'java.util.Map'31
Avoid unused imports such as 'java.util.Set'32
Avoid unused private fields such as 'lastHeaderName'47
These nested if statements could be combined458 - 460
These nested if statements could be combined478 - 480
These nested if statements could be combined581 - 583

javax/mail/internet/MimeBodyPart.java

ViolationLine
Avoid unused imports such as 'javax.swing.text.AbstractDocument.Content'38
Avoid empty catch blocks115 - 116
Avoid empty catch blocks269 - 271
Avoid empty catch blocks310 - 311
These nested if statements could be combined548 - 567
These nested if statements could be combined550 - 566
These nested if statements could be combined553 - 565

javax/mail/internet/MimeMessage.java

ViolationLine
Avoid empty catch blocks531 - 533
Avoid unused local variables such as 's'562
Avoid empty catch blocks632 - 634
Avoid empty catch blocks786 - 788
Avoid empty catch blocks851 - 852
These nested if statements could be combined1365 - 1384
These nested if statements could be combined1367 - 1383
These nested if statements could be combined1370 - 1382

javax/mail/internet/MimeMultipart.java

ViolationLine
Avoid unused imports such as 'java.io.ByteArrayInputStream'21

javax/mail/internet/MimeUtility.java

ViolationLine
Avoid unused imports such as 'java.io.BufferedInputStream'20
Avoid unused imports such as 'org.apache.geronimo.mail.util.QuotedPrintable'46
Avoid unused private fields such as 'defaultJavaCharset'69
These nested if statements could be combined187 - 190
Avoid empty catch blocks200 - 201
These nested if statements could be combined343 - 346
Avoid empty catch blocks356 - 357
Avoid empty catch blocks673 - 674
Avoid unused local variables such as 'requiresQuoting'693
Avoid empty catch blocks842 - 843
Avoid empty catch blocks951 - 953
These nested if statements could be combined1012 - 1014
Avoid unused local variables such as 'lineBreak'1134
These nested if statements could be combined1139 - 1143
These nested if statements could be combined1216 - 1218

javax/mail/internet/NewsAddress.java

ViolationLine
Avoid unused imports such as 'sun.security.provider.Sun'26

javax/mail/internet/ParameterList.java

ViolationLine
Avoid unused imports such as 'java.io.UnsupportedEncodingException'21
Avoid unused imports such as 'java.util.ArrayList'22
Avoid unused imports such as 'java.util.List'27
Avoid unused imports such as 'java.util.StringTokenizer'29
Avoid empty catch blocks189 - 191

javax/mail/search/ComparisonTerm.java

ViolationLine
Overriding method merely calls super38 - 40
Overriding method merely calls super42 - 44

javax/mail/search/MessageNumberTerm.java

ViolationLine
Ensure you override both equals() and hashCode()34
Overriding method merely calls super34 - 36

javax/mail/Service.java

ViolationLine
Avoid empty catch blocks174 - 176
Avoid empty catch blocks231 - 232
Avoid empty catch blocks239 - 240

javax/mail/Session.java

ViolationLine
These nested if statements could be combined134 - 136
Avoid empty catch blocks565 - 567
Avoid empty catch blocks567 - 569
Avoid empty catch blocks583 - 585
Avoid empty catch blocks585 - 587
Avoid empty catch blocks603 - 605
Avoid empty catch blocks605 - 607
Avoid empty catch blocks700 - 702
Avoid empty catch blocks702 - 704
Avoid empty catch blocks719 - 721
Avoid empty catch blocks721 - 723
Avoid empty catch blocks735 - 737
Avoid empty catch blocks737 - 739
Avoid empty catch blocks753 - 755
Avoid empty catch blocks755 - 757

javax/mail/StoreClosedException.java

ViolationLine
Avoid unused constructor parameters such as 'store'31 - 33

javax/mail/util/ByteArrayDataSource.java

ViolationLine
Avoid empty catch blocks99 - 101

javax/mail/util/SharedByteArrayInputStream.java

ViolationLine
Avoid unused imports such as 'java.io.IOException'21

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

ViolationLine
Avoid unused imports such as 'javax.mail.internet.ContentType'21
Avoid unused imports such as 'javax.mail.internet.MimeUtility'27
Avoid unused imports such as 'javax.mail.internet.ParseException'28
Avoid unused imports such as 'java.io.InputStreamReader'31
Avoid unused imports such as 'java.io.OutputStreamWriter'33
Avoid unused imports such as 'java.io.StringWriter'34
Avoid unused imports such as 'java.io.UnsupportedEncodingException'35

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

ViolationLine
Avoid unused imports such as 'javax.mail.internet.MimeMessage'26

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

ViolationLine
Avoid unused private methods such as 'getBufferedChar()'77
These nested if statements could be combined108 - 110
These nested if statements could be combined123 - 125

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

ViolationLine
These nested if statements could be combined163 - 166

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

ViolationLine
Avoid unused local variables such as 'b3'152
Avoid unused local variables such as 'b4'152

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

ViolationLine
Avoid unused imports such as 'java.io.InputStream'22

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

ViolationLine
Avoid unused imports such as 'java.io.ByteArrayOutputStream'20
Avoid unused imports such as 'java.io.UnsupportedEncodingException'24

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

ViolationLine
Avoid unused imports such as 'java.io.EOFException'20

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

ViolationLine
Avoid unused local variables such as 'language'248

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

ViolationLine
Avoid unused imports such as 'java.security.Security'20
Avoid empty catch blocks122 - 123
Avoid empty catch blocks167 - 169
Avoid empty catch blocks191 - 193
Avoid empty catch blocks210 - 212

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

ViolationLine
Avoid unused private methods such as 'getBufferedChar()'71
These nested if statements could be combined96 - 98
These nested if statements could be combined111 - 113
An empty statement (semicolon) not part of a loop180

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

ViolationLine
Avoid unused local variables such as 'b3'135
Avoid unused local variables such as 'b4'135