Fork me on GitHub

Résultats PMD

Le document suivant contient les résultats de PMD 5.3.5.

Fichiers

fr/paris/lutece/plugins/adminsql/business/DataDAO.java

Violation Ligne
Avoid unused imports such as 'java.util.StringTokenizer' 51
Avoid unused imports such as 'java.util.StringTokenizer' 51
Avoid unused private fields such as 'SELECT'. 62
Avoid unused private fields such as 'FROM'. 63
Avoid reassigning parameters such as 'connectionService' 105
Prefer StringBuffer over += for concatenating strings 139
Prefer StringBuffer over += for concatenating strings 148
Prefer StringBuffer over += for concatenating strings 175
Prefer StringBuffer over += for concatenating strings 177
Prefer StringBuffer over += for concatenating strings 204
Consider simply returning the value vs storing it in local variable 'listDataValueSelectedByPK' 243
Ensure that resources like this Connection object are closed after use 255
Ensure that resources like this ResultSet object are closed after use 263
Assigning an Object to null is a code smell. Consider refactoring. 291
A throw statement in a finally block makes the control flow hard to understand. 295310
New exception is thrown in catch block, original stack trace may be lost 306
Avoid unused local variables such as 'listFields'. 322
Avoid declaring a variable if it is unreferenced before a possible exit point. 322
New exception is thrown in catch block, original stack trace may be lost 372
New exception is thrown in catch block, original stack trace may be lost 387

fr/paris/lutece/plugins/adminsql/business/DataHome.java

Violation Ligne
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 55174

fr/paris/lutece/plugins/adminsql/business/Field.java

Violation Ligne
Too many fields 40350
Avoid unused private fields such as '_strCommentValue'. 52

fr/paris/lutece/plugins/adminsql/business/FieldDAO.java

Violation Ligne
Possible God class (WMC=49, ATFD=74, TCC=0.05) 34656
The class 'FieldDAO' has a Cyclomatic Complexity of 4 (Highest = 16). 52656
Avoid unused private fields such as 'FOREIGN_KEY'. 61
Avoid unused private fields such as 'INDEX_KEY'. 62
Avoid unused private fields such as 'UNIQUE_KEY'. 63
Avoid unused private fields such as 'POOL_ADMINSQL'. 66
The method 'load' has a Cyclomatic Complexity of 16. 91153
Position literals first in String comparisons 106
Position literals first in String comparisons 106
Position literals first in String comparisons 106
Position literals first in String comparisons 107
Position literals first in String comparisons 107
Position literals first in String comparisons 108
Position literals first in String comparisons 108
Position literals first in String comparisons 109
Position literals first in String comparisons 109
Position literals first in String comparisons 110
Position literals first in String comparisons 110
Position literals first in String comparisons 111
Position literals first in String comparisons 132
The method 'store' has a Cyclomatic Complexity of 10. 164236
Position literals first in String comparisons 178
Position literals first in String comparisons 192
Position literals first in String comparisons 219
Position literals first in String comparisons 258
Position literals first in String comparisons 272
Avoid unused local variables such as 'strFieldLabelKeyValue'. 284
Avoid using Literals in Conditional Statements 287
Position literals first in String comparisons 299
Prefer StringBuffer over += for concatenating strings 306
Avoid unused local variables such as 'nAddFieldEndOfTable'. 309
Avoid unused local variables such as 'nAddFieldBeginningOfTable'. 310
Avoid unused local variables such as 'nAddFieldAfterAField'. 311
Avoid using Literals in Conditional Statements 315
Avoid using Literals in Conditional Statements 327
Avoid reassigning parameters such as 'plugin' 407
Avoid reassigning parameters such as 'plugin' 434
Avoid reassigning parameters such as 'plugin' 488
Avoid reassigning parameters such as 'plugin' 514
Avoid reassigning parameters such as 'plugin' 540
Avoid reassigning parameters such as 'plugin' 566
Avoid reassigning parameters such as 'plugin' 592
Avoid reassigning parameters such as 'plugin' 618

fr/paris/lutece/plugins/adminsql/business/FieldHome.java

Violation Ligne
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 46150

fr/paris/lutece/plugins/adminsql/business/FieldValues.java

Violation Ligne
Avoid unnecessary constructors - the compiler will generate these for you 4850
Document empty constructor 4850

fr/paris/lutece/plugins/adminsql/business/IDataDAO.java

Violation Ligne
No need to import a type that lives in the same package 44
Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' 46
Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' 46
Avoid unused imports such as 'fr.paris.lutece.util.ReferenceList' 47
Avoid unused imports such as 'fr.paris.lutece.util.ReferenceList' 47
Avoid unused imports such as 'java.sql.SQLException' 49
Avoid unused imports such as 'java.sql.SQLException' 49
Avoid modifiers which are implied by the context 105106
Avoid modifiers which are implied by the context 123124

fr/paris/lutece/plugins/adminsql/business/IFieldDAO.java

Violation Ligne
No need to import a type that lives in the same package 36
Avoid unused imports such as 'java.sql.SQLException' 40
Avoid unused imports such as 'java.sql.SQLException' 40

fr/paris/lutece/plugins/adminsql/business/IStructureTableDAO.java

Violation Ligne
Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' 37
Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' 37
Avoid unused imports such as 'java.util.Collection' 39
Avoid unused imports such as 'java.util.Collection' 39

fr/paris/lutece/plugins/adminsql/business/ITableDAO.java

Violation Ligne
Avoid unused imports such as 'java.sql.ResultSet' 38
Avoid unused imports such as 'java.sql.ResultSet' 38
Avoid unused imports such as 'java.sql.SQLException' 39
Avoid unused imports such as 'java.sql.SQLException' 39

fr/paris/lutece/plugins/adminsql/business/StructureTableDAO.java

Violation Ligne
Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' 37
Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' 37
Avoid unused imports such as 'fr.paris.lutece.util.sql.DAOUtil' 40
Avoid unused imports such as 'fr.paris.lutece.util.sql.DAOUtil' 40
Avoid unused imports such as 'java.util.Collection' 49
Avoid unused imports such as 'java.util.Collection' 49
Avoid unused private fields such as 'SQL_QUERY_NEW_PK'. 59
Avoid unused private fields such as 'SQL_QUERY_SELECT'. 60
Avoid unused private fields such as 'SQL_QUERY_INSERT'. 61
Avoid unused private fields such as 'SQL_QUERY_DELETE'. 62
Avoid unused private fields such as 'SQL_QUERY_UPDATE'. 63
Ensure that resources like this Connection object are closed after use 107
Ensure that resources like this ResultSet object are closed after use 116
Assigning an Object to null is a code smell. Consider refactoring. 144
A throw statement in a finally block makes the control flow hard to understand. 148163
New exception is thrown in catch block, original stack trace may be lost 159

fr/paris/lutece/plugins/adminsql/business/StructureTableHome.java

Violation Ligne
Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' 37
Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' 37
Avoid unused imports such as 'java.util.Collection' 40
Avoid unused imports such as 'java.util.Collection' 40

fr/paris/lutece/plugins/adminsql/business/Table.java

Violation Ligne
Document empty method 7072
Document empty method 7577

fr/paris/lutece/plugins/adminsql/business/TableDAO.java

Violation Ligne
Avoid unused private fields such as 'CHANGE'. 57
Avoid unused private fields such as 'ADD'. 58
Avoid unused private fields such as 'FOREIGN_KEY'. 60
Avoid unused private fields such as 'INDEX_KEY'. 61
Avoid unused private fields such as 'UNIQUE_KEY'. 62
Avoid unused private fields such as 'DROP'. 63
Avoid unused private fields such as 'WHERE'. 65
Avoid unused private fields such as 'SPACE'. 66
Avoid unused private fields such as 'USER'. 67
Avoid unused private fields such as 'PASSWORD'. 68
Avoid unused private fields such as 'SQL_QUERY_SELECT'. 80
Avoid unused private fields such as 'SQL_QUERY_SHOW_DATABASE_TABLES_BY_POOL'. 82
Avoid unused private fields such as 'SQL_QUERY_SELECT_A_TABLE_ON_DATABASE'. 83
Position literals first in String comparisons 135
Avoid unused local variables such as 'strFieldLabelKeyValue'. 147
Avoid using Literals in Conditional Statements 150
Position literals first in String comparisons 162
Prefer StringBuffer over += for concatenating strings 169
System.out.println is used 172
Avoid reassigning parameters such as 'plugin' 342
Avoid reassigning parameters such as 'plugin' 368
Avoid reassigning parameters such as 'plugin' 394
Avoid reassigning parameters such as 'plugin' 420
Avoid reassigning parameters such as 'plugin' 446
Avoid reassigning parameters such as 'plugin' 472

fr/paris/lutece/plugins/adminsql/business/TableHome.java

Violation Ligne
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 47115

fr/paris/lutece/plugins/adminsql/service/AdminSqlConnectionService.java

Violation Ligne
Consider replacing this Hashtable with the newer java.util.Map 49
Avoid using implementation types like 'Hashtable'; use the interface instead 49
Avoid using implementation types like 'Hashtable'; use the interface instead 49

fr/paris/lutece/plugins/adminsql/util/AdminSqlUtil.java

Violation Ligne
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 4959
String.indexOf(char) is faster than String.indexOf(String). 53
String.indexOf(char) is faster than String.indexOf(String). 54
String.indexOf(char) is faster than String.indexOf(String). 55

fr/paris/lutece/plugins/adminsql/web/AdminSqlJspBean.java

Violation Ligne
The class 'AdminSqlJspBean' has a Cyclomatic Complexity of 5 (Highest = 23). 641346
Too many fields 641346
The class 'AdminSqlJspBean' has a Modified Cyclomatic Complexity of 3 (Highest = 18). 641346
Avoid really long classes. 641346
The class 'AdminSqlJspBean' has a Standard Cyclomatic Complexity of 3 (Highest = 18). 641346
Avoid unused private fields such as 'MESSAGE_TITLE_INVALID_CHARACTERS'. 70
Avoid unused private fields such as 'PROPERTY_CONFIRM_MODIFY_FIELD'. 86
Avoid unused private fields such as 'PARAMETER_DATA_ID'. 99
Avoid unused private fields such as 'PARAMETER_LABEL_TYPE_VALUE'. 101
Avoid unused private fields such as 'PARAMETER_NULL_VALUE'. 102
Avoid unused private fields such as 'PARAMETER_FIELD_LABEL_TYPE'. 103
Avoid unused private fields such as 'PARAMETER_FIELD_NULL'. 106
Avoid unused private fields such as 'PARAMETER_FIELD_COMMENT'. 107
Avoid unused private fields such as 'PARAMETER_FIELD_KEY'. 108
Avoid unused private fields such as 'PARAMETER_FIELDS_NUMBER_ADDING'. 114
Avoid unused private fields such as 'PARAMETER_NUMBER_FIELDS_TABLE'. 117
Avoid unused private fields such as 'PARAMETER_DATA'. 118
Avoid unused private fields such as 'PARAMETER_CONCAT_FIELDNAME_DATA'. 119
Avoid unused private fields such as 'PARAMETER_DB_TYPE_NAME'. 121
Avoid unused private fields such as 'PARAMETER_IDENTIFIANT_USER'. 122
Avoid unused private fields such as 'PARAMETER_PASSWORD_USER'. 123
Avoid unused private fields such as 'PARAMETER_ROW_TO_MODIFY'. 124
Avoid unused private fields such as 'MARK_DATA_LIST_TO_MODIFY'. 135
Avoid unused private fields such as 'MARK_PRIMARY_KEY_LIST'. 136
Avoid unused private fields such as 'MARK_FIELD_NAME_REFERENCE_LIST'. 143
Avoid unused private fields such as 'MARK_NUMBER_FIELDS_TABLE'. 146
Avoid unused private fields such as 'MARK_CONCAT_PRIMARY_KEY_AND_VALUE'. 147
Avoid unused private fields such as 'MARK_DATABASE_TYPE_LIST'. 151
Avoid unused private fields such as 'MARK_DB_TYPE_NAME'. 152
Avoid unused private fields such as 'MARK_SQL_ERROR'. 153
Avoid unused private fields such as 'MARK_DUMP_SCRIPT'. 154
Avoid unused private fields such as 'JSP_DO_MODIFY_FIELD_STRUCTURE'. 167
Avoid unused private fields such as 'PROPERTY_DATABASE_TYPE_LIST'. 174
Avoid unused private fields such as 'URL_MODIFY_DATA'. 180
Avoid unused private fields such as 'URL_DO_USER_REQUEST_ERROR'. 182
The field name indicates a constant but its modifiers do not 186
Private field 'TEMPLATE_MANAGE_POOL_SQL' could be made final; it is only initialized in the declaration or constructor. 186
Private field 'TEMPLATE_MANAGE_TABLE_SQL' could be made final; it is only initialized in the declaration or constructor. 187
The field name indicates a constant but its modifiers do not 187
Private field 'TEMPLATE_MANAGE_DATA_SQL' could be made final; it is only initialized in the declaration or constructor. 188
The field name indicates a constant but its modifiers do not 188
The field name indicates a constant but its modifiers do not 189
Private field 'TEMPLATE_CREATE_DATA' could be made final; it is only initialized in the declaration or constructor. 189
The field name indicates a constant but its modifiers do not 190
Private field 'TEMPLATE_MANAGE_STRUCTURE_SQL' could be made final; it is only initialized in the declaration or constructor. 190
The field name indicates a constant but its modifiers do not 191
Private field 'TEMPLATE_MODIFY_DATA' could be made final; it is only initialized in the declaration or constructor. 191
The field name indicates a constant but its modifiers do not 192
Private field 'TEMPLATE_MODIFY_STRUCTURE' could be made final; it is only initialized in the declaration or constructor. 192
The field name indicates a constant but its modifiers do not 193
Private field 'TEMPLATE_CREATE_STRUCTURE' could be made final; it is only initialized in the declaration or constructor. 193
Private field 'TEMPLATE_CREATE_TABLE' could be made final; it is only initialized in the declaration or constructor. 194
The field name indicates a constant but its modifiers do not 194
The field name indicates a constant but its modifiers do not 195
Private field 'TEMPLATE_MODIFY_TABLE_NAME' could be made final; it is only initialized in the declaration or constructor. 195
Private field 'TEMPLATE_CHOOSE_FONCTIONNALITIES_LIST' could be made final; it is only initialized in the declaration or constructor. 196
The field name indicates a constant but its modifiers do not 196
The field name indicates a constant but its modifiers do not 197
Private field 'TEMPLATE_USER_REQUEST' could be made final; it is only initialized in the declaration or constructor. 197
Private field 'TEMPLATE_RESULT_OF_USER_REQUEST' could be made final; it is only initialized in the declaration or constructor. 198
The field name indicates a constant but its modifiers do not 198
Avoid unused private fields such as 'TEMPLATE_EXPORT_DATABASE'. 199
Private field 'TEMPLATE_EXPORT_DATABASE' could be made final; it is only initialized in the declaration or constructor. 199
The field name indicates a constant but its modifiers do not 199
Avoid unused private fields such as 'TEMPLATE_SQL_ERROR_PAGE'. 200
Private field 'TEMPLATE_SQL_ERROR_PAGE' could be made final; it is only initialized in the declaration or constructor. 200
The field name indicates a constant but its modifiers do not 200
The field name indicates a constant but its modifiers do not 201
Private field 'TEMPLATE_PARAMETER_TO_EXPORT_DATABASE' could be made final; it is only initialized in the declaration or constructor. 201
The field name indicates a constant but its modifiers do not 202
Private field 'TEMPLATE_DUMP_DATABASE' could be made final; it is only initialized in the declaration or constructor. 202
The field name indicates a constant but its modifiers do not 203
Private field 'TEMPLATE_USER_REQUEST_ERROR' could be made final; it is only initialized in the declaration or constructor. 203
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 257
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 277
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 299
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 317
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 339
Avoid using equals() to compare against null 351
The method 'doExportDatabase' has a Modified Cyclomatic Complexity of 18. 407571
Avoid really long methods. 407571
The method doExportDatabase() has an NPath complexity of 2907 407571
The method 'doExportDatabase' has a Cyclomatic Complexity of 23. 407571
The method 'doExportDatabase' has a Standard Cyclomatic Complexity of 18. 407571
Avoid unused local variables such as 'DumpCommandslist'. 416
Avoid declaring a variable if it is unreferenced before a possible exit point. 416
Avoid unused local variables such as 'listRows'. 417
Avoid declaring a variable if it is unreferenced before a possible exit point. 417
StringBuffer constructor is initialized with size 16, but has at least 134 characters appended. 418
StringBuffer (or StringBuilder).append is called 3 consecutive times with literal Strings. Use a single append with a single combined String. 423
The String literal "\n--\n\n" appears 4 times in this file; the first occurrence is on line 423 423
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 423
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 423
StringBuffer (or StringBuilder).append is called 4 consecutive times with literal Strings. Use a single append with a single combined String. 442
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 442
StringBuffer (or StringBuilder).append is called 3 consecutive times with literal Strings. Use a single append with a single combined String. 443
Prefer StringBuffer over += for concatenating strings 450
Position literals first in String comparisons 455
Position literals first in String comparisons 466
Position literals first in String comparisons 489
Prefer StringBuffer over += for concatenating strings 491
Prefer StringBuffer over += for concatenating strings 495
Use equals() to compare strings instead of '==' or '!=' 498
Avoid using Literals in Conditional Statements 498
Prefer StringBuffer over += for concatenating strings 501
Avoid concatenating nonliterals in a StringBuffer/StringBuilder constructor or append(). 510
Prefer StringBuffer over += for concatenating strings 523
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 533
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 533
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 537
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 537
Prefer StringBuffer over += for concatenating strings 548
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 552553
Avoid appending characters as strings in StringBuffer.append. 557
Avoid declaring a variable if it is unreferenced before a possible exit point. 602
Avoid declaring a variable if it is unreferenced before a possible exit point. 604
Avoid declaring a variable if it is unreferenced before a possible exit point. 606
Avoid declaring a variable if it is unreferenced before a possible exit point. 607
Avoid declaring a variable if it is unreferenced before a possible exit point. 608
Position literals first in String comparisons 610
Avoid using equals() to compare against null 610
Avoid using equals() to compare against null 615
Position literals first in String comparisons 615
Avoid declaring a variable if it is unreferenced before a possible exit point. 697
Avoid declaring a variable if it is unreferenced before a possible exit point. 698
Avoid using equals() to compare against null 701
Position literals first in String comparisons 701
The method doCreateFieldStructure() has an NPath complexity of 864 815890
The method 'doCreateFieldStructure' has a Cyclomatic Complexity of 22. 815890
Avoid declaring a variable if it is unreferenced before a possible exit point. 817
Avoid declaring a variable if it is unreferenced before a possible exit point. 818
Avoid declaring a variable if it is unreferenced before a possible exit point. 820
Avoid declaring a variable if it is unreferenced before a possible exit point. 821
Avoid declaring a variable if it is unreferenced before a possible exit point. 822
Avoid declaring a variable if it is unreferenced before a possible exit point. 823
Position literals first in String comparisons 825
Avoid using equals() to compare against null 825
Avoid declaring a variable if it is unreferenced before a possible exit point. 832
Avoid declaring a variable if it is unreferenced before a possible exit point. 833
Avoid declaring a variable if it is unreferenced before a possible exit point. 847
The method 'doModifyFieldStructure' has a Cyclomatic Complexity of 23. 9251003
The method doModifyFieldStructure() has an NPath complexity of 1728 9251003
Avoid declaring a variable if it is unreferenced before a possible exit point. 927
Avoid declaring a variable if it is unreferenced before a possible exit point. 928
Avoid declaring a variable if it is unreferenced before a possible exit point. 930
Avoid declaring a variable if it is unreferenced before a possible exit point. 931
Avoid declaring a variable if it is unreferenced before a possible exit point. 932
Avoid declaring a variable if it is unreferenced before a possible exit point. 935
Position literals first in String comparisons 937
Avoid using equals() to compare against null 937
Avoid declaring a variable if it is unreferenced before a possible exit point. 944
Avoid declaring a variable if it is unreferenced before a possible exit point. 945
Avoid declaring a variable if it is unreferenced before a possible exit point. 1065
Avoid unused local variables such as 'nNumberFields'. 1065
Avoid declaring a variable if it is unreferenced before a possible exit point. 1067
Avoid unused local variables such as 'nNumberData'. 1067
Avoid declaring a variable if it is unreferenced before a possible exit point. 1068
Avoid unused local variables such as 'nNumberOfRow'. 1068
Avoid variables with short names like n 1069
Prefer StringBuffer over += for concatenating strings 1081
Avoid using Literals in Conditional Statements 1163
Prefer StringBuffer over += for concatenating strings 1165
Avoid unused local variables such as 'listConcatFieldNameAndData'. 1238
Avoid declaring a variable if it is unreferenced before a possible exit point. 1238
Avoid declaring a variable if it is unreferenced before a possible exit point. 1239
Avoid unused local variables such as 'listConcatFieldNameAndOldData'. 1239
Prefer StringBuffer over += for concatenating strings 1299
Avoid unused local variables such as 'listFieldsNames'. 1323
Avoid declaring a variable if it is unreferenced before a possible exit point. 1323
Avoid declaring a variable if it is unreferenced before a possible exit point. 1327
Avoid unused local variables such as 'strConcatFieldNameAndData'. 1327