Fork me on GitHub

PMD Results

The following document contains the results of PMD 5.5.1.

Files

fr/paris/lutece/plugins/directory/modules/gismap/business/DirectoryGismapSourceQuery.java

Violation Line
Avoid unnecessary constructors - the compiler will generate these for you 4950
Document empty constructor 4950

fr/paris/lutece/plugins/directory/modules/gismap/business/RecordsResource.java

Violation Line
Possible God class (WMC=50, ATFD=44, TCC=0.21212121212121213) 34447
The class 'RecordsResource' has a Cyclomatic Complexity of 4 (Highest = 17). 61447
The class 'RecordsResource' has a Standard Cyclomatic Complexity of 4 (Highest = 16). 61447
The class 'RecordsResource' has a Modified Cyclomatic Complexity of 4 (Highest = 16). 61447
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. 62447
The method treatListRecordWS() has an NPath complexity of 8050 200311
Avoid really long methods. 200311
Avoid reassigning parameters such as 'strView' 200
The method 'treatListRecordWS' has a Modified Cyclomatic Complexity of 16. 200311
The method 'treatListRecordWS' has a Cyclomatic Complexity of 17. 200311
Avoid reassigning parameters such as 'strGeoJsonIndex' 200
The method 'treatListRecordWS' has a Standard Cyclomatic Complexity of 16. 200311
Avoid using Literals in Conditional Statements 225
Assigning an Object to null is a code smell. Consider refactoring. 291
The String literal "Could not found the " appears 4 times in this file; the first occurrence is on line 346 346
Avoid unused private methods such as 'getPopupShowLinkProperty(String)'. 373
Avoid unused private methods such as 'getShowCentroidProperty(String)'. 390

fr/paris/lutece/plugins/directory/modules/gismap/business/portlet/GismapDirectoryPortlet.java

Violation Line
Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppPropertiesService' 46
Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppPropertiesService' 46
Document empty constructor 7476
It is a good practice to call super() in a constructor 7476
Avoid unnecessary constructors - the compiler will generate these for you 7476

fr/paris/lutece/plugins/directory/modules/gismap/business/portlet/GismapDirectoryPortletDAO.java

Violation Line
Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' 41
Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' 41
Avoid excessively long variable names like SQL_QUERY_SELECT_DIRECTORY_GISMAP_SOURCES_BY_PORTLET_ID 53
Avoid excessively long variable names like SQL_QUERY_DELETE_DIRECTORY_GISMAP_SOURCES_BY_PORTLET_ID 57
Avoid excessively long variable names like SQL_QUERY_INSERT_DIRECTORY_GISMAP_SOURCES_BY_PORTLET_ID 58
Avoid variables with short names like p 76
Avoid variables with short names like p 146

fr/paris/lutece/plugins/directory/modules/gismap/business/portlet/GismapDirectoryPortletHome.java

Violation Line
Possible unsafe assignment to a non-final static field in a constructor. 53
It is a good practice to call super() in a constructor 5864
Singleton is not thread safe 7376

fr/paris/lutece/plugins/directory/modules/gismap/service/GismapDirectoryService.java

Violation Line
Avoid unused imports such as 'fr.paris.lutece.plugins.directory.modules.gismap.utils.GismapDirectoryUtils' 46
Avoid unused imports such as 'fr.paris.lutece.plugins.directory.modules.gismap.utils.GismapDirectoryUtils' 46
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 120
Avoid declaring a variable if it is unreferenced before a possible exit point. 120

fr/paris/lutece/plugins/directory/modules/gismap/service/GismapProvider.java

Violation Line
Avoid unused imports such as 'javax.servlet.http.HttpServletRequest' 42
Avoid unused imports such as 'javax.servlet.http.HttpServletRequest' 42
Avoid unused imports such as 'javax.servlet.http.HttpSession' 43
Avoid unused imports such as 'javax.servlet.http.HttpSession' 43

fr/paris/lutece/plugins/directory/modules/gismap/web/portlet/GismapDirectoryPortletJspBean.java

Violation Line
A high number of imports can indicate a high degree of coupling within an object. 34537
The class 'GismapDirectoryPortletJspBean' has a Cyclomatic Complexity of 5 (Highest = 10). 73537
Avoid unused private fields such as 'MARK_DIRECTORY_ID'. 84
Avoid unused private fields such as 'PARAMETER_ID_DIRECTORY'. 85
Avoid unused private fields such as 'MESSAGE_YOU_MUST_CHOOSE_A_DIRECTORY'. 86
Avoid unused private fields such as 'PARAMETER_CLOSE_PAGE'. 87
Avoid unused private fields such as 'MESSAGE_DIRECTORY_GEOLOCATION_MISCONFIG'. 98
Avoid unused private fields such as 'MARK_MAP_SOURCE_LIST'. 104
No need to call String.valueOf to append to a string. 145
No need to call String.valueOf to append to a string. 205
No need to call String.valueOf to append to a string. 211
Avoid unused private methods such as 'removeMapSourceFromPortlet(int,String)'. 221
Avoid unused method parameters such as 'nPortletId'. 221
Avoid unused method parameters such as 'directoryMapSourceToRemove'. 221
Avoid unused method parameters such as 'nPortletId'. 227
Avoid unused method parameters such as 'listMapSources'. 227
Avoid unused private methods such as 'addMapSourceToPortlet(int,List)'. 227
Avoid declaring a variable if it is unreferenced before a possible exit point. 245
Avoid declaring a variable if it is unreferenced before a possible exit point. 250
Avoid declaring a variable if it is unreferenced before a possible exit point. 251
Avoid declaring a variable if it is unreferenced before a possible exit point. 252
No need to call String.valueOf to append to a string. 294
Position literals first in String comparisons 295
The method 'doModify' has a Cyclomatic Complexity of 10. 335431
Avoid declaring a variable if it is unreferenced before a possible exit point. 351
Avoid declaring a variable if it is unreferenced before a possible exit point. 356
Avoid declaring a variable if it is unreferenced before a possible exit point. 357
Avoid declaring a variable if it is unreferenced before a possible exit point. 358
No need to call String.valueOf to append to a string. 399
Position literals first in String comparisons 400
Avoid unused private methods such as 'CheckGeolocationParams(int)'. 442
Method names should not start with capital letters 442
Avoid declaring a variable if it is unreferenced before a possible exit point. 444
Deeply nested if..then statements are hard to read 465468
An empty statement (semicolon) not part of a loop 468
Method names should not start with capital letters 497
These nested if statements could be combined 522527

fr/paris/lutece/plugins/directory/modules/gismap/web/rs/RecordsResourceRest.java

Violation Line
Rather than using a lot of String arguments, consider using a container object for those values. 5763