PMD Results

The following document contains the results of PMD 6.13.0.

Violations By Priority

Priority 3

org/apache/shiro/web/filter/authc/LogoutFilter.java

Rule Violation Line
CollapsibleIfStatements These nested if statements could be combined 8789

org/apache/shiro/web/filter/authz/HostFilter.java

Rule Violation Line
EmptyIfStmt Avoid empty if statements 7173

org/apache/shiro/web/filter/authz/HttpMethodPermissionFilter.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'static' on enum 'HttpMethodAction': nested enums are implicitly static 100120
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'HttpMethodAction(String)': enum constructors are implicitly private 113115

org/apache/shiro/web/filter/mgt/DefaultFilter.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'DefaultFilter(Class)': enum constructors are implicitly private 5557

org/apache/shiro/web/mgt/DefaultWebSecurityManager.java

Rule Violation Line
CollapsibleIfStatements These nested if statements could be combined 170176

org/apache/shiro/web/servlet/Cookie.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifiers 'public static final' on field 'DELETED_COOKIE_VALUE': the field is declared in an interface type 37
UnnecessaryModifier Unnecessary modifiers 'public static final' on field 'ONE_YEAR': the field is declared in an interface type 43
UnnecessaryModifier Unnecessary modifiers 'public static final' on field 'ROOT_PATH': the field is declared in an interface type 48
UnnecessaryModifier Unnecessary modifier 'public' on enum 'SameSiteOptions': the enum is declared in an interface type 5054

org/apache/shiro/web/subject/WebSubject.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on class 'Builder': members of interface types are implicitly public 58157
UnnecessaryModifier Unnecessary modifier 'static' on class 'Builder': types nested within an interface type are implicitly static 58157

org/apache/shiro/web/tags/SecureTag.java

Rule Violation Line
UnusedPrivateField Avoid unused private fields such as 'log'. 37

Priority 4

org/apache/shiro/web/env/EnvironmentLoader.java

Rule Violation Line
UselessParentheses Useless parentheses. 307

org/apache/shiro/web/filter/PathMatchingFilter.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.util.StringUtils' 23

org/apache/shiro/web/filter/authc/AuthenticatingFilter.java

Rule Violation Line
UselessParentheses Useless parentheses. 124
UselessParentheses Useless parentheses. 146

org/apache/shiro/web/filter/authc/BasicHttpAuthenticationFilter.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.web.util.WebUtils' 23
UnusedImports Avoid unused imports such as 'javax.servlet.http.HttpServletResponse' 30
UnusedImports Avoid unused imports such as 'java.util.HashSet' 31
UnusedImports Avoid unused imports such as 'java.util.Locale' 32
UnusedImports Avoid unused imports such as 'java.util.Set' 33

org/apache/shiro/web/filter/authc/FormAuthenticationFilter.java

Rule Violation Line
UselessParentheses Useless parentheses. 183

org/apache/shiro/web/filter/authc/LogoutFilter.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.util.StringUtils' 24
UnusedImports Avoid unused imports such as 'org.apache.shiro.web.filter.mgt.DefaultFilter.logout' 36

org/apache/shiro/web/filter/mgt/PathMatchingFilterChainResolver.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.owasp.encoder.Encoder' 25

org/apache/shiro/web/mgt/DefaultWebSessionStorageEvaluator.java

Rule Violation Line
UselessParentheses Useless parentheses. 92

org/apache/shiro/web/servlet/AbstractShiroFilter.java

Rule Violation Line
UselessParentheses Useless parentheses. 273
UselessParentheses Useless parentheses. 274

org/apache/shiro/web/servlet/IniShiroFilter.java

Rule Violation Line
UselessParentheses Useless parentheses. 283
UselessParentheses Useless parentheses. 283

org/apache/shiro/web/servlet/ShiroHttpServletRequest.java

Rule Violation Line
UselessParentheses Useless parentheses. 103
UselessParentheses Useless parentheses. 198
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.security.Principal' due to existing import 'java.security.Principal' 224

org/apache/shiro/web/servlet/ShiroHttpServletResponse.java

Rule Violation Line
UselessParentheses Useless parentheses. 141
UselessParentheses Useless parentheses. 144
UselessParentheses Useless parentheses. 148
UselessParentheses Useless parentheses. 154
UselessParentheses Useless parentheses. 156
UselessParentheses Useless parentheses. 167
UselessParentheses Useless parentheses. 172
UselessParentheses Useless parentheses. 174
UselessParentheses Useless parentheses. 190
UselessParentheses Useless parentheses. 195
UselessParentheses Useless parentheses. 196
UselessParentheses Useless parentheses. 199
UselessParentheses Useless parentheses. 203
UselessParentheses Useless parentheses. 221
UselessParentheses Useless parentheses. 235
UselessParentheses Useless parentheses. 236
UselessParentheses Useless parentheses. 302
UselessParentheses Useless parentheses. 302
UselessParentheses Useless parentheses. 303
UselessParentheses Useless parentheses. 327

org/apache/shiro/web/servlet/ShiroHttpSession.java

Rule Violation Line
UselessParentheses Useless parentheses. 118

org/apache/shiro/web/util/RedirectView.java

Rule Violation Line
UselessParentheses Useless parentheses. 232
UselessParentheses Useless parentheses. 246

org/apache/shiro/web/util/WebUtils.java

Rule Violation Line
UselessParentheses Useless parentheses. 117
UselessParentheses Useless parentheses. 222
UselessParentheses Useless parentheses. 229
UselessParentheses Useless parentheses. 244

Files

org/apache/shiro/web/env/EnvironmentLoader.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 307

org/apache/shiro/web/filter/PathMatchingFilter.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.util.StringUtils' 4 23

org/apache/shiro/web/filter/authc/AuthenticatingFilter.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 124
UselessParentheses Useless parentheses. 4 146

org/apache/shiro/web/filter/authc/BasicHttpAuthenticationFilter.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.web.util.WebUtils' 4 23
UnusedImports Avoid unused imports such as 'javax.servlet.http.HttpServletResponse' 4 30
UnusedImports Avoid unused imports such as 'java.util.HashSet' 4 31
UnusedImports Avoid unused imports such as 'java.util.Locale' 4 32
UnusedImports Avoid unused imports such as 'java.util.Set' 4 33

org/apache/shiro/web/filter/authc/FormAuthenticationFilter.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 183

org/apache/shiro/web/filter/authc/LogoutFilter.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.util.StringUtils' 4 24
UnusedImports Avoid unused imports such as 'org.apache.shiro.web.filter.mgt.DefaultFilter.logout' 4 36
CollapsibleIfStatements These nested if statements could be combined 3 8789

org/apache/shiro/web/filter/authz/HostFilter.java

Rule Violation Priority Line
EmptyIfStmt Avoid empty if statements 3 7173

org/apache/shiro/web/filter/authz/HttpMethodPermissionFilter.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'static' on enum 'HttpMethodAction': nested enums are implicitly static 3 100120
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'HttpMethodAction(String)': enum constructors are implicitly private 3 113115

org/apache/shiro/web/filter/mgt/DefaultFilter.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'DefaultFilter(Class)': enum constructors are implicitly private 3 5557

org/apache/shiro/web/filter/mgt/PathMatchingFilterChainResolver.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.owasp.encoder.Encoder' 4 25

org/apache/shiro/web/mgt/DefaultWebSecurityManager.java

Rule Violation Priority Line
CollapsibleIfStatements These nested if statements could be combined 3 170176

org/apache/shiro/web/mgt/DefaultWebSessionStorageEvaluator.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 92

org/apache/shiro/web/servlet/AbstractShiroFilter.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 273
UselessParentheses Useless parentheses. 4 274

org/apache/shiro/web/servlet/Cookie.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifiers 'public static final' on field 'DELETED_COOKIE_VALUE': the field is declared in an interface type 3 37
UnnecessaryModifier Unnecessary modifiers 'public static final' on field 'ONE_YEAR': the field is declared in an interface type 3 43
UnnecessaryModifier Unnecessary modifiers 'public static final' on field 'ROOT_PATH': the field is declared in an interface type 3 48
UnnecessaryModifier Unnecessary modifier 'public' on enum 'SameSiteOptions': the enum is declared in an interface type 3 5054

org/apache/shiro/web/servlet/IniShiroFilter.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 283
UselessParentheses Useless parentheses. 4 283

org/apache/shiro/web/servlet/ShiroHttpServletRequest.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 103
UselessParentheses Useless parentheses. 4 198
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.security.Principal' due to existing import 'java.security.Principal' 4 224

org/apache/shiro/web/servlet/ShiroHttpServletResponse.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 141
UselessParentheses Useless parentheses. 4 144
UselessParentheses Useless parentheses. 4 148
UselessParentheses Useless parentheses. 4 154
UselessParentheses Useless parentheses. 4 156
UselessParentheses Useless parentheses. 4 167
UselessParentheses Useless parentheses. 4 172
UselessParentheses Useless parentheses. 4 174
UselessParentheses Useless parentheses. 4 190
UselessParentheses Useless parentheses. 4 195
UselessParentheses Useless parentheses. 4 196
UselessParentheses Useless parentheses. 4 199
UselessParentheses Useless parentheses. 4 203
UselessParentheses Useless parentheses. 4 221
UselessParentheses Useless parentheses. 4 235
UselessParentheses Useless parentheses. 4 236
UselessParentheses Useless parentheses. 4 302
UselessParentheses Useless parentheses. 4 302
UselessParentheses Useless parentheses. 4 303
UselessParentheses Useless parentheses. 4 327

org/apache/shiro/web/servlet/ShiroHttpSession.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 118

org/apache/shiro/web/subject/WebSubject.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on class 'Builder': members of interface types are implicitly public 3 58157
UnnecessaryModifier Unnecessary modifier 'static' on class 'Builder': types nested within an interface type are implicitly static 3 58157

org/apache/shiro/web/tags/SecureTag.java

Rule Violation Priority Line
UnusedPrivateField Avoid unused private fields such as 'log'. 3 37

org/apache/shiro/web/util/RedirectView.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 232
UselessParentheses Useless parentheses. 4 246

org/apache/shiro/web/util/WebUtils.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 117
UselessParentheses Useless parentheses. 4 222
UselessParentheses Useless parentheses. 4 229
UselessParentheses Useless parentheses. 4 244