PMD Results

The following document contains the results of PMD 4.3.

Files

de/fub/mi/idenpa/client/storage/StorageConfig.java

ViolationLine
Private field 'm_strPw' could be made final; it is only initialized in the declaration or constructor.36
Parameter 'pw' is not assigned and could be declared final43

de/fub/mi/idenpa/client/storage/StorageWrapper.java

ViolationLine
A class which only has private constructors should be final49 - 169
Private field 'm_objCredStore' could be made final; it is only initialized in the declaration or constructor.58
Private field 'm_objProofStore' could be made final; it is only initialized in the declaration or constructor.61
Private field 'm_objMsStore' could be made final; it is only initialized in the declaration or constructor.64
Private field 'm_objTmpStore' could be made final; it is only initialized in the declaration or constructor.67
Private field 'm_objCfgStore' could be made final; it is only initialized in the declaration or constructor.70
Parameter 'pw' is not assigned and could be declared final81
Avoid using Literals in Conditional Statements84
Prefer StringBuffer over += for concatenating strings85
Use block level rather than method level synchronization103 - 107
Parameter 'pw' is not assigned and could be declared final103
Avoid using Literals in Conditional Statements104
Assigning an Object to null is a code smell. Consider refactoring.164
Assigning an Object to null is a code smell. Consider refactoring.165

de/fub/mi/idenpa/client/storage/jdbc/ConfigStorage.java

ViolationLine
A class which only has private constructors should be final40 - 161
Parameter 'conn' is not assigned and could be declared final65
Use block level rather than method level synchronization79 - 85
Parameter 'conn' is not assigned and could be declared final79
Avoid using Literals in Conditional Statements81
Ensure that resources like this Statement object are closed after use94
Local variable 'st' could be declared final94
Assigning an Object to null is a code smell. Consider refactoring.109
Assigning an Object to null is a code smell. Consider refactoring.110
Parameter 'value' is not assigned and could be declared final118
Parameter 'key' is not assigned and could be declared final118
Avoid using Literals in Conditional Statements119
Ensure that resources like this Statement object are closed after use121
Local variable 'st' could be declared final121
Ensure that resources like this Statement object are closed after use130
Local variable 'st' could be declared final130
Parameter 'key' is not assigned and could be declared final144
Found 'DD'-anomaly for variable 'result' (lines '145'-'151').145 - 151
Ensure that resources like this Statement object are closed after use148
Local variable 'st' could be declared final148
Ensure that resources like this ResultSet object are closed after use149
Local variable 'rs' could be declared final149

de/fub/mi/idenpa/client/storage/jdbc/CredentialStorage.java

ViolationLine
Avoid unused imports such as 'java.util.HashMap'30
A class which only has private constructors should be final45 - 223
Parameter 'connector' is not assigned and could be declared final70
Use block level rather than method level synchronization83 - 88
Parameter 'jdbc' is not assigned and could be declared final83
Avoid using Literals in Conditional Statements84
Ensure that resources like this Statement object are closed after use97
Local variable 'st' could be declared final97
Parameter 'credUri' is not assigned and could be declared final109
Parameter 'ipkUri' is not assigned and could be declared final109
Parameter 'value' is not assigned and could be declared final109
Found 'DD'-anomaly for variable 'result' (lines '111'-'112').111 - 112
Local variable 'instance' could be declared final115 - 116
Ensure that resources like this Statement object are closed after use117
Local variable 'st' could be declared final117
Parameter 'credUri' is not assigned and could be declared final135
Parameter 'ipkUri' is not assigned and could be declared final135
Found 'DD'-anomaly for variable 'result' (lines '136'-'146').136 - 146
Ensure that resources like this Statement object are closed after use139
Local variable 'st' could be declared final139
Ensure that resources like this ResultSet object are closed after use140
Local variable 'rs' could be declared final140 - 142
Local variable 'val' could be declared final144
Avoid using Literals in Conditional Statements145
Parameter 'credUri' is not assigned and could be declared final164
Parameter 'ipkUri' is not assigned and could be declared final164
Ensure that resources like this Statement object are closed after use167
Local variable 'st' could be declared final167
Local variable 'result' could be declared final183
Ensure that resources like this Statement object are closed after use186
Local variable 'st' could be declared final186
Ensure that resources like this ResultSet object are closed after use187
Local variable 'rs' could be declared final187
Local variable 'credUri' could be declared final189
Local variable 'ipkUri' could be declared final190
Local variable 'val' could be declared final191
Avoid instantiating new objects inside loops193
Assigning an Object to null is a code smell. Consider refactoring.218
Assigning an Object to null is a code smell. Consider refactoring.219

de/fub/mi/idenpa/client/storage/jdbc/JDBCConnector.java

ViolationLine
A class which only has private constructors should be final48 - 249
Parameter 'pwd' is not assigned and could be declared final84
Local variable 'dbFile' could be declared final92
Local variable 'f' could be declared final93
Local variable 'url' could be declared final100
Local variable 'userPass' could be declared final101 - 102
New exception is thrown in catch block, original stack trace may be lost109
New exception is thrown in catch block, original stack trace may be lost111
Use block level rather than method level synchronization124 - 129
Avoid using Literals in Conditional Statements126
Use block level rather than method level synchronization138 - 145
Parameter 'pwd' is not assigned and could be declared final138
Avoid if (x != y) ..; else ..;140 - 143
Avoid using Literals in Conditional Statements140
Use block level rather than method level synchronization152 - 154
Parameter 'tableName' is not assigned and could be declared final162
Found 'DD'-anomaly for variable 'result' (lines '163'-'169').163 - 169
Local variable 'meta' could be declared final166
Avoid using Literals in Conditional Statements167
Ensure that resources like this ResultSet object are closed after use168
Local variable 'res' could be declared final168
Use block level rather than method level synchronization182 - 188
Ensure that resources like this Statement object are closed after use196
Found 'DD'-anomaly for variable 'result' (lines '196'-'198').196 - 198
Found 'DD'-anomaly for variable 'result' (lines '211'-'216').211 - 216
Local variable 'dbHome' could be declared final213
Avoid using Literals in Conditional Statements214
Local variable 'f' could be declared final215
Found 'DD'-anomaly for variable 'result' (lines '227'-'230').227 - 230
Local variable 'userHome' could be declared final228
Avoid using Literals in Conditional Statements229
Assigning an Object to null is a code smell. Consider refactoring.245
Assigning an Object to null is a code smell. Consider refactoring.246

de/fub/mi/idenpa/client/storage/jdbc/MasterSecretStorage.java

ViolationLine
A class which only has private constructors should be final45 - 184
Parameter 'conn' is not assigned and could be declared final70
Use block level rather than method level synchronization84 - 90
Parameter 'conn' is not assigned and could be declared final84
Avoid using Literals in Conditional Statements86
Ensure that resources like this Statement object are closed after use99
Local variable 'st' could be declared final99
Parameter 'gpUri' is not assigned and could be declared final112
Found 'DD'-anomaly for variable 'result' (lines '113'-'115').113 - 115
Found 'DD'-anomaly for variable 'result' (lines '126'-'128').126 - 128
Found 'DD'-anomaly for variable 'result' (lines '138'-'146').138 - 146
Ensure that resources like this Statement object are closed after use141
Local variable 'st' could be declared final141
Ensure that resources like this ResultSet object are closed after use142
Local variable 'rs' could be declared final142
Local variable 'val' could be declared final144
Avoid using Literals in Conditional Statements145
Parameter 'ms' is not assigned and could be declared final163
Ensure that resources like this Statement object are closed after use165
Local variable 'st' could be declared final165
Assigning an Object to null is a code smell. Consider refactoring.179
Assigning an Object to null is a code smell. Consider refactoring.180

de/fub/mi/idenpa/client/storage/jdbc/ProofStorage.java

ViolationLine
A class which only has private constructors should be final44 - 225
Parameter 'connector' is not assigned and could be declared final69
Use block level rather than method level synchronization82 - 87
Parameter 'jdbc' is not assigned and could be declared final82
Avoid using Literals in Conditional Statements83
Ensure that resources like this Statement object are closed after use96
Local variable 'st' could be declared final96
Parameter 'uuid' is not assigned and could be declared final111
Found 'DD'-anomaly for variable 'result' (lines '112'-'124').112 - 124
Ensure that resources like this Statement object are closed after use115
Local variable 'st' could be declared final115
Ensure that resources like this ResultSet object are closed after use116
Local variable 'rs' could be declared final116 - 117
Local variable 'val' could be declared final119
Local variable 'replyTo' could be declared final120
Found 'DU'-anomaly for variable 'replyTo' (lines '120'-'139').120 - 139
Local variable 'proofSpecUri' could be declared final121
Found 'DU'-anomaly for variable 'proofSpecUri' (lines '121'-'139').121 - 139
Local variable 'timestamp' could be declared final122
Found 'DU'-anomaly for variable 'timestamp' (lines '122'-'139').122 - 139
Avoid using Literals in Conditional Statements123
Local variable 'result' could be declared final145
Ensure that resources like this Statement object are closed after use148
Local variable 'st' could be declared final148
Ensure that resources like this ResultSet object are closed after use149
Local variable 'rs' could be declared final149
Local variable 'specUri' could be declared final151
Local variable 'proofVal' could be declared final152
Local variable 'uuid' could be declared final153
Found 'DU'-anomaly for variable 'uuid' (lines '153'-'170').153 - 170
Found 'DD'-anomaly for variable 'uuid' (lines '153'-'153').153
Local variable 'replyTo' could be declared final154
Found 'DU'-anomaly for variable 'replyTo' (lines '154'-'170').154 - 170
Found 'DD'-anomaly for variable 'replyTo' (lines '154'-'154').154
Local variable 'timestamp' could be declared final155
Found 'DU'-anomaly for variable 'timestamp' (lines '155'-'170').155 - 170
Found 'DD'-anomaly for variable 'timestamp' (lines '155'-'155').155
Local variable 'instance' could be declared final157
Avoid instantiating new objects inside loops157
Parameter 'replyTo' is not assigned and could be declared final176
Parameter 'value' is not assigned and could be declared final176
Parameter 'proofSpecUri' is not assigned and could be declared final176
Found 'DD'-anomaly for variable 'result' (lines '177'-'190').177 - 190
Local variable 'instance' could be declared final180 - 181
Ensure that resources like this Statement object are closed after use182
Local variable 'st' could be declared final182
Parameter 'uuid' is not assigned and could be declared final202
Ensure that resources like this Statement object are closed after use204
Local variable 'st' could be declared final204
Assigning an Object to null is a code smell. Consider refactoring.220
Assigning an Object to null is a code smell. Consider refactoring.221

de/fub/mi/idenpa/client/storage/jdbc/TempFileStorage.java

ViolationLine
Private field 'm_objBaseDir' could be made final; it is only initialized in the declaration or constructor.45
Parameter 'baseDir' is not assigned and could be declared final52
Found 'DD'-anomaly for variable 'result' (lines '65'-'67').65 - 67