PMD Results

The following document contains the results of PMD 4.3.

Files

de/fub/mi/idenpa/sp/servlet/VerifierServlet.java

ViolationLine
No need to import a type that lives in the same package59
The class 'VerifierServlet' has a Cyclomatic Complexity of 5 (Highest = 11).64 - 333
Perhaps 'm_objStorage' could be replaced by a local variable.74
Avoid unused private fields such as 'ERROR_GEN_ERROR'.92
Parameter 'config' is not assigned and could be declared final104
Parameter 'req' is not assigned and could be declared final122
Parameter 'resp' is not assigned and could be declared final122
Local variable 'ctx' could be declared final125
Local variable 'fLoc' could be declared final128
Avoid if (x != y) ..; else ..;134 - 146
Local variable 'specUriStr' could be declared final137
Found 'DD'-anomaly for variable 'specUri' (lines '138'-'140').138 - 140
Avoid using Literals in Conditional Statements139
Avoid using Literals in Conditional Statements141
Local variable 'preq' could be declared final142
Local variable 'rctx' could be declared final143
The method 'doPost' has a Cyclomatic Complexity of 11.155 - 187
Parameter 'req' is not assigned and could be declared final155
Parameter 'resp' is not assigned and could be declared final155
Local variable 'ctx' could be declared final162
These nested if statements could be combined166 - 172
Local variable 'vreq' could be declared final167
Avoid using Literals in Conditional Statements168
These nested if statements could be combined179 - 183
Local variable 'vres' could be declared final180
Parameter 'code' is not assigned and could be declared final196
Parameter 'resp' is not assigned and could be declared final196
Found 'DD'-anomaly for variable 'out' (lines '201'-'204').201 - 204
Found 'DD'-anomaly for variable 'out' (lines '201'-'207').201 - 207
Found 'DD'-anomaly for variable 'out' (lines '201'-'210').201 - 210
Found 'DD'-anomaly for variable 'out' (lines '201'-'213').201 - 213
Found 'DD'-anomaly for variable 'out' (lines '201'-'216').201 - 216
Switch statements should have a default label202 - 218
Parameter 'ctx' is not assigned and could be declared final234
Parameter 'req' is not assigned and could be declared final234
Parameter 'resp' is not assigned and could be declared final234
Found 'DD'-anomaly for variable 'result' (lines '237'-'238').237 - 238
Avoid unused private methods such as 'sendSuccess(HttpServletResponse,String)'.253
Parameter 'result' is not assigned and could be declared final253
Parameter 'resp' is not assigned and could be declared final253
Parameter 'fLoc' is not assigned and could be declared final269
Parameter 'resp' is not assigned and could be declared final269
Found 'DD'-anomaly for variable 'url' (lines '273'-'275').273 - 275
Found 'DD'-anomaly for variable 'reader' (lines '279'-'281').279 - 281
Found 'DD'-anomaly for variable 'reader' (lines '279'-'283').279 - 283
Avoid if (x != y) ..; else ..;280 - 284
Avoid using Literals in Conditional Statements280
Avoid using Literals in Conditional Statements285
Found 'DD'-anomaly for variable 'line' (lines '286'-'287').286 - 287
Avoid assignments in operands287
Found 'DU'-anomaly for variable 'line' (lines '287'-'293').287 - 293
Avoid unused private methods such as 'toString(ServletInputStream)'.301
Parameter 'is' is not assigned and could be declared final301
Found 'DD'-anomaly for variable 'result' (lines '304'-'321').304 - 321
Avoid using Literals in Conditional Statements307
Local variable 'writer' could be declared final308
Local variable 'buffer' could be declared final310
Local variable 'reader' could be declared final312 - 313
Avoid assignments in operands315
Found 'DU'-anomaly for variable 'n' (lines '315'-'331').315 - 331

de/fub/mi/idenpa/sp/servlet/VerifierServletConfig.java

ViolationLine
Private field 'm_strSrvPath' could be made final; it is only initialized in the declaration or constructor.75
Private field 'SPECS' could be made final; it is only initialized in the declaration or constructor.93
Private field 'VERIFYMAP' could be made final; it is only initialized in the declaration or constructor.96
Perhaps 'VERIFYMAP' could be replaced by a local variable.96
Parameter 'cfg' is not assigned and could be declared final104
Avoid if (x != y) ..; else ..;124 - 129
Avoid using Literals in Conditional Statements124
Parameter 'id' is not assigned and could be declared final155
Parameter 'ecode' is not assigned and could be declared final171
Parameter 'emsg' is not assigned and could be declared final171
Parameter 'structId' is not assigned and could be declared final203
Found 'DD'-anomaly for variable 'result' (lines '204'-'209').204 - 209
Local variable 'location' could be declared final205
Avoid if (x != y) ..; else ..;206 - 213
Avoid using Literals in Conditional Statements206
Local variable 'spec' could be declared final207 - 208
Parameter 'structId' is not assigned and could be declared final221
Found 'DD'-anomaly for variable 'result' (lines '222'-'225').222 - 225
Local variable 'location' could be declared final223
Avoid if (x != y) ..; else ..;224 - 228
Avoid using Literals in Conditional Statements224
Use block level rather than method level synchronization239 - 251
Parameter 'map' is not assigned and could be declared final239
Parameter 'isOptional' is not assigned and could be declared final239
Local variable 'dest' could be declared final243
Local variable 'scheme' could be declared final244
Position literals first in String comparisons245
Local variable 'f' could be declared final246
Use block level rather than method level synchronization259 - 264
Parameter 'maps' is not assigned and could be declared final259