PMD Results

The following document contains the results of PMD 3.9.

Files

org/apache/james/postage/classloading/CachedInstanceFactory.java

ViolationLine
Each class should declare at least one constructor30 - 61
Found 'DD'-anomaly for variable 'object' (lines '37'-'52').37 - 52
Found 'DD'-anomaly for variable 'clazz' (lines '39'-'43').39 - 43

org/apache/james/postage/client/POP3Client.java

ViolationLine
Found 'DD'-anomaly for variable 'entries' (lines '129'-'131').129 - 131
Found 'DU'-anomaly for variable 'entries' (lines '131'-'153').131 - 153

org/apache/james/postage/client/RemoteManagerClient.java

ViolationLine
A method should have only one exit point, and that should be the last statement in the method63
A method should have only one exit point, and that should be the last statement in the method78
Assigning an Object to null is a code smell. Consider refactoring.90
Assigning an Object to null is a code smell. Consider refactoring.91
Assigning an Object to null is a code smell. Consider refactoring.92
A method should have only one exit point, and that should be the last statement in the method101
A method should have only one exit point, and that should be the last statement in the method135
A method should have only one exit point, and that should be the last statement in the method137
Found 'DU'-anomaly for variable 'allAnswerLines' (lines '143'-'147').143 - 147

org/apache/james/postage/client/SMTPClient.java

ViolationLine
Found 'DD'-anomaly for variable 'message' (lines '118'-'122').118 - 122

org/apache/james/postage/configuration/ConfigurationLoader.java

ViolationLine
Each class should declare at least one constructor36 - 177
Found 'DU'-anomaly for variable 'scenarioCount' (lines '49'-'102').49 - 102
Found 'DU'-anomaly for variable 'scenarioCount' (lines '98'-'102').98 - 102
Found 'DU'-anomaly for variable 'postageConfiguration' (lines '104'-'114').104 - 114
Found 'DU'-anomaly for variable 'profileCount' (lines '121'-'138').121 - 138
Found 'DU'-anomaly for variable 'profileCount' (lines '136'-'138').136 - 138
Found 'DU'-anomaly for variable 'profile' (lines '140'-'163').140 - 163
Found 'DU'-anomaly for variable 'mailSenderCount' (lines '144'-'163').144 - 163
Found 'DU'-anomaly for variable 'mailSenderCount' (lines '161'-'163').161 - 163

org/apache/james/postage/configuration/MailSender.java

ViolationLine
Perhaps 'm_mailFactoryClass' could be replaced by a local variable.53
These nested if statements could be combined92
Found 'DD'-anomaly for variable 'mailFactory' (lines '163'-'177').163 - 177

org/apache/james/postage/configuration/PostageConfiguration.java

ViolationLine
Found 'DU'-anomaly for variable 'sourceInternal' (lines '223'-'232').223 - 232
Found 'DU'-anomaly for variable 'targetInternal' (lines '223'-'232').223 - 232
A method should have only one exit point, and that should be the last statement in the method228

org/apache/james/postage/execution/SampleController.java

ViolationLine
It is a good practice to call super() in a constructor42 - 45
An empty statement (semicolon) not part of a loop70

org/apache/james/postage/jmx/JVMResourceSampler.java

ViolationLine
Found 'DU'-anomaly for variable 'jmxFactoryClass' (lines '47'-'52').47 - 52
A method should have only one exit point, and that should be the last statement in the method49

org/apache/james/postage/jmx/JVMResourceSamplerWorker.java

ViolationLine
Found 'UR'-anomaly for variable 'serviceURL' (lines '68'-'68').68
Found 'DD'-anomaly for variable 'data' (lines '80'-'81').80 - 81
Found 'DU'-anomaly for variable 'data' (lines '89'-'94').89 - 94
Found 'DU'-anomaly for variable 'key' (lines '122'-'128').122 - 128
A method should have only one exit point, and that should be the last statement in the method125

org/apache/james/postage/mail/AbstractMailFactory.java

ViolationLine
Avoid unnecessary constructors - the compiler will generate these for you60 - 62
A method should have only one exit point, and that should be the last statement in the method90
Found 'DU'-anomaly for variable 'message' (lines '102'-'102').102
Found 'DU'-anomaly for variable 'mailProcessingRecord' (lines '102'-'102').102
Found 'DU'-anomaly for variable 'mailSender' (lines '102'-'102').102

org/apache/james/postage/mail/DefaultMailFactory.java

ViolationLine
Each class should declare at least one constructor37 - 84
Found 'DU'-anomaly for variable 'mailProcessingRecord' (lines '39'-'78').39 - 78
Found 'DD'-anomaly for variable 'bytes' (lines '71'-'72').71 - 72
Found 'DD'-anomaly for variable 'bytes' (lines '72'-'72').72

org/apache/james/postage/mail/DefaultMailValidator.java

ViolationLine
Each class should declare at least one constructor32 - 57
Found 'DU'-anomaly for variable 'record' (lines '36'-'55').36 - 55
Found 'DU'-anomaly for variable 'mimeMultipart' (lines '40'-'55').40 - 55
A method should have only one exit point, and that should be the last statement in the method42

org/apache/james/postage/mail/HeaderConstants.java

ViolationLine
Each class should declare at least one constructor26 - 32

org/apache/james/postage/mail/MailAnalyzeStrategy.java

ViolationLine
Found 'DU'-anomaly for variable 'mailProcessingRecord' (lines '45'-'73').45 - 73
A method should have only one exit point, and that should be the last statement in the method50
An empty statement (semicolon) not part of a loop86

org/apache/james/postage/mail/MailFactory.java

ViolationLine
Avoid modifiers which are implied by the context33
Found 'DU'-anomaly for variable 'mailProcessingRecord' (lines '33'-'33').33
Found 'DU'-anomaly for variable 'mailSender' (lines '33'-'33').33
Found 'DU'-anomaly for variable 'mailSession' (lines '33'-'33').33

org/apache/james/postage/mail/MailMatchingUtils.java

ViolationLine
Each class should declare at least one constructor42 - 167
A method should have only one exit point, and that should be the last statement in the method97
A method should have only one exit point, and that should be the last statement in the method109
A method should have only one exit point, and that should be the last statement in the method113
A method should have only one exit point, and that should be the last statement in the method115
Found 'DU'-anomaly for variable 'mailProcessingRecord' (lines '119'-'129').119 - 129
A method should have only one exit point, and that should be the last statement in the method122
Found 'UR'-anomaly for variable 'content' (lines '139'-'139').139
Found 'DU'-anomaly for variable 'mimeType' (lines '139'-'166').139 - 166
A method should have only one exit point, and that should be the last statement in the method150
A method should have only one exit point, and that should be the last statement in the method152

org/apache/james/postage/mail/MailValidator.java

ViolationLine
Avoid modifiers which are implied by the context31
Found 'DU'-anomaly for variable 'message' (lines '31'-'31').31
Found 'DU'-anomaly for variable 'record' (lines '31'-'31').31

org/apache/james/postage/Main.java

ViolationLine
Each class should declare at least one constructor34 - 98
A method should have only one exit point, and that should be the last statement in the method40
Found 'DU'-anomaly for variable 'scenariosToRun' (lines '45'-'69').45 - 69
Found 'DU'-anomaly for variable 'scenariosToRun' (lines '45'-'69').45 - 69
Found 'DU'-anomaly for variable 'configurations' (lines '58'-'69').58 - 69
Found 'DU'-anomaly for variable 'configurations' (lines '58'-'69').58 - 69
Found 'DU'-anomaly for variable 'scenariosToRun' (lines '71'-'92').71 - 92
Found 'DD'-anomaly for variable 'playedScenarioCounter' (lines '73'-'81').73 - 81
Found 'DD'-anomaly for variable 'playedScenarioCounter' (lines '81'-'81').81
Assigning an Object to null is a code smell. Consider refactoring.86

org/apache/james/postage/PostageRunner.java

ViolationLine
Perhaps 'm_jvmResourceController' could be replaced by a local variable.72
Perhaps 'm_minutesRunning' could be replaced by a local variable.74
An empty statement (semicolon) not part of a loop196
An empty statement (semicolon) not part of a loop291
Found 'DU'-anomaly for variable 'externalUsernamePrefix' (lines '308'-'316').308 - 316
Found 'DU'-anomaly for variable 'internalUsernamePrefix' (lines '381'-'412').381 - 412
Found 'DU'-anomaly for variable 'internalPassword' (lines '382'-'412').382 - 412
Found 'DU'-anomaly for variable 'existingUsers' (lines '384'-'412').384 - 412

org/apache/james/postage/result/JVMResourcesRecord.java

ViolationLine
Each class should declare at least one constructor26 - 136
Perhaps 'm_timestamp' could be replaced by a local variable.29

org/apache/james/postage/result/MailProcessingRecord.java

ViolationLine
Each class should declare at least one constructor28 - 331
Use explicit scoping instead of the default package private level33
Use explicit scoping instead of the default package private level34
Use explicit scoping instead of the default package private level36
Use explicit scoping instead of the default package private level37
Use explicit scoping instead of the default package private level38
Use explicit scoping instead of the default package private level39
Use explicit scoping instead of the default package private level40
Use explicit scoping instead of the default package private level41
Use explicit scoping instead of the default package private level42
Use explicit scoping instead of the default package private level43
Use explicit scoping instead of the default package private level44
Use explicit scoping instead of the default package private level45
Use explicit scoping instead of the default package private level46
Use explicit scoping instead of the default package private level47
Use explicit scoping instead of the default package private level48
Use explicit scoping instead of the default package private level50
Use explicit scoping instead of the default package private level51
Use explicit scoping instead of the default package private level52
Use explicit scoping instead of the default package private level53
Use explicit scoping instead of the default package private level54
Use explicit scoping instead of the default package private level55
Use explicit scoping instead of the default package private level56
Use explicit scoping instead of the default package private level57

org/apache/james/postage/result/PostageRunnerResult.java

ViolationLine
Found 'DU'-anomaly for variable 'descriptionItems' (lines '30'-'30').30
Found 'DU'-anomaly for variable 'mailProcessingRecord' (lines '36'-'36').36
Found 'DU'-anomaly for variable 'mailProcessingRecord' (lines '43'-'43').43
Found 'DU'-anomaly for variable 'matchedAndMergedRecord' (lines '49'-'49').49
Found 'DU'-anomaly for variable 'jvmResourcesRecord' (lines '51'-'51').51
Found 'DU'-anomaly for variable 'errorMessage' (lines '63'-'63').63
Found 'DU'-anomaly for variable 'errorNumber' (lines '63'-'63').63
Found 'DU'-anomaly for variable 'filenameJVMStatistics' (lines '67'-'67').67
Found 'DU'-anomaly for variable 'flushMatchedMailOnly' (lines '67'-'67').67
Found 'DU'-anomaly for variable 'filenameErros' (lines '67'-'67').67
Found 'DU'-anomaly for variable 'filenameMailResults' (lines '67'-'67').67

org/apache/james/postage/result/PostageRunnerResultImpl.java

ViolationLine
Each class should declare at least one constructor38 - 292
A method should have only one exit point, and that should be the last statement in the method72
A method should have only one exit point, and that should be the last statement in the method74
A method should have only one exit point, and that should be the last statement in the method85
Found 'DU'-anomaly for variable 'outputStreamWriter' (lines '174'-'181').174 - 181
Found 'DU'-anomaly for variable 'flushMatchedMailOnly' (lines '195'-'199').195 - 199
Found 'DD'-anomaly for variable 'outputStream' (lines '202'-'205').202 - 205
Found 'DD'-anomaly for variable 'outputStreamWriter' (lines '203'-'206').203 - 206
Found 'DD'-anomaly for variable 'outputStream' (lines '223'-'226').223 - 226
Found 'DD'-anomaly for variable 'outputStreamWriter' (lines '224'-'227').224 - 227
Found 'DU'-anomaly for variable 'outputStreamWriter' (lines '243'-'252').243 - 252
Found 'DD'-anomaly for variable 'outputStream' (lines '255'-'258').255 - 258
Found 'DD'-anomaly for variable 'outputStreamWriter' (lines '256'-'259').256 - 259
Use explicit scoping instead of the default package private level295
Use explicit scoping instead of the default package private level296
Use explicit scoping instead of the default package private level297

org/apache/james/postage/smtpserver/AvalonToPostageLogger.java

ViolationLine
Each class should declare at least one constructor29 - 103
Found 'DU'-anomaly for variable 'string' (lines '99'-'101').99 - 101

org/apache/james/postage/smtpserver/SimpleMailServer.java

ViolationLine
Each class should declare at least one constructor50 - 111
Perhaps 'm_counter' could be replaced by a local variable.54
Found 'DU'-anomaly for variable 'sender' (lines '57'-'63').57 - 63
Found 'DU'-anomaly for variable 'recipients' (lines '57'-'63').57 - 63
Found 'DU'-anomaly for variable 'sender' (lines '65'-'68').65 - 68
Found 'DU'-anomaly for variable 'recipients' (lines '65'-'68').65 - 68
Found 'DU'-anomaly for variable 'msg' (lines '65'-'68').65 - 68
Found 'DU'-anomaly for variable 'userName' (lines '91'-'93').91 - 93
Found 'DU'-anomaly for variable 'userName' (lines '100'-'102').100 - 102
Found 'DU'-anomaly for variable 'password' (lines '100'-'102').100 - 102
Found 'DU'-anomaly for variable 'serverName' (lines '104'-'106').104 - 106

org/apache/james/postage/smtpserver/SimpleServiceManager.java

ViolationLine
Each class should declare at least one constructor30 - 49
Found 'DU'-anomaly for variable 'object' (lines '46'-'48').46 - 48

org/apache/james/postage/smtpserver/SMTPMailSink.java

ViolationLine
Each class should declare at least one constructor45 - 115
Perhaps 'm_smtpServer' could be replaced by a local variable.51
Found 'DU'-anomaly for variable 'string' (lines '89'-'91').89 - 91
Found 'DU'-anomaly for variable 'string' (lines '93'-'95').93 - 95
Found 'DU'-anomaly for variable 'string' (lines '97'-'99').97 - 99
A method should have only one exit point, and that should be the last statement in the method105

org/apache/james/postage/smtpserver/TrivialMailContext.java

ViolationLine
Each class should declare at least one constructor35 - 125
Found 'DU'-anomaly for variable 'message' (lines '37'-'39').37 - 39
Found 'DU'-anomaly for variable 'mail' (lines '37'-'39').37 - 39
Found 'DU'-anomaly for variable 'message' (lines '41'-'43').41 - 43
Found 'DU'-anomaly for variable 'mail' (lines '41'-'43').41 - 43
Found 'DU'-anomaly for variable 'bouncer' (lines '41'-'43').41 - 43
Found 'DU'-anomaly for variable 'host' (lines '45'-'47').45 - 47
Found 'DU'-anomaly for variable 'name' (lines '53'-'55').53 - 55
Found 'DU'-anomaly for variable 'serverName' (lines '73'-'75').73 - 75
Found 'DU'-anomaly for variable 'userAccount' (lines '77'-'79').77 - 79
Found 'DU'-anomaly for variable 'message' (lines '81'-'83').81 - 83
Found 'DU'-anomaly for variable 'message' (lines '85'-'87').85 - 87
Found 'DU'-anomaly for variable 't' (lines '85'-'87').85 - 87
Found 'DU'-anomaly for variable 'name' (lines '89'-'91').89 - 91
Found 'DU'-anomaly for variable 'msg' (lines '93'-'95').93 - 95
Found 'DU'-anomaly for variable 'sender' (lines '97'-'99').97 - 99
Found 'DU'-anomaly for variable 'recipients' (lines '97'-'99').97 - 99
Found 'DU'-anomaly for variable 'msg' (lines '97'-'99').97 - 99
Found 'DU'-anomaly for variable 'sender' (lines '101'-'103').101 - 103
Found 'DU'-anomaly for variable 'recipients' (lines '101'-'103').101 - 103
Found 'DU'-anomaly for variable 'state' (lines '101'-'103').101 - 103
Found 'DU'-anomaly for variable 'msg' (lines '101'-'103').101 - 103
Found 'DU'-anomaly for variable 'mail' (lines '105'-'107').105 - 107
Found 'DU'-anomaly for variable 'name' (lines '109'-'111').109 - 111
Found 'DU'-anomaly for variable 'object' (lines '109'-'111').109 - 111
Found 'DU'-anomaly for variable 'sender' (lines '113'-'115').113 - 115
Found 'DU'-anomaly for variable 'msg' (lines '113'-'115').113 - 115
Found 'DU'-anomaly for variable 'recipient' (lines '113'-'115').113 - 115
Found 'DU'-anomaly for variable 'domainName' (lines '117'-'119').117 - 119
Found 'DU'-anomaly for variable 'arg0' (lines '122'-'124').122 - 124

org/apache/james/postage/user/UserList.java

ViolationLine
Use explicit scoping instead of the default package private level32
Use explicit scoping instead of the default package private level33
Use explicit scoping instead of the default package private level35
Use explicit scoping instead of the default package private level36
Use explicit scoping instead of the default package private level37
A method should have only one exit point, and that should be the last statement in the method76