Fork me on GitHub

Résultats PMD

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

Violations By Priority

Priority 1

fr/paris/lutece/plugins/myportal/service/PageConfigJsonUtil.java

Rule Violation Ligne
AvoidThrowingRawExceptionTypes Avoid throwing raw exception types. 118

fr/paris/lutece/plugins/myportal/util/auth/MyPortalAuthentication.java

Rule Violation Ligne
ReturnEmptyArrayRatherThanNull Return an empty array rather than null. 102–105

Priority 3

fr/paris/lutece/plugins/myportal/business/CategoryDAO.java

Rule Violation Ligne
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 61–78
MissingOverride The method 'insert(Category, Plugin)' is missing an @Override annotation. 83–96
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 101–122
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 127–133
MissingOverride The method 'store(Category, Plugin)' is missing an @Override annotation. 138–150
MissingOverride The method 'selectCategoriesList(Plugin)' is missing an @Override annotation. 155–176
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 157
MissingOverride The method 'selectFirstCategory(Plugin)' is missing an @Override annotation. 181–201

fr/paris/lutece/plugins/myportal/business/ColumnStyleDAO.java

Rule Violation Ligne
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 64–81
MissingOverride The method 'insert(Style, Plugin)' is missing an @Override annotation. 91–103
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 114–134
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 144–150
MissingOverride The method 'store(Style, Plugin)' is missing an @Override annotation. 160–171
MissingOverride The method 'selectStylesList(Plugin)' is missing an @Override annotation. 180–200
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 182

fr/paris/lutece/plugins/myportal/business/DefaultPageBuilderDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 48–439
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 77–94
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 99–108
MissingOverride The method 'deleteByColumnMax(int, Plugin)' is missing an @Override annotation. 113–122
MissingOverride The method 'deleteAll(Plugin)' is missing an @Override annotation. 127–134
MissingOverride The method 'insert(WidgetComponent, Plugin)' is missing an @Override annotation. 139–149
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 154–179
MissingOverride The method 'selectAllWidgetComponents(Plugin)' is missing an @Override annotation. 184–208
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 190
MissingOverride The method 'selectMaxOrder(Plugin)' is missing an @Override annotation. 213–229
MissingOverride The method 'selectMaxOrder(int, Plugin)' is missing an @Override annotation. 234–252
MissingOverride The method 'selectWidgetComponents(WidgetComponentFilter, Plugin)' is missing an @Override annotation. 257–287
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 269
MissingOverride The method 'store(WidgetComponent, Plugin)' is missing an @Override annotation. 292–303
MissingOverride The method 'selectColumns(Plugin)' is missing an @Override annotation. 308–324
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 310
MissingOverride The method 'selectWidgetIds(Plugin)' is missing an @Override annotation. 329–345
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 331
LinguisticNaming Linguistics Antipattern - The setter 'setInsertOrUpdateValues' should not return any type except void linguistically 358–366
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 378
ConfusingTernary Avoid if (x != y) ..; else ..; 400–407

fr/paris/lutece/plugins/myportal/business/DefaultPageBuilderHome.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 49–204

fr/paris/lutece/plugins/myportal/business/IDefaultPageBuilderDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 46–172

fr/paris/lutece/plugins/myportal/business/UserPageConfigDAO.java

Rule Violation Ligne
MissingOverride The method 'insert(UserPageConfig, Plugin)' is missing an @Override annotation. 60–69
MissingOverride The method 'load(String, Plugin)' is missing an @Override annotation. 80–99
MissingOverride The method 'delete(String, Plugin)' is missing an @Override annotation. 109–115
MissingOverride The method 'store(UserPageConfig, Plugin)' is missing an @Override annotation. 125–134

fr/paris/lutece/plugins/myportal/business/WidgetComponent.java

Rule Violation Ligne
MissingOverride The method 'compareTo(WidgetComponent)' is missing an @Override annotation. 163–166
ShortVariable Avoid variables with short names like o 163

fr/paris/lutece/plugins/myportal/business/WidgetDAO.java

Rule Violation Ligne
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 86–103
MissingOverride The method 'insert(Widget, Plugin)' is missing an @Override annotation. 113–134
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 145–177
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 187–193
MissingOverride The method 'store(Widget, Plugin)' is missing an @Override annotation. 203–224
MissingOverride The method 'selectWidgetsList(Plugin)' is missing an @Override annotation. 233–265
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 236
MissingOverride The method 'getPublicMandatoryWidgets(Plugin)' is missing an @Override annotation. 270–304
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 273
MissingOverride The method 'getWidgetsByFilter(WidgetFilter, Plugin)' is missing an @Override annotation. 309–344
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 311
NPathComplexity The method 'buildSQLQuery(WidgetFilter)' has an NPath complexity of 256 353–407
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 426
NPathComplexity The method 'setFilterValues(WidgetFilter, DAOUtil)' has an NPath complexity of 256 446–497

fr/paris/lutece/plugins/myportal/business/WidgetStyleDAO.java

Rule Violation Ligne
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 64–81
MissingOverride The method 'insert(Style, Plugin)' is missing an @Override annotation. 91–103
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 114–134
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 144–150
MissingOverride The method 'store(Style, Plugin)' is missing an @Override annotation. 160–171
MissingOverride The method 'selectStylesList(Plugin)' is missing an @Override annotation. 180–200
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 182

fr/paris/lutece/plugins/myportal/business/WidgetsTag.java

Rule Violation Ligne
CommentRequired Header comments are required 3–45

fr/paris/lutece/plugins/myportal/business/icon/Icon.java

Rule Violation Ligne
MissingOverride The method 'getId()' is missing an @Override annotation. 55–58
MissingOverride The method 'getName()' is missing an @Override annotation. 76–79
MethodReturnsInternalArray Returning '_byValue' may expose an internal array. 99
ArrayIsStoredDirectly The user-supplied array 'value' is stored directly. 108

fr/paris/lutece/plugins/myportal/business/icon/IconDAO.java

Rule Violation Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 94–110
MissingOverride The method 'insert(Icon, Plugin)' is missing an @Override annotation. 94–110
CommentRequired Public method and constructor comments are required 94–110
CommentRequired Public method and constructor comments are required 118–135
MissingOverride The method 'store(Icon, Plugin)' is missing an @Override annotation. 118–135
MissingOverride The method 'storeMetadata(Icon, Plugin)' is missing an @Override annotation. 137–152
CommentRequired Public method and constructor comments are required 137–152
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 159–185
CommentRequired Public method and constructor comments are required 159–185
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 192–199
CommentRequired Public method and constructor comments are required 192–199
CommentRequired Public method and constructor comments are required 206–233
MissingOverride The method 'selectAll(Plugin)' is missing an @Override annotation. 206–233
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 209
CommentRequired Public method and constructor comments are required 240–268
MissingOverride The method 'selectIconFO(boolean, Plugin)' is missing an @Override annotation. 240–268
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 243

fr/paris/lutece/plugins/myportal/business/parameter/PageBuilderParameterDAO.java

Rule Violation Ligne
MissingOverride The method 'selectAll(Plugin)' is missing an @Override annotation. 58–77
MissingOverride The method 'load(String, Plugin)' is missing an @Override annotation. 82–100
MissingOverride The method 'store(ReferenceItem, Plugin)' is missing an @Override annotation. 105–115
MissingOverride The method 'deleteAllColumnStyles(Plugin)' is missing an @Override annotation. 120–126
MissingOverride The method 'insert(ReferenceItem, Plugin)' is missing an @Override annotation. 131–140

fr/paris/lutece/plugins/myportal/service/CategoryService.java

Rule Violation Ligne
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 151

fr/paris/lutece/plugins/myportal/service/DefaultPageBuilderService.java

Rule Violation Ligne
GodClass Possible God Class (WMC=53, ATFD=23, TCC=7.018%) 59–492
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'listWidgetComponents' 120
ConfusingTernary Avoid if (x != y) ..; else ..; 145–175
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 194
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 194
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 210
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 266
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 266
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 286
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 286
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 339
CyclomaticComplexity The method 'updateWidgetComponentColumns(List, WidgetComponent, int, int)' has a cyclomatic complexity of 11. 434–469

fr/paris/lutece/plugins/myportal/service/IconService.java

Rule Violation Ligne
UncommentedEmptyConstructor Document empty constructor 60–62
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the IconService constructor if you want a default access modifier 60–62
MissingOverride The method 'getImageResource(int)' is missing an @Override annotation. 89–104
MissingOverride The method 'getResourceTypeId()' is missing an @Override annotation. 111–114

fr/paris/lutece/plugins/myportal/service/MyPortalPageService.java

Rule Violation Ligne
ImmutableField Private field '_pageBuilder' could be made final; it is only initialized in the declaration or constructor. 63
ImmutableField Private field '_defaultPageBuilderService' could be made final; it is only initialized in the declaration or constructor. 65
NonThreadSafeSingleton Singleton is not thread safe 81–84
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 122
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 126

fr/paris/lutece/plugins/myportal/service/MyPortalResourceIdService.java

Rule Violation Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 61–64
MissingOverride The method 'register()' is missing an @Override annotation. 69–83
ShortVariable Avoid variables with short names like rt 71
ShortVariable Avoid variables with short names like p 77
MissingOverride The method 'getResourceIdList(Locale)' is missing an @Override annotation. 92–95
MissingOverride The method 'getTitle(String, Locale)' is missing an @Override annotation. 106–109

fr/paris/lutece/plugins/myportal/service/PageBuilder.java

Rule Violation Ligne
MissingOverride The method 'buildPage(PageConfig, LuteceUser, HttpServletRequest)' is missing an @Override annotation. 115–145
ShortVariable Avoid variables with short names like sb 117
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 118
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 118
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 162
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 162
ShortVariable Avoid variables with short names like sb 201
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 204
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 204
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 206
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 207
ConfusingTernary Avoid if (x != y) ..; else ..; 213–221

fr/paris/lutece/plugins/myportal/service/PageConfigJsonUtil.java

Rule Violation Ligne
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 89
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 98
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the buildJson method if you want a default access modifier 131–164
DefaultPackage Use explicit scoping instead of the default package private level 131–164

fr/paris/lutece/plugins/myportal/service/StyleService.java

Rule Violation Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 60–68

fr/paris/lutece/plugins/myportal/service/WidgetContentService.java

Rule Violation Ligne
ImmutableField Private field '_cacheWidgetContent' could be made final; it is only initialized in the declaration or constructor. 69
ConfusingTernary Avoid if (x != y) ..; else ..; 146
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 183
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 183

fr/paris/lutece/plugins/myportal/service/WidgetService.java

Rule Violation Ligne
UnusedPrivateField Avoid unused private fields such as 'COMMA'. 71
UnusedPrivateField Avoid unused private fields such as 'PROPERTY_ACCEPTED_ICON_FORMATS'. 76
ImmutableField Private field '_cacheWidget' could be made final; it is only initialized in the declaration or constructor. 86
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 280
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 387
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 387
UnusedPrivateMethod Avoid unused private methods such as 'getIconKey(int)'. 400
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 402
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 402
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 417
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 417
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 430
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 430
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 443
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 443

fr/paris/lutece/plugins/myportal/service/cache/WidgetCacheService.java

Rule Violation Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 49–51
NonThreadSafeSingleton Singleton is not thread safe 60–63
MissingOverride The method 'getName()' is missing an @Override annotation. 71–74

fr/paris/lutece/plugins/myportal/service/cache/WidgetContentCacheService.java

Rule Violation Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 50–52
NonThreadSafeSingleton Singleton is not thread safe 61–64
MissingOverride The method 'getName()' is missing an @Override annotation. 72–75

fr/paris/lutece/plugins/myportal/service/handler/HtmlWidgetHandler.java

Rule Violation Ligne
MissingOverride The method 'renderWidget(Widget, LuteceUser, HttpServletRequest)' is missing an @Override annotation. 54–57
MissingOverride The method 'getName()' is missing an @Override annotation. 62–65
MissingOverride The method 'getDescription()' is missing an @Override annotation. 70–73
MissingOverride The method 'isCustomizable()' is missing an @Override annotation. 78–81

fr/paris/lutece/plugins/myportal/service/handler/WidgetHandlerService.java

Rule Violation Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 63–72

fr/paris/lutece/plugins/myportal/util/auth/MyPortalAuthentication.java

Rule Violation Ligne
MissingOverride The method 'getAuthServiceName()' is missing an @Override annotation. 55–58
MissingOverride The method 'getAuthType(HttpServletRequest)' is missing an @Override annotation. 63–66
MissingOverride The method 'login(String, String, HttpServletRequest)' is missing an @Override annotation. 71–74
MissingOverride The method 'logout(LuteceUser)' is missing an @Override annotation. 79–81
ShortVariable Avoid variables with short names like lu 79
UncommentedEmptyMethodBody Document empty method body 80–81
MissingOverride The method 'getAnonymousUser()' is missing an @Override annotation. 86–89
ShortVariable Avoid variables with short names like lu 94
MissingOverride The method 'isUserInRole(LuteceUser, HttpServletRequest, String)' is missing an @Override annotation. 94–97
MissingOverride The method 'getRolesByUser(LuteceUser)' is missing an @Override annotation. 102–105
ShortVariable Avoid variables with short names like lu 102
MissingOverride The method 'isExternalAuthentication()' is missing an @Override annotation. 110–113
MissingOverride The method 'isDelegatedAuthentication()' is missing an @Override annotation. 118–121
MissingOverride The method 'getHttpAuthenticatedUser(HttpServletRequest)' is missing an @Override annotation. 126–129
MissingOverride The method 'getLoginPageUrl()' is missing an @Override annotation. 134–137
MissingOverride The method 'getDoLoginUrl()' is missing an @Override annotation. 142–145
MissingOverride The method 'getDoLogoutUrl()' is missing an @Override annotation. 150–153
MissingOverride The method 'getNewAccountPageUrl()' is missing an @Override annotation. 158–161
MissingOverride The method 'getViewAccountPageUrl()' is missing an @Override annotation. 166–169
MissingOverride The method 'getLostPasswordPageUrl()' is missing an @Override annotation. 174–177
MissingOverride The method 'getAccessDeniedTemplate()' is missing an @Override annotation. 182–185
MissingOverride The method 'getAccessControledTemplate()' is missing an @Override annotation. 190–193
MissingOverride The method 'isUsersListAvailable()' is missing an @Override annotation. 198–201
MissingOverride The method 'getUsers()' is missing an @Override annotation. 206–209
MissingOverride The method 'getUser(String)' is missing an @Override annotation. 214–217
MissingOverride The method 'isMultiAuthenticationSupported()' is missing an @Override annotation. 222–225
MissingOverride The method 'getIconUrl()' is missing an @Override annotation. 230–233
MissingOverride The method 'getName()' is missing an @Override annotation. 238–241
MissingOverride The method 'getPluginName()' is missing an @Override annotation. 246–249
UncommentedEmptyMethodBody Document empty method body 287–288

fr/paris/lutece/plugins/myportal/web/CategoryJspBean.java

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 62–332
ImmutableField Private field '_categoryService' could be made final; it is only initialized in the declaration or constructor. 102
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 105
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 130
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 130
AddEmptyString Do not add empty strings 132
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 152
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 152
ConfusingTernary Avoid if (x != y) ..; else ..; 234–241
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 270
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 270
ConfusingTernary Avoid if (x != y) ..; else ..; 307–318

fr/paris/lutece/plugins/myportal/web/DefaultPageBuilderJspBean.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34–477
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 76–477
ImmutableField Private field '_service' could be made final; it is only initialized in the declaration or constructor. 124
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 125
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 142
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 142
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 180
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 180
CyclomaticComplexity The method 'doMoveWidgetComponent(HttpServletRequest)' has a cyclomatic complexity of 10. 235–294
CyclomaticComplexity The method 'doModifyWidgetParameterDefaultValues(HttpServletRequest)' has a cyclomatic complexity of 12. 355–413
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 442
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 442

fr/paris/lutece/plugins/myportal/web/IconJspBean.java

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 66–420
ImmutableField Private field '_nDefaultItemsPerPage' could be made final; it is only initialized in the declaration or constructor. 113
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 126
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 126
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 206
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 206
ConfusingTernary Avoid if (x != y) ..; else ..; 246–253
UnusedLocalVariable Avoid unused local variables such as 'nIdIcon'. 271
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 271
NPathComplexity The method 'getIconData(HttpServletRequest, Icon)' has an NPath complexity of 2352 308–381
CyclomaticComplexity The method 'getIconData(HttpServletRequest, Icon)' has a cyclomatic complexity of 20. 308–381
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 314
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 316
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 317
ConfusingTernary Avoid if (x != y) ..; else ..; 367–375

fr/paris/lutece/plugins/myportal/web/MyPortalAdminDashboardComponent.java

Rule Violation Ligne
ImmutableField Private field '_defaultPageBuilderService' could be made final; it is only initialized in the declaration or constructor. 62

fr/paris/lutece/plugins/myportal/web/MyPortalApp.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34–798
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 75–798
ImmutableField Private field '_pageService' could be made final; it is only initialized in the declaration or constructor. 148
ImmutableField Private field '_widgetService' could be made final; it is only initialized in the declaration or constructor. 149
ImmutableField Private field '_categoryService' could be made final; it is only initialized in the declaration or constructor. 151
ImmutableField Private field '_defaultPageBuilderService' could be made final; it is only initialized in the declaration or constructor. 152
MissingOverride The method 'getPage(HttpServletRequest, int, Plugin)' is missing an @Override annotation. 167–208
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 200
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 200
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 233
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 233
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 290
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 290
ConfusingTernary Avoid if (x != y) ..; else ..; 328–335
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 334
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 356
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 356
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 497
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 497
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 540
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 540
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 592
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 592
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 647
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 647
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 688
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 688
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 739
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 772
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 772

fr/paris/lutece/plugins/myportal/web/WidgetJspBean.java

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 67–411
UnusedPrivateField Avoid unused private fields such as 'PARAMETER_WIDGET_ICON'. 81
UnusedPrivateField Avoid unused private fields such as 'PROPERTY_ACCEPTED_ICON_FORMATS'. 99
UnusedPrivateField Avoid unused private fields such as 'MESSAGE_ERROR_ICON_FORMAT_NOT_CORRECT'. 122
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 125
ImmutableField Private field '_widgetService' could be made final; it is only initialized in the declaration or constructor. 128
ImmutableField Private field '_categoryService' could be made final; it is only initialized in the declaration or constructor. 130
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 153
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 153
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 175
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 175
CyclomaticComplexity The method 'doCreateWidget(HttpServletRequest)' has a cyclomatic complexity of 12. 196–242
ConfusingTernary Avoid if (x != y) ..; else ..; 318–337
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 320
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 320
CyclomaticComplexity The method 'doModifyWidget(HttpServletRequest)' has a cyclomatic complexity of 15. 354–410
ConfusingTernary Avoid if (x != y) ..; else ..; 375–402
UnusedLocalVariable Avoid unused local variables such as 'bUpdateIcon'. 382

Priority 4

fr/paris/lutece/plugins/myportal/business/Widget.java

Rule Violation Ligne
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 331–334
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 352–355

fr/paris/lutece/plugins/myportal/business/WidgetFilter.java

Rule Violation Ligne
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 99–102

fr/paris/lutece/plugins/myportal/business/icon/Icon.java

Rule Violation Ligne
ShortClassName Avoid short class names like Icon 41–185
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 180–183

Fichiers

fr/paris/lutece/plugins/myportal/business/CategoryDAO.java

Rule Violation Priority Ligne
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 3 61–78
MissingOverride The method 'insert(Category, Plugin)' is missing an @Override annotation. 3 83–96
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 101–122
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 127–133
MissingOverride The method 'store(Category, Plugin)' is missing an @Override annotation. 3 138–150
MissingOverride The method 'selectCategoriesList(Plugin)' is missing an @Override annotation. 3 155–176
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 157
MissingOverride The method 'selectFirstCategory(Plugin)' is missing an @Override annotation. 3 181–201

fr/paris/lutece/plugins/myportal/business/ColumnStyleDAO.java

Rule Violation Priority Ligne
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 3 64–81
MissingOverride The method 'insert(Style, Plugin)' is missing an @Override annotation. 3 91–103
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 114–134
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 144–150
MissingOverride The method 'store(Style, Plugin)' is missing an @Override annotation. 3 160–171
MissingOverride The method 'selectStylesList(Plugin)' is missing an @Override annotation. 3 180–200
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 182

fr/paris/lutece/plugins/myportal/business/DefaultPageBuilderDAO.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 48–439
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 3 77–94
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 99–108
MissingOverride The method 'deleteByColumnMax(int, Plugin)' is missing an @Override annotation. 3 113–122
MissingOverride The method 'deleteAll(Plugin)' is missing an @Override annotation. 3 127–134
MissingOverride The method 'insert(WidgetComponent, Plugin)' is missing an @Override annotation. 3 139–149
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 154–179
MissingOverride The method 'selectAllWidgetComponents(Plugin)' is missing an @Override annotation. 3 184–208
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 190
MissingOverride The method 'selectMaxOrder(Plugin)' is missing an @Override annotation. 3 213–229
MissingOverride The method 'selectMaxOrder(int, Plugin)' is missing an @Override annotation. 3 234–252
MissingOverride The method 'selectWidgetComponents(WidgetComponentFilter, Plugin)' is missing an @Override annotation. 3 257–287
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 269
MissingOverride The method 'store(WidgetComponent, Plugin)' is missing an @Override annotation. 3 292–303
MissingOverride The method 'selectColumns(Plugin)' is missing an @Override annotation. 3 308–324
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 310
MissingOverride The method 'selectWidgetIds(Plugin)' is missing an @Override annotation. 3 329–345
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 331
LinguisticNaming Linguistics Antipattern - The setter 'setInsertOrUpdateValues' should not return any type except void linguistically 3 358–366
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 378
ConfusingTernary Avoid if (x != y) ..; else ..; 3 400–407

fr/paris/lutece/plugins/myportal/business/DefaultPageBuilderHome.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 49–204

fr/paris/lutece/plugins/myportal/business/IDefaultPageBuilderDAO.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 46–172

fr/paris/lutece/plugins/myportal/business/UserPageConfigDAO.java

Rule Violation Priority Ligne
MissingOverride The method 'insert(UserPageConfig, Plugin)' is missing an @Override annotation. 3 60–69
MissingOverride The method 'load(String, Plugin)' is missing an @Override annotation. 3 80–99
MissingOverride The method 'delete(String, Plugin)' is missing an @Override annotation. 3 109–115
MissingOverride The method 'store(UserPageConfig, Plugin)' is missing an @Override annotation. 3 125–134

fr/paris/lutece/plugins/myportal/business/Widget.java

Rule Violation Priority Ligne
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 331–334
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 352–355

fr/paris/lutece/plugins/myportal/business/WidgetComponent.java

Rule Violation Priority Ligne
MissingOverride The method 'compareTo(WidgetComponent)' is missing an @Override annotation. 3 163–166
ShortVariable Avoid variables with short names like o 3 163

fr/paris/lutece/plugins/myportal/business/WidgetDAO.java

Rule Violation Priority Ligne
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 3 86–103
MissingOverride The method 'insert(Widget, Plugin)' is missing an @Override annotation. 3 113–134
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 145–177
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 187–193
MissingOverride The method 'store(Widget, Plugin)' is missing an @Override annotation. 3 203–224
MissingOverride The method 'selectWidgetsList(Plugin)' is missing an @Override annotation. 3 233–265
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 236
MissingOverride The method 'getPublicMandatoryWidgets(Plugin)' is missing an @Override annotation. 3 270–304
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 273
MissingOverride The method 'getWidgetsByFilter(WidgetFilter, Plugin)' is missing an @Override annotation. 3 309–344
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 311
NPathComplexity The method 'buildSQLQuery(WidgetFilter)' has an NPath complexity of 256 3 353–407
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 426
NPathComplexity The method 'setFilterValues(WidgetFilter, DAOUtil)' has an NPath complexity of 256 3 446–497

fr/paris/lutece/plugins/myportal/business/WidgetFilter.java

Rule Violation Priority Ligne
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 99–102

fr/paris/lutece/plugins/myportal/business/WidgetStyleDAO.java

Rule Violation Priority Ligne
MissingOverride The method 'newPrimaryKey(Plugin)' is missing an @Override annotation. 3 64–81
MissingOverride The method 'insert(Style, Plugin)' is missing an @Override annotation. 3 91–103
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 114–134
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 144–150
MissingOverride The method 'store(Style, Plugin)' is missing an @Override annotation. 3 160–171
MissingOverride The method 'selectStylesList(Plugin)' is missing an @Override annotation. 3 180–200
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 182

fr/paris/lutece/plugins/myportal/business/WidgetsTag.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 3–45

fr/paris/lutece/plugins/myportal/business/icon/Icon.java

Rule Violation Priority Ligne
ShortClassName Avoid short class names like Icon 4 41–185
MissingOverride The method 'getId()' is missing an @Override annotation. 3 55–58
MissingOverride The method 'getName()' is missing an @Override annotation. 3 76–79
MethodReturnsInternalArray Returning '_byValue' may expose an internal array. 3 99
ArrayIsStoredDirectly The user-supplied array 'value' is stored directly. 3 108
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 180–183

fr/paris/lutece/plugins/myportal/business/icon/IconDAO.java

Rule Violation Priority Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 94–110
MissingOverride The method 'insert(Icon, Plugin)' is missing an @Override annotation. 3 94–110
CommentRequired Public method and constructor comments are required 3 94–110
CommentRequired Public method and constructor comments are required 3 118–135
MissingOverride The method 'store(Icon, Plugin)' is missing an @Override annotation. 3 118–135
MissingOverride The method 'storeMetadata(Icon, Plugin)' is missing an @Override annotation. 3 137–152
CommentRequired Public method and constructor comments are required 3 137–152
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 159–185
CommentRequired Public method and constructor comments are required 3 159–185
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 192–199
CommentRequired Public method and constructor comments are required 3 192–199
CommentRequired Public method and constructor comments are required 3 206–233
MissingOverride The method 'selectAll(Plugin)' is missing an @Override annotation. 3 206–233
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 209
CommentRequired Public method and constructor comments are required 3 240–268
MissingOverride The method 'selectIconFO(boolean, Plugin)' is missing an @Override annotation. 3 240–268
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 243

fr/paris/lutece/plugins/myportal/business/parameter/PageBuilderParameterDAO.java

Rule Violation Priority Ligne
MissingOverride The method 'selectAll(Plugin)' is missing an @Override annotation. 3 58–77
MissingOverride The method 'load(String, Plugin)' is missing an @Override annotation. 3 82–100
MissingOverride The method 'store(ReferenceItem, Plugin)' is missing an @Override annotation. 3 105–115
MissingOverride The method 'deleteAllColumnStyles(Plugin)' is missing an @Override annotation. 3 120–126
MissingOverride The method 'insert(ReferenceItem, Plugin)' is missing an @Override annotation. 3 131–140

fr/paris/lutece/plugins/myportal/service/CategoryService.java

Rule Violation Priority Ligne
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 151

fr/paris/lutece/plugins/myportal/service/DefaultPageBuilderService.java

Rule Violation Priority Ligne
GodClass Possible God Class (WMC=53, ATFD=23, TCC=7.018%) 3 59–492
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'listWidgetComponents' 3 120
ConfusingTernary Avoid if (x != y) ..; else ..; 3 145–175
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 194
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 194
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 210
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 266
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 266
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 286
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 286
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 339
CyclomaticComplexity The method 'updateWidgetComponentColumns(List, WidgetComponent, int, int)' has a cyclomatic complexity of 11. 3 434–469

fr/paris/lutece/plugins/myportal/service/IconService.java

Rule Violation Priority Ligne
UncommentedEmptyConstructor Document empty constructor 3 60–62
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the IconService constructor if you want a default access modifier 3 60–62
MissingOverride The method 'getImageResource(int)' is missing an @Override annotation. 3 89–104
MissingOverride The method 'getResourceTypeId()' is missing an @Override annotation. 3 111–114

fr/paris/lutece/plugins/myportal/service/MyPortalPageService.java

Rule Violation Priority Ligne
ImmutableField Private field '_pageBuilder' could be made final; it is only initialized in the declaration or constructor. 3 63
ImmutableField Private field '_defaultPageBuilderService' could be made final; it is only initialized in the declaration or constructor. 3 65
NonThreadSafeSingleton Singleton is not thread safe 3 81–84
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 122
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 126

fr/paris/lutece/plugins/myportal/service/MyPortalResourceIdService.java

Rule Violation Priority Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 3 61–64
MissingOverride The method 'register()' is missing an @Override annotation. 3 69–83
ShortVariable Avoid variables with short names like rt 3 71
ShortVariable Avoid variables with short names like p 3 77
MissingOverride The method 'getResourceIdList(Locale)' is missing an @Override annotation. 3 92–95
MissingOverride The method 'getTitle(String, Locale)' is missing an @Override annotation. 3 106–109

fr/paris/lutece/plugins/myportal/service/PageBuilder.java

Rule Violation Priority Ligne
MissingOverride The method 'buildPage(PageConfig, LuteceUser, HttpServletRequest)' is missing an @Override annotation. 3 115–145
ShortVariable Avoid variables with short names like sb 3 117
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 118
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 118
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 162
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 162
ShortVariable Avoid variables with short names like sb 3 201
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 204
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 204
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 206
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 207
ConfusingTernary Avoid if (x != y) ..; else ..; 3 213–221

fr/paris/lutece/plugins/myportal/service/PageConfigJsonUtil.java

Rule Violation Priority Ligne
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 89
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 98
AvoidThrowingRawExceptionTypes Avoid throwing raw exception types. 1 118
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the buildJson method if you want a default access modifier 3 131–164
DefaultPackage Use explicit scoping instead of the default package private level 3 131–164

fr/paris/lutece/plugins/myportal/service/StyleService.java

Rule Violation Priority Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 60–68

fr/paris/lutece/plugins/myportal/service/WidgetContentService.java

Rule Violation Priority Ligne
ImmutableField Private field '_cacheWidgetContent' could be made final; it is only initialized in the declaration or constructor. 3 69
ConfusingTernary Avoid if (x != y) ..; else ..; 3 146
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 183
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 183

fr/paris/lutece/plugins/myportal/service/WidgetService.java

Rule Violation Priority Ligne
UnusedPrivateField Avoid unused private fields such as 'COMMA'. 3 71
UnusedPrivateField Avoid unused private fields such as 'PROPERTY_ACCEPTED_ICON_FORMATS'. 3 76
ImmutableField Private field '_cacheWidget' could be made final; it is only initialized in the declaration or constructor. 3 86
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 280
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 387
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 387
UnusedPrivateMethod Avoid unused private methods such as 'getIconKey(int)'. 3 400
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 402
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 402
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 417
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 417
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 430
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 430
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 443
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 443

fr/paris/lutece/plugins/myportal/service/cache/WidgetCacheService.java

Rule Violation Priority Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 3 49–51
NonThreadSafeSingleton Singleton is not thread safe 3 60–63
MissingOverride The method 'getName()' is missing an @Override annotation. 3 71–74

fr/paris/lutece/plugins/myportal/service/cache/WidgetContentCacheService.java

Rule Violation Priority Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 3 50–52
NonThreadSafeSingleton Singleton is not thread safe 3 61–64
MissingOverride The method 'getName()' is missing an @Override annotation. 3 72–75

fr/paris/lutece/plugins/myportal/service/handler/HtmlWidgetHandler.java

Rule Violation Priority Ligne
MissingOverride The method 'renderWidget(Widget, LuteceUser, HttpServletRequest)' is missing an @Override annotation. 3 54–57
MissingOverride The method 'getName()' is missing an @Override annotation. 3 62–65
MissingOverride The method 'getDescription()' is missing an @Override annotation. 3 70–73
MissingOverride The method 'isCustomizable()' is missing an @Override annotation. 3 78–81

fr/paris/lutece/plugins/myportal/service/handler/WidgetHandlerService.java

Rule Violation Priority Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 63–72

fr/paris/lutece/plugins/myportal/util/auth/MyPortalAuthentication.java

Rule Violation Priority Ligne
MissingOverride The method 'getAuthServiceName()' is missing an @Override annotation. 3 55–58
MissingOverride The method 'getAuthType(HttpServletRequest)' is missing an @Override annotation. 3 63–66
MissingOverride The method 'login(String, String, HttpServletRequest)' is missing an @Override annotation. 3 71–74
MissingOverride The method 'logout(LuteceUser)' is missing an @Override annotation. 3 79–81
ShortVariable Avoid variables with short names like lu 3 79
UncommentedEmptyMethodBody Document empty method body 3 80–81
MissingOverride The method 'getAnonymousUser()' is missing an @Override annotation. 3 86–89
ShortVariable Avoid variables with short names like lu 3 94
MissingOverride The method 'isUserInRole(LuteceUser, HttpServletRequest, String)' is missing an @Override annotation. 3 94–97
MissingOverride The method 'getRolesByUser(LuteceUser)' is missing an @Override annotation. 3 102–105
ShortVariable Avoid variables with short names like lu 3 102
ReturnEmptyArrayRatherThanNull Return an empty array rather than null. 1 102–105
MissingOverride The method 'isExternalAuthentication()' is missing an @Override annotation. 3 110–113
MissingOverride The method 'isDelegatedAuthentication()' is missing an @Override annotation. 3 118–121
MissingOverride The method 'getHttpAuthenticatedUser(HttpServletRequest)' is missing an @Override annotation. 3 126–129
MissingOverride The method 'getLoginPageUrl()' is missing an @Override annotation. 3 134–137
MissingOverride The method 'getDoLoginUrl()' is missing an @Override annotation. 3 142–145
MissingOverride The method 'getDoLogoutUrl()' is missing an @Override annotation. 3 150–153
MissingOverride The method 'getNewAccountPageUrl()' is missing an @Override annotation. 3 158–161
MissingOverride The method 'getViewAccountPageUrl()' is missing an @Override annotation. 3 166–169
MissingOverride The method 'getLostPasswordPageUrl()' is missing an @Override annotation. 3 174–177
MissingOverride The method 'getAccessDeniedTemplate()' is missing an @Override annotation. 3 182–185
MissingOverride The method 'getAccessControledTemplate()' is missing an @Override annotation. 3 190–193
MissingOverride The method 'isUsersListAvailable()' is missing an @Override annotation. 3 198–201
MissingOverride The method 'getUsers()' is missing an @Override annotation. 3 206–209
MissingOverride The method 'getUser(String)' is missing an @Override annotation. 3 214–217
MissingOverride The method 'isMultiAuthenticationSupported()' is missing an @Override annotation. 3 222–225
MissingOverride The method 'getIconUrl()' is missing an @Override annotation. 3 230–233
MissingOverride The method 'getName()' is missing an @Override annotation. 3 238–241
MissingOverride The method 'getPluginName()' is missing an @Override annotation. 3 246–249
UncommentedEmptyMethodBody Document empty method body 3 287–288

fr/paris/lutece/plugins/myportal/web/CategoryJspBean.java

Rule Violation Priority Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 62–332
ImmutableField Private field '_categoryService' could be made final; it is only initialized in the declaration or constructor. 3 102
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 3 105
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 130
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 130
AddEmptyString Do not add empty strings 3 132
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 152
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 152
ConfusingTernary Avoid if (x != y) ..; else ..; 3 234–241
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 270
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 270
ConfusingTernary Avoid if (x != y) ..; else ..; 3 307–318

fr/paris/lutece/plugins/myportal/web/DefaultPageBuilderJspBean.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34–477
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 76–477
ImmutableField Private field '_service' could be made final; it is only initialized in the declaration or constructor. 3 124
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 3 125
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 142
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 142
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 180
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 180
CyclomaticComplexity The method 'doMoveWidgetComponent(HttpServletRequest)' has a cyclomatic complexity of 10. 3 235–294
CyclomaticComplexity The method 'doModifyWidgetParameterDefaultValues(HttpServletRequest)' has a cyclomatic complexity of 12. 3 355–413
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 442
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 442

fr/paris/lutece/plugins/myportal/web/IconJspBean.java

Rule Violation Priority Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 66–420
ImmutableField Private field '_nDefaultItemsPerPage' could be made final; it is only initialized in the declaration or constructor. 3 113
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 126
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 126
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 206
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 206
ConfusingTernary Avoid if (x != y) ..; else ..; 3 246–253
UnusedLocalVariable Avoid unused local variables such as 'nIdIcon'. 3 271
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 271
NPathComplexity The method 'getIconData(HttpServletRequest, Icon)' has an NPath complexity of 2352 3 308–381
CyclomaticComplexity The method 'getIconData(HttpServletRequest, Icon)' has a cyclomatic complexity of 20. 3 308–381
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 314
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 316
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 317
ConfusingTernary Avoid if (x != y) ..; else ..; 3 367–375

fr/paris/lutece/plugins/myportal/web/MyPortalAdminDashboardComponent.java

Rule Violation Priority Ligne
ImmutableField Private field '_defaultPageBuilderService' could be made final; it is only initialized in the declaration or constructor. 3 62

fr/paris/lutece/plugins/myportal/web/MyPortalApp.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34–798
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 75–798
ImmutableField Private field '_pageService' could be made final; it is only initialized in the declaration or constructor. 3 148
ImmutableField Private field '_widgetService' could be made final; it is only initialized in the declaration or constructor. 3 149
ImmutableField Private field '_categoryService' could be made final; it is only initialized in the declaration or constructor. 3 151
ImmutableField Private field '_defaultPageBuilderService' could be made final; it is only initialized in the declaration or constructor. 3 152
MissingOverride The method 'getPage(HttpServletRequest, int, Plugin)' is missing an @Override annotation. 3 167–208
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 200
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 200
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 233
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 233
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 290
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 290
ConfusingTernary Avoid if (x != y) ..; else ..; 3 328–335
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 334
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 356
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 356
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 497
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 497
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 540
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 540
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 592
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 592
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 647
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 647
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 688
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 688
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 739
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 772
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 772

fr/paris/lutece/plugins/myportal/web/WidgetJspBean.java

Rule Violation Priority Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 67–411
UnusedPrivateField Avoid unused private fields such as 'PARAMETER_WIDGET_ICON'. 3 81
UnusedPrivateField Avoid unused private fields such as 'PROPERTY_ACCEPTED_ICON_FORMATS'. 3 99
UnusedPrivateField Avoid unused private fields such as 'MESSAGE_ERROR_ICON_FORMAT_NOT_CORRECT'. 3 122
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 3 125
ImmutableField Private field '_widgetService' could be made final; it is only initialized in the declaration or constructor. 3 128
ImmutableField Private field '_categoryService' could be made final; it is only initialized in the declaration or constructor. 3 130
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 153
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 153
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 175
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 175
CyclomaticComplexity The method 'doCreateWidget(HttpServletRequest)' has a cyclomatic complexity of 12. 3 196–242
ConfusingTernary Avoid if (x != y) ..; else ..; 3 318–337
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 320
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 320
CyclomaticComplexity The method 'doModifyWidget(HttpServletRequest)' has a cyclomatic complexity of 15. 3 354–410
ConfusingTernary Avoid if (x != y) ..; else ..; 3 375–402
UnusedLocalVariable Avoid unused local variables such as 'bUpdateIcon'. 3 382