PMD Results

The following document contains the results of PMD 4.2.5.

Files

org/apache/myfaces/tobago/security/AuthorizationUtils.java

ViolationLine
A class which only has private constructors should be final36 - 135
The class 'AuthorizationUtils' has a Cyclomatic Complexity of 6 (Highest = 10).36 - 135
The class 'AuthorizationUtils' has a Cyclomatic Complexity of 6 (Highest = 10).36 - 135
Parameter 'expression' is not assigned and could be declared final45
Parameter 'facesContext' is not assigned and could be declared final45
The method 'isAuthorized' has a Cyclomatic Complexity of 10.45 - 78
The method 'isAuthorized' has a Cyclomatic Complexity of 10.45 - 78
Local variable 'securityAnnotation' could be declared final47
Local variable 'roles' could be declared final59
Local variable 'authorised' could be declared final64
Parameter 'annotatedElement' is not assigned and could be declared final80
Avoid reassigning parameters such as 'expression'96
Parameter 'facesContext' is not assigned and could be declared final96
The method 'getSecurityAnnotation' has a Cyclomatic Complexity of 10.96 - 134
The method 'getSecurityAnnotation' has a Cyclomatic Complexity of 10.96 - 134
Local variable 'obj' could be declared final98
Local variable 'index' could be declared final107
Local variable 'methodExpression' could be declared final109
Local variable 'beanExpression' could be declared final110
Local variable 'bean' could be declared final112 - 113
Deeply nested if..then statements are hard to read114 - 124
Local variable 'method' could be declared final116
Avoid if (x != y) ..; else ..;127 - 131

org/apache/myfaces/tobago/security/CheckAuthorisationMethodBinding.java

ViolationLine
The class 'CheckAuthorisationMethodBinding' has a Cyclomatic Complexity of 2 (Highest = 5).33 - 92
Document empty constructor38 - 39
Parameter 'methodBinding' is not assigned and could be declared final41
Parameter 'facesContext' is not assigned and could be declared final49
Parameter 'facesContext' is not assigned and could be declared final53
Parameter 'objects' is not assigned and could be declared final53
The method 'invoke' has a Cyclomatic Complexity of 5.53 - 66
Parameter 'facesContext' is not assigned and could be declared final68
Parameter 'savedState' is not assigned and could be declared final74
Parameter 'facesContext' is not assigned and could be declared final74
Local variable 'values' could be declared final75
Parameter 'bool' is not assigned and could be declared final83
Parameter 'facesContext' is not assigned and could be declared final89

org/apache/myfaces/tobago/security/CheckAuthorisationMethodExpression.java

ViolationLine
The class 'CheckAuthorisationMethodExpression' has a Cyclomatic Complexity of 1 (Highest = 5).33 - 110
Document empty constructor38 - 39
Parameter 'methodExpression' is not assigned and could be declared final41
Parameter 'context' is not assigned and could be declared final46
Parameter 'context' is not assigned and could be declared final51
Parameter 'objects' is not assigned and could be declared final51
The method 'invoke' has a Cyclomatic Complexity of 5.51 - 64
Parameter 'obj' is not assigned and could be declared final72
Parameter 'facesContext' is not assigned and could be declared final86
Parameter 'savedState' is not assigned and could be declared final92
Parameter 'facesContext' is not assigned and could be declared final92
Local variable 'values' could be declared final93
Parameter 'bool' is not assigned and could be declared final101
Parameter 'facesContext' is not assigned and could be declared final107

org/apache/myfaces/tobago/security/UISecuredButton.java

ViolationLine
Document empty constructor34 - 35
Avoid unnecessary constructors - the compiler will generate these for you34 - 35
Parameter 'actionExpression' is not assigned and could be declared final48
Avoid if (x != y) ..; else ..;49 - 53

org/apache/myfaces/tobago/security/UISecuredCommand.java

ViolationLine
Document empty constructor35 - 36
Avoid unnecessary constructors - the compiler will generate these for you35 - 36
Parameter 'actionExpression' is not assigned and could be declared final49
Avoid if (x != y) ..; else ..;50 - 54

org/apache/myfaces/tobago/security/UISecuredLink.java

ViolationLine
Document empty constructor34 - 35
Avoid unnecessary constructors - the compiler will generate these for you34 - 35
Parameter 'actionExpression' is not assigned and could be declared final48
Avoid if (x != y) ..; else ..;49 - 53

org/apache/myfaces/tobago/security/UISecuredLinkCommand.java

ViolationLine
Document empty constructor38 - 39
Avoid unnecessary constructors - the compiler will generate these for you38 - 39
Parameter 'actionExpression' is not assigned and could be declared final52
Avoid if (x != y) ..; else ..;53 - 57

org/apache/myfaces/tobago/security/UISecuredMenuCommand.java

ViolationLine
Document empty constructor36 - 37
Avoid unnecessary constructors - the compiler will generate these for you36 - 37
Parameter 'actionExpression' is not assigned and could be declared final50
Avoid if (x != y) ..; else ..;51 - 55

org/apache/myfaces/tobago/security/UISecuredToolBarCommand.java

ViolationLine
Document empty constructor34 - 35
Avoid unnecessary constructors - the compiler will generate these for you34 - 35
Parameter 'actionExpression' is not assigned and could be declared final48
Avoid if (x != y) ..; else ..;49 - 53