PMD Results

The following document contains the results of PMD 6.13.0.

Violations By Priority

Priority 2

org/apache/shiro/util/AntPathMatcher.java

Rule Violation Line
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 212
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 357

Priority 3

org/apache/shiro/authc/Authenticator.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'authenticate': the method is declared in an interface type 6566

org/apache/shiro/authc/LogoutAware.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'onLogout': the method is declared in an interface type 40

org/apache/shiro/authz/permission/PermissionResolverAware.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'setPermissionResolver': the method is declared in an interface type 39

org/apache/shiro/authz/permission/RolePermissionResolverAware.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'setRolePermissionResolver': the method is declared in an interface type 39

org/apache/shiro/realm/ldap/DefaultLdapContextFactory.java

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

org/apache/shiro/realm/ldap/JndiLdapContextFactory.java

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

org/apache/shiro/realm/text/PropertiesRealm.java

Rule Violation Line
EmptyCatchBlock Avoid empty catch blocks 293295

org/apache/shiro/session/mgt/eis/MemorySessionDAO.java

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

org/apache/shiro/subject/Subject.java

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

org/apache/shiro/util/AntPathMatcher.java

Rule Violation Line
CollapsibleIfStatements These nested if statements could be combined 270272
CollapsibleIfStatements These nested if statements could be combined 286288
CollapsibleIfStatements These nested if statements could be combined 307309
CollapsibleIfStatements These nested if statements could be combined 350352

Priority 4

org/apache/shiro/SecurityUtils.java

Rule Violation Line
UselessParentheses Useless parentheses. 56

org/apache/shiro/authc/SimpleAccount.java

Rule Violation Line
UselessParentheses Useless parentheses. 461
UselessParentheses Useless parentheses. 479

org/apache/shiro/authc/SimpleAuthenticationInfo.java

Rule Violation Line
UselessParentheses Useless parentheses. 270

org/apache/shiro/authc/credential/Md2CredentialsMatcher.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.AbstractHash' 21
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.Hash' 22

org/apache/shiro/authc/credential/Md5CredentialsMatcher.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.AbstractHash' 21
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.Hash' 22

org/apache/shiro/authc/credential/Sha1CredentialsMatcher.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.AbstractHash' 21
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.Hash' 22

org/apache/shiro/authc/credential/Sha256CredentialsMatcher.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.AbstractHash' 21
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.Hash' 22

org/apache/shiro/authc/credential/Sha384CredentialsMatcher.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.AbstractHash' 21
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.Hash' 22

org/apache/shiro/authc/credential/Sha512CredentialsMatcher.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.AbstractHash' 21
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.Hash' 22

org/apache/shiro/authc/credential/SimpleCredentialsMatcher.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'java.util.Arrays' 28

org/apache/shiro/authc/pam/AllSuccessfulStrategy.java

Rule Violation Line
UselessParentheses Useless parentheses. 80

org/apache/shiro/authz/SimpleRole.java

Rule Violation Line
UselessParentheses Useless parentheses. 98
UselessParentheses Useless parentheses. 108

org/apache/shiro/authz/annotation/package-info.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'java.lang.annotation.ElementType' 26
UnusedImports Avoid unused imports such as 'java.lang.annotation.Target' 27

org/apache/shiro/authz/aop/PermissionAnnotationHandler.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.authz.annotation.RequiresRoles' 24

org/apache/shiro/authz/permission/WildcardPermission.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'java.util.LinkedHashSet' 28

org/apache/shiro/config/IniFactorySupport.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'java.util.HashMap' 28

org/apache/shiro/env/BasicIniEnvironment.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.mgt.SecurityManager' 23

org/apache/shiro/jndi/JndiLocator.java

Rule Violation Line
UselessParentheses Useless parentheses. 66

org/apache/shiro/mgt/AbstractRememberMeManager.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.codec.Base64' 25
UselessParentheses Useless parentheses. 266

org/apache/shiro/mgt/DefaultSessionStorageEvaluator.java

Rule Violation Line
UselessParentheses Useless parentheses. 63

org/apache/shiro/realm/ldap/DefaultLdapContextFactory.java

Rule Violation Line
UselessParentheses Useless parentheses. 306
UselessParentheses Useless parentheses. 307
UselessParentheses Useless parentheses. 308
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'javax.naming.AuthenticationException' due to existing import 'javax.naming.AuthenticationException' 310

org/apache/shiro/realm/ldap/JndiLdapContextFactory.java

Rule Violation Line
UselessParentheses Useless parentheses. 489
UselessParentheses Useless parentheses. 538
UselessParentheses Useless parentheses. 539
UselessParentheses Useless parentheses. 540
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'javax.naming.AuthenticationException' due to existing import 'javax.naming.AuthenticationException' 542

org/apache/shiro/session/mgt/AbstractValidatingSessionManager.java

Rule Violation Line
UselessParentheses Useless parentheses. 291

org/apache/shiro/session/mgt/SimpleSession.java

Rule Violation Line
UselessParentheses Useless parentheses. 381
UselessParentheses Useless parentheses. 382

org/apache/shiro/subject/SimplePrincipalMap.java

Rule Violation Line
UselessParentheses Useless parentheses. 234
UselessParentheses Useless parentheses. 255
UselessParentheses Useless parentheses. 272

org/apache/shiro/util/AntPathMatcher.java

Rule Violation Line
UselessParentheses Useless parentheses. 77
UselessParentheses Useless parentheses. 82
UselessParentheses Useless parentheses. 137138
UselessParentheses Useless parentheses. 198
UselessParentheses Useless parentheses. 199
UselessParentheses Useless parentheses. 342
UselessParentheses Useless parentheses. 343
UselessParentheses Useless parentheses. 406

org/apache/shiro/util/ThreadContext.java

Rule Violation Line
UselessParentheses Useless parentheses. 130
UselessParentheses Useless parentheses. 185

Files

org/apache/shiro/SecurityUtils.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 56

org/apache/shiro/authc/Authenticator.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'authenticate': the method is declared in an interface type 3 6566

org/apache/shiro/authc/LogoutAware.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'onLogout': the method is declared in an interface type 3 40

org/apache/shiro/authc/SimpleAccount.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 461
UselessParentheses Useless parentheses. 4 479

org/apache/shiro/authc/SimpleAuthenticationInfo.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 270

org/apache/shiro/authc/credential/Md2CredentialsMatcher.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.AbstractHash' 4 21
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.Hash' 4 22

org/apache/shiro/authc/credential/Md5CredentialsMatcher.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.AbstractHash' 4 21
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.Hash' 4 22

org/apache/shiro/authc/credential/Sha1CredentialsMatcher.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.AbstractHash' 4 21
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.Hash' 4 22

org/apache/shiro/authc/credential/Sha256CredentialsMatcher.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.AbstractHash' 4 21
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.Hash' 4 22

org/apache/shiro/authc/credential/Sha384CredentialsMatcher.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.AbstractHash' 4 21
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.Hash' 4 22

org/apache/shiro/authc/credential/Sha512CredentialsMatcher.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.AbstractHash' 4 21
UnusedImports Avoid unused imports such as 'org.apache.shiro.crypto.hash.Hash' 4 22

org/apache/shiro/authc/credential/SimpleCredentialsMatcher.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'java.util.Arrays' 4 28

org/apache/shiro/authc/pam/AllSuccessfulStrategy.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 80

org/apache/shiro/authz/SimpleRole.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 98
UselessParentheses Useless parentheses. 4 108

org/apache/shiro/authz/annotation/package-info.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'java.lang.annotation.ElementType' 4 26
UnusedImports Avoid unused imports such as 'java.lang.annotation.Target' 4 27

org/apache/shiro/authz/aop/PermissionAnnotationHandler.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.authz.annotation.RequiresRoles' 4 24

org/apache/shiro/authz/permission/PermissionResolverAware.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'setPermissionResolver': the method is declared in an interface type 3 39

org/apache/shiro/authz/permission/RolePermissionResolverAware.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'setRolePermissionResolver': the method is declared in an interface type 3 39

org/apache/shiro/authz/permission/WildcardPermission.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'java.util.LinkedHashSet' 4 28

org/apache/shiro/config/IniFactorySupport.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'java.util.HashMap' 4 28

org/apache/shiro/env/BasicIniEnvironment.java

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

org/apache/shiro/jndi/JndiLocator.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 66

org/apache/shiro/mgt/AbstractRememberMeManager.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.shiro.codec.Base64' 4 25
UselessParentheses Useless parentheses. 4 266

org/apache/shiro/mgt/DefaultSessionStorageEvaluator.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 63

org/apache/shiro/realm/ldap/DefaultLdapContextFactory.java

Rule Violation Priority Line
CollapsibleIfStatements These nested if statements could be combined 3 298313
UselessParentheses Useless parentheses. 4 306
UselessParentheses Useless parentheses. 4 307
UselessParentheses Useless parentheses. 4 308
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'javax.naming.AuthenticationException' due to existing import 'javax.naming.AuthenticationException' 4 310

org/apache/shiro/realm/ldap/JndiLdapContextFactory.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 489
CollapsibleIfStatements These nested if statements could be combined 3 530545
UselessParentheses Useless parentheses. 4 538
UselessParentheses Useless parentheses. 4 539
UselessParentheses Useless parentheses. 4 540
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'javax.naming.AuthenticationException' due to existing import 'javax.naming.AuthenticationException' 4 542

org/apache/shiro/realm/text/PropertiesRealm.java

Rule Violation Priority Line
EmptyCatchBlock Avoid empty catch blocks 3 293295

org/apache/shiro/session/mgt/AbstractValidatingSessionManager.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 291

org/apache/shiro/session/mgt/SimpleSession.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 381
UselessParentheses Useless parentheses. 4 382

org/apache/shiro/session/mgt/eis/MemorySessionDAO.java

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

org/apache/shiro/subject/SimplePrincipalMap.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 234
UselessParentheses Useless parentheses. 4 255
UselessParentheses Useless parentheses. 4 272

org/apache/shiro/subject/Subject.java

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

org/apache/shiro/util/AntPathMatcher.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 77
UselessParentheses Useless parentheses. 4 82
UselessParentheses Useless parentheses. 4 137138
UselessParentheses Useless parentheses. 4 198
UselessParentheses Useless parentheses. 4 199
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 2 212
CollapsibleIfStatements These nested if statements could be combined 3 270272
CollapsibleIfStatements These nested if statements could be combined 3 286288
CollapsibleIfStatements These nested if statements could be combined 3 307309
UselessParentheses Useless parentheses. 4 342
UselessParentheses Useless parentheses. 4 343
CollapsibleIfStatements These nested if statements could be combined 3 350352
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 2 357
UselessParentheses Useless parentheses. 4 406

org/apache/shiro/util/ThreadContext.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 130
UselessParentheses Useless parentheses. 4 185