PMD Results

The following document contains the results of PMD 6.29.0.

Violations By Priority

Priority 2

org/apache/fulcrum/security/memory/MemoryHelper.java

Rule Violation Line
IntegerInstantiation Avoid instantiating Integer objects. Call Integer.valueOf() instead. 42

Priority 3

org/apache/fulcrum/security/memory/MemoryGroupManagerImpl.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 38–164
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 41
CallSuperInConstructor It is a good practice to call super() in a constructor 43–46
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 45
AssignmentToNonFinalStatic Possible unsafe assignment to a non-final static field in a constructor. 45
MissingOverride The method 'getAllGroups()' is missing an @Override annotation. 58–61
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 73
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 73–94
MissingOverride The method 'removeGroup(Group)' is missing an @Override annotation. 73–94
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 78) 75
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 89
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 91
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 108–129
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 108
MissingOverride The method 'renameGroup(Group, String)' is missing an @Override annotation. 108–129
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 108
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 113) 110
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 125
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 140–143
MethodArgumentCouldBeFinal Parameter 'groupName' is not assigned and could be declared final 140
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 155
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 155–162

org/apache/fulcrum/security/memory/MemoryHelper.java

Rule Violation Line
UseUtilityClass 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. 35–62
RedundantFieldInitializer Avoid using redundant field initializer for 'uniqueId' 38
MethodArgumentCouldBeFinal Parameter 'securityEntities' is not assigned and could be declared final 50
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 50
LocalVariableCouldBeFinal Local variable 'securityEntity' could be declared final 53
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 55

org/apache/fulcrum/security/memory/MemoryPermissionManagerImpl.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 39–157
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 42
CallSuperInConstructor It is a good practice to call super() in a constructor 44–46
MissingOverride The method 'getAllPermissions()' is missing an @Override annotation. 58–61
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 75
MissingOverride The method 'renamePermission(Permission, String)' is missing an @Override annotation. 75–95
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 75
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 75–95
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 80) 77
MethodArgumentCouldBeFinal Parameter 'permissionName' is not assigned and could be declared final 106
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 106–109
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 121
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 121–139
MissingOverride The method 'removePermission(Permission)' is missing an @Override annotation. 121–139
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 126) 123
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 151
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 151–156

org/apache/fulcrum/security/memory/MemoryRoleManagerImpl.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 39–160
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 42
CallSuperInConstructor It is a good practice to call super() in a constructor 44–47
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 64
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 64–84
MissingOverride The method 'renameRole(Role, String)' is missing an @Override annotation. 64–84
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 64
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 69) 66
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 93–96
MethodArgumentCouldBeFinal Parameter 'roleName' is not assigned and could be declared final 93
MissingOverride The method 'getAllRoles()' is missing an @Override annotation. 105–108
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 120–128
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 120
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 125
MissingOverride The method 'removeRole(Role)' is missing an @Override annotation. 140–159
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 140–159
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 140
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 145) 142
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 149

org/apache/fulcrum/security/memory/MemoryUserManagerImpl.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 37–121
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 41
CallSuperInConstructor It is a good practice to call super() in a constructor 43–46
MethodArgumentCouldBeFinal Parameter 'userName' is not assigned and could be declared final 61
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 61–63
MissingOverride The method 'getAllUsers()' is missing an @Override annotation. 72–74
MissingOverride The method 'removeUser(User)' is missing an @Override annotation. 84–86
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 84
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 96
MissingOverride The method 'saveUser(User)' is missing an @Override annotation. 111–120
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 111
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 113) 112

org/apache/fulcrum/security/memory/basic/MemoryModelManagerImpl.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 38–161
AtLeastOneConstructor Each class should declare at least one constructor 38–161
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 52
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 52
MissingOverride The method 'grant(User, Group)' is missing an @Override annotation. 52–80
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 58) 54
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 59) 55
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 58
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 59
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 67
MissingOverride The method 'revoke(User, Group)' is missing an @Override annotation. 95–123
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 95
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 95
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 101) 97
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 102) 98
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 101
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 102
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 110
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 137
MissingOverride The method 'revokeAll(User)' is missing an @Override annotation. 137–159
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 137–159
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 142) 139
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 142
LocalVariableCouldBeFinal Local variable 'group' could be declared final 145
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 153

org/apache/fulcrum/security/memory/dynamic/MemoryModelManagerImpl.java

Rule Violation Line
GodClass Possible God Class (WMC=54, ATFD=24, TCC=0.000%) 41–237
AtLeastOneConstructor Each class should declare at least one constructor 41–237
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 41–237
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 53
MissingOverride The method 'grant(User, Group)' is missing an @Override annotation. 53–74
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 53
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 57) 54
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 58) 55
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 57
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 58
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 64
AvoidDuplicateLiterals The String literal "Unknown group '" appears 4 times in this file; the first occurrence is on line 69 69
MissingOverride The method 'revoke(User, Group)' is missing an @Override annotation. 85–106
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 85
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 85
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 89) 86
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 90) 87
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 89
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 90
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 96
MissingOverride The method 'grant(Group, Role)' is missing an @Override annotation. 117–137
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 117
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 117
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 117–137
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 121) 118
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 122) 119
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 121
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 122
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 128
AvoidDuplicateLiterals The String literal "Unknown role '" appears 4 times in this file; the first occurrence is on line 135 135
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 148
MissingOverride The method 'revoke(Group, Role)' is missing an @Override annotation. 148–169
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 148–169
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 148
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 152) 149
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 153) 150
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 152
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 153
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 159
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 180–202
MissingOverride The method 'grant(Role, Permission)' is missing an @Override annotation. 180–202
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 180
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 180
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 185) 182
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 186) 183
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 185
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 186
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 192
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 213
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 213
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 213–235
MissingOverride The method 'revoke(Role, Permission)' is missing an @Override annotation. 213–235
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 218) 215
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 219) 216
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 218
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 219
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 225

org/apache/fulcrum/security/memory/turbine/MemoryTurbineModelManagerImpl.java

Rule Violation Line
AtLeastOneConstructor Each class should declare at least one constructor 43–233
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 43–233
GodClass Possible God Class (WMC=49, ATFD=26, TCC=0.000%) 43–233
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 57
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 57
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 57–85
MissingOverride The method 'grant(Role, Permission)' is missing an @Override annotation. 57–85
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 63) 59
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 64) 60
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 63
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 64
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 72
AvoidDuplicateLiterals The String literal "Unknown role '" appears 4 times in this file; the first occurrence is on line 79 79
MissingOverride The method 'revoke(Role, Permission)' is missing an @Override annotation. 99–127
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 99
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 99
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 99–127
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 105) 101
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 106) 102
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 105
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 106
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 114
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 129
MissingOverride The method 'grant(User, Group, Role)' is missing an @Override annotation. 129–169
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 129
CyclomaticComplexity The method 'grant(User, Group, Role)' has a cyclomatic complexity of 12. 129–169
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 129
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 136) 131
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 137) 132
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 138) 133
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 136
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 137
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 138
LocalVariableCouldBeFinal Local variable 'ugr' could be declared final 141
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 151
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 171
CyclomaticComplexity The method 'revoke(User, Group, Role)' has a cyclomatic complexity of 18. 171–223
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 171
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 171
MissingOverride The method 'revoke(User, Group, Role)' is missing an @Override annotation. 171–223
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 178) 173
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 179) 174
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 180) 175
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 178
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 179
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 180
LocalVariableCouldBeFinal Local variable 'ugr' could be declared final 184
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 186
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 186
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 186
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 205
MethodArgumentCouldBeFinal Parameter 'oldRole' is not assigned and could be declared final 226
MethodArgumentCouldBeFinal Parameter 'newRole' is not assigned and could be declared final 226
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 226
LocalVariableCouldBeFinal Local variable 'group' could be declared final 229

org/apache/fulcrum/security/memory/turbine/MemoryTurbineUserManagerImpl.java

Rule Violation Line
AtLeastOneConstructor Each class should declare at least one constructor 37–88
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 37–88
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 57
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 70
ControlStatementBraces This statement should have braces 77
IfElseStmtsMustUseBraces Avoid using if...else statements without curly braces 77
IfStmtsMustUseBraces Avoid using if statements without curly braces 81–82
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 81
LiteralsFirstInComparisons Position literals first in String comparisons 81
ControlStatementBraces This statement should have braces 82

Priority 4

org/apache/fulcrum/security/memory/MemoryPermissionManagerImpl.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.fulcrum.security.util.EntityExistsException' 27

org/apache/fulcrum/security/memory/MemoryRoleManagerImpl.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.fulcrum.security.util.EntityExistsException' 27

Priority 5

org/apache/fulcrum/security/memory/MemoryGroupManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '75'-'78'). 75–78
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '110'-'113'). 110–113

org/apache/fulcrum/security/memory/MemoryHelper.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'exists' (lines '52'-'57'). 52–57
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'exists' (lines '57'-'57'). 57

org/apache/fulcrum/security/memory/MemoryPermissionManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '77'-'80'). 77–80
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '123'-'126'). 123–126

org/apache/fulcrum/security/memory/MemoryRoleManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '66'-'69'). 66–69
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '142'-'145'). 142–145

org/apache/fulcrum/security/memory/MemoryUserManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '112'-'113'). 112–113

org/apache/fulcrum/security/memory/basic/MemoryModelManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '54'-'58'). 54–58
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '55'-'59'). 55–59
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '97'-'101'). 97–101
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '98'-'102'). 98–102
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '139'-'142'). 139–142

org/apache/fulcrum/security/memory/dynamic/MemoryModelManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '54'-'57'). 54–57
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '55'-'58'). 55–58
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '86'-'89'). 86–89
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '87'-'90'). 87–90
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '118'-'121'). 118–121
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '119'-'122'). 119–122
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '149'-'152'). 149–152
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '150'-'153'). 150–153
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '182'-'185'). 182–185
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '183'-'186'). 183–186
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '215'-'218'). 215–218
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '216'-'219'). 216–219

org/apache/fulcrum/security/memory/turbine/MemoryTurbineModelManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '59'-'63'). 59–63
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '60'-'64'). 60–64
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '101'-'105'). 101–105
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '102'-'106'). 102–106
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '131'-'136'). 131–136
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '132'-'137'). 132–137
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '133'-'138'). 133–138
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '173'-'178'). 173–178
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '174'-'179'). 174–179
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '175'-'180'). 175–180
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'ugrFound' (lines '183'-'188'). 183–188

org/apache/fulcrum/security/memory/turbine/MemoryTurbineUserManagerImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'user' (lines '52'-'59'). 52–59
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'isAnon' (lines '72'-'82'). 72–82
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'isAnon' (lines '72'-'77'). 72–77
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'isAnon' (lines '72'-'74'). 72–74

Files

org/apache/fulcrum/security/memory/MemoryGroupManagerImpl.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 38–164
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 41
CallSuperInConstructor It is a good practice to call super() in a constructor 3 43–46
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 45
AssignmentToNonFinalStatic Possible unsafe assignment to a non-final static field in a constructor. 3 45
MissingOverride The method 'getAllGroups()' is missing an @Override annotation. 3 58–61
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 73
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 73–94
MissingOverride The method 'removeGroup(Group)' is missing an @Override annotation. 3 73–94
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '75'-'78'). 5 75–78
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 78) 3 75
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 89
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 91
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 108–129
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 3 108
MissingOverride The method 'renameGroup(Group, String)' is missing an @Override annotation. 3 108–129
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 108
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '110'-'113'). 5 110–113
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 113) 3 110
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 125
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 3 140–143
MethodArgumentCouldBeFinal Parameter 'groupName' is not assigned and could be declared final 3 140
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 155
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 155–162

org/apache/fulcrum/security/memory/MemoryHelper.java

Rule Violation Priority Line
UseUtilityClass 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. 3 35–62
RedundantFieldInitializer Avoid using redundant field initializer for 'uniqueId' 3 38
IntegerInstantiation Avoid instantiating Integer objects. Call Integer.valueOf() instead. 2 42
MethodArgumentCouldBeFinal Parameter 'securityEntities' is not assigned and could be declared final 3 50
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 3 50
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'exists' (lines '52'-'57'). 5 52–57
LocalVariableCouldBeFinal Local variable 'securityEntity' could be declared final 3 53
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 55
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'exists' (lines '57'-'57'). 5 57

org/apache/fulcrum/security/memory/MemoryPermissionManagerImpl.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.fulcrum.security.util.EntityExistsException' 4 27
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 39–157
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 42
CallSuperInConstructor It is a good practice to call super() in a constructor 3 44–46
MissingOverride The method 'getAllPermissions()' is missing an @Override annotation. 3 58–61
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 3 75
MissingOverride The method 'renamePermission(Permission, String)' is missing an @Override annotation. 3 75–95
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 75
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 75–95
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 80) 3 77
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '77'-'80'). 5 77–80
MethodArgumentCouldBeFinal Parameter 'permissionName' is not assigned and could be declared final 3 106
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 3 106–109
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 121
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 121–139
MissingOverride The method 'removePermission(Permission)' is missing an @Override annotation. 3 121–139
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 126) 3 123
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '123'-'126'). 5 123–126
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 151
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 151–156

org/apache/fulcrum/security/memory/MemoryRoleManagerImpl.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.fulcrum.security.util.EntityExistsException' 4 27
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 39–160
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 42
CallSuperInConstructor It is a good practice to call super() in a constructor 3 44–47
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 64
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 64–84
MissingOverride The method 'renameRole(Role, String)' is missing an @Override annotation. 3 64–84
MethodArgumentCouldBeFinal Parameter 'name' is not assigned and could be declared final 3 64
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '66'-'69'). 5 66–69
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 69) 3 66
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 3 93–96
MethodArgumentCouldBeFinal Parameter 'roleName' is not assigned and could be declared final 3 93
MissingOverride The method 'getAllRoles()' is missing an @Override annotation. 3 105–108
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 120–128
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 120
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 125
MissingOverride The method 'removeRole(Role)' is missing an @Override annotation. 3 140–159
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 140–159
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 140
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '142'-'145'). 5 142–145
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 145) 3 142
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 149

org/apache/fulcrum/security/memory/MemoryUserManagerImpl.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 37–121
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 41
CallSuperInConstructor It is a good practice to call super() in a constructor 3 43–46
MethodArgumentCouldBeFinal Parameter 'userName' is not assigned and could be declared final 3 61
MissingOverride The method 'checkExists(String)' is missing an @Override annotation. 3 61–63
MissingOverride The method 'getAllUsers()' is missing an @Override annotation. 3 72–74
MissingOverride The method 'removeUser(User)' is missing an @Override annotation. 3 84–86
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 84
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 96
MissingOverride The method 'saveUser(User)' is missing an @Override annotation. 3 111–120
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 111
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 113) 3 112
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '112'-'113'). 5 112–113

org/apache/fulcrum/security/memory/basic/MemoryModelManagerImpl.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 38–161
AtLeastOneConstructor Each class should declare at least one constructor 3 38–161
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 52
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 52
MissingOverride The method 'grant(User, Group)' is missing an @Override annotation. 3 52–80
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '54'-'58'). 5 54–58
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 58) 3 54
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 59) 3 55
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '55'-'59'). 5 55–59
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 58
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 59
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 67
MissingOverride The method 'revoke(User, Group)' is missing an @Override annotation. 3 95–123
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 95
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 95
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 101) 3 97
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '97'-'101'). 5 97–101
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 102) 3 98
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '98'-'102'). 5 98–102
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 101
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 102
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 110
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 137
MissingOverride The method 'revokeAll(User)' is missing an @Override annotation. 3 137–159
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 137–159
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 142) 3 139
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '139'-'142'). 5 139–142
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 142
LocalVariableCouldBeFinal Local variable 'group' could be declared final 3 145
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 153

org/apache/fulcrum/security/memory/dynamic/MemoryModelManagerImpl.java

Rule Violation Priority Line
GodClass Possible God Class (WMC=54, ATFD=24, TCC=0.000%) 3 41–237
AtLeastOneConstructor Each class should declare at least one constructor 3 41–237
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 41–237
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 53
MissingOverride The method 'grant(User, Group)' is missing an @Override annotation. 3 53–74
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 53
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '54'-'57'). 5 54–57
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 57) 3 54
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '55'-'58'). 5 55–58
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 58) 3 55
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 57
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 58
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 64
AvoidDuplicateLiterals The String literal "Unknown group '" appears 4 times in this file; the first occurrence is on line 69 3 69
MissingOverride The method 'revoke(User, Group)' is missing an @Override annotation. 3 85–106
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 85
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 85
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 89) 3 86
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '86'-'89'). 5 86–89
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 90) 3 87
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '87'-'90'). 5 87–90
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 89
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 90
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 96
MissingOverride The method 'grant(Group, Role)' is missing an @Override annotation. 3 117–137
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 117
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 117
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 117–137
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 121) 3 118
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '118'-'121'). 5 118–121
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '119'-'122'). 5 119–122
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 122) 3 119
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 121
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 122
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 128
AvoidDuplicateLiterals The String literal "Unknown role '" appears 4 times in this file; the first occurrence is on line 135 3 135
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 148
MissingOverride The method 'revoke(Group, Role)' is missing an @Override annotation. 3 148–169
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 148–169
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 148
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 152) 3 149
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '149'-'152'). 5 149–152
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 153) 3 150
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '150'-'153'). 5 150–153
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 152
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 153
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 159
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 180–202
MissingOverride The method 'grant(Role, Permission)' is missing an @Override annotation. 3 180–202
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 180
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 180
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '182'-'185'). 5 182–185
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 185) 3 182
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '183'-'186'). 5 183–186
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 186) 3 183
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 185
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 186
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 192
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 213
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 213
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 213–235
MissingOverride The method 'revoke(Role, Permission)' is missing an @Override annotation. 3 213–235
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 218) 3 215
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '215'-'218'). 5 215–218
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '216'-'219'). 5 216–219
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 219) 3 216
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 218
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 219
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 225

org/apache/fulcrum/security/memory/turbine/MemoryTurbineModelManagerImpl.java

Rule Violation Priority Line
AtLeastOneConstructor Each class should declare at least one constructor 3 43–233
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 43–233
GodClass Possible God Class (WMC=49, ATFD=26, TCC=0.000%) 3 43–233
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 57
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 57
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 57–85
MissingOverride The method 'grant(Role, Permission)' is missing an @Override annotation. 3 57–85
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 63) 3 59
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '59'-'63'). 5 59–63
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '60'-'64'). 5 60–64
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 64) 3 60
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 63
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 64
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 72
AvoidDuplicateLiterals The String literal "Unknown role '" appears 4 times in this file; the first occurrence is on line 79 3 79
MissingOverride The method 'revoke(Role, Permission)' is missing an @Override annotation. 3 99–127
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 99
MethodArgumentCouldBeFinal Parameter 'permission' is not assigned and could be declared final 3 99
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 99–127
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '101'-'105'). 5 101–105
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 105) 3 101
UnusedAssignment The initializer for variable 'permissionExists' is never used (overwritten on line 106) 3 102
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'permissionExists' (lines '102'-'106'). 5 102–106
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 105
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 106
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 114
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 129
MissingOverride The method 'grant(User, Group, Role)' is missing an @Override annotation. 3 129–169
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 129
CyclomaticComplexity The method 'grant(User, Group, Role)' has a cyclomatic complexity of 12. 3 129–169
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 129
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 136) 3 131
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '131'-'136'). 5 131–136
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 137) 3 132
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '132'-'137'). 5 132–137
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '133'-'138'). 5 133–138
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 138) 3 133
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 136
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 137
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 138
LocalVariableCouldBeFinal Local variable 'ugr' could be declared final 3 141
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 151
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 171
CyclomaticComplexity The method 'revoke(User, Group, Role)' has a cyclomatic complexity of 18. 3 171–223
MethodArgumentCouldBeFinal Parameter 'group' is not assigned and could be declared final 3 171
MethodArgumentCouldBeFinal Parameter 'role' is not assigned and could be declared final 3 171
MissingOverride The method 'revoke(User, Group, Role)' is missing an @Override annotation. 3 171–223
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'roleExists' (lines '173'-'178'). 5 173–178
UnusedAssignment The initializer for variable 'roleExists' is never used (overwritten on line 178) 3 173
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'userExists' (lines '174'-'179'). 5 174–179
UnusedAssignment The initializer for variable 'userExists' is never used (overwritten on line 179) 3 174
UnusedAssignment The initializer for variable 'groupExists' is never used (overwritten on line 180) 3 175
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'groupExists' (lines '175'-'180'). 5 175–180
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 178
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 179
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 180
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'ugrFound' (lines '183'-'188'). 5 183–188
LocalVariableCouldBeFinal Local variable 'ugr' could be declared final 3 184
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 186
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 186
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 186
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 205
MethodArgumentCouldBeFinal Parameter 'oldRole' is not assigned and could be declared final 3 226
MethodArgumentCouldBeFinal Parameter 'newRole' is not assigned and could be declared final 3 226
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 226
LocalVariableCouldBeFinal Local variable 'group' could be declared final 3 229

org/apache/fulcrum/security/memory/turbine/MemoryTurbineUserManagerImpl.java

Rule Violation Priority Line
AtLeastOneConstructor Each class should declare at least one constructor 3 37–88
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 37–88
DataflowAnomalyAnalysis Found 'DU'-anomaly for variable 'user' (lines '52'-'59'). 5 52–59
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 57
MethodArgumentCouldBeFinal Parameter 'user' is not assigned and could be declared final 3 70
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'isAnon' (lines '72'-'82'). 5 72–82
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'isAnon' (lines '72'-'77'). 5 72–77
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'isAnon' (lines '72'-'74'). 5 72–74
ControlStatementBraces This statement should have braces 3 77
IfElseStmtsMustUseBraces Avoid using if...else statements without curly braces 3 77
IfStmtsMustUseBraces Avoid using if statements without curly braces 3 81–82
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 81
LiteralsFirstInComparisons Position literals first in String comparisons 3 81
ControlStatementBraces This statement should have braces 3 82