diff --git a/support/cdi/src/test/java/org/apache/shiro/cdi/AnnotatedTypeWrapperTest.java b/support/cdi/src/test/java/org/apache/shiro/cdi/AnnotatedTypeWrapperTest.java index c643bdc41d..917cee4d8e 100644 --- a/support/cdi/src/test/java/org/apache/shiro/cdi/AnnotatedTypeWrapperTest.java +++ b/support/cdi/src/test/java/org/apache/shiro/cdi/AnnotatedTypeWrapperTest.java @@ -44,17 +44,17 @@ class AnnotatedTypeWrapperTest { @RequiresAuthentication @RequiresGuest @RequiresPermissions("hello") - private class Annotated { } + private final class Annotated { } @ShiroSecureAnnotation - private class ShiroSecureAnnotated { } + private final class ShiroSecureAnnotated { } @Stateless - private class StatelessAnnotated { } + private final class StatelessAnnotated { } @SessionScoped @SuppressWarnings("serial") - private static class SessionScopedAnnotated implements Serializable { } + private static final class SessionScopedAnnotated implements Serializable { } @Test void noAnnotations() { diff --git a/support/jakarta-ee/src/main/java/org/apache/shiro/ee/cdi/ShiroSessionScopeExtension.java b/support/jakarta-ee/src/main/java/org/apache/shiro/ee/cdi/ShiroSessionScopeExtension.java index dbadd6b617..9ad3386e95 100644 --- a/support/jakarta-ee/src/main/java/org/apache/shiro/ee/cdi/ShiroSessionScopeExtension.java +++ b/support/jakarta-ee/src/main/java/org/apache/shiro/ee/cdi/ShiroSessionScopeExtension.java @@ -46,23 +46,23 @@ public class ShiroSessionScopeExtension implements Extension, Serializable { @SessionScoped @SuppressWarnings("serial") - private static class SessionScopedAnnotated implements Serializable { } + private static final class SessionScopedAnnotated implements Serializable { } @javax.faces.view.ViewScoped @SuppressWarnings("serial") - private static class FacesViewScopedAnnotated implements Serializable { } + private static final class FacesViewScopedAnnotated implements Serializable { } @org.omnifaces.cdi.ViewScoped @SuppressWarnings("serial") - private static class OmniViewScopedAnnotated implements Serializable { } + private static final class OmniViewScopedAnnotated implements Serializable { } @ShiroSessionScoped @SuppressWarnings("serial") - private static class ShiroSessionScopedAnnotated implements Serializable { } + private static final class ShiroSessionScopedAnnotated implements Serializable { } @ShiroFacesViewScoped @SuppressWarnings("serial") - private static class ShiroFacesViewScopedAnnotated implements Serializable { } + private static final class ShiroFacesViewScopedAnnotated implements Serializable { } @ShiroOmniViewScoped @SuppressWarnings("serial") - private static class ShiroOmniViewScopedAnnotated implements Serializable { } + private static final class ShiroOmniViewScopedAnnotated implements Serializable { } /** diff --git a/support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/FormAuthenticationFilter.java b/support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/FormAuthenticationFilter.java index 0dc7582d73..a65b4c0dc3 100644 --- a/support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/FormAuthenticationFilter.java +++ b/support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/FormAuthenticationFilter.java @@ -38,7 +38,7 @@ public class FormAuthenticationFilter extends org.apache.shiro.web.filter.authc. static final FallbackPredicate NO_PREDICATE = (path, request) -> false; private final @Delegate AuthenticationFilterDelegate delegate; - private class Methods implements MethodsFromFilter { + private final class Methods implements MethodsFromFilter { @Override public Subject getSubject(ServletRequest request, ServletResponse response) { return FormAuthenticationFilter.super.getSubject(request, response); diff --git a/support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/LogoutFilter.java b/support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/LogoutFilter.java index 06d43dd11e..ed54b7731b 100644 --- a/support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/LogoutFilter.java +++ b/support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/LogoutFilter.java @@ -33,7 +33,7 @@ public class LogoutFilter extends org.apache.shiro.web.filter.authc.LogoutFilter static final String LOGOUT_PREDICATE_ATTR_NAME = "org.apache.shiro.ee.logout-predicate"; private final @Delegate AuthenticationFilterDelegate delegate; - private class Methods implements MethodsFromFilter { + private final class Methods implements MethodsFromFilter { @Override public Subject getSubject(ServletRequest request, ServletResponse response) { return LogoutFilter.super.getSubject(request, response); diff --git a/support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/PassThruAuthenticationFilter.java b/support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/PassThruAuthenticationFilter.java index 0a9402d211..00318874ca 100644 --- a/support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/PassThruAuthenticationFilter.java +++ b/support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/PassThruAuthenticationFilter.java @@ -30,7 +30,7 @@ public class PassThruAuthenticationFilter extends org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter { private final @Delegate AuthenticationFilterDelegate delegate; - private class Methods implements MethodsFromFilter { + private final class Methods implements MethodsFromFilter { @Override public Subject getSubject(ServletRequest request, ServletResponse response) { return PassThruAuthenticationFilter.super.getSubject(request, response); diff --git a/support/jakarta-ee/src/main/java/org/apache/shiro/ee/listeners/IniEnvironment.java b/support/jakarta-ee/src/main/java/org/apache/shiro/ee/listeners/IniEnvironment.java index 512a1399b0..d38ef7dfff 100644 --- a/support/jakarta-ee/src/main/java/org/apache/shiro/ee/listeners/IniEnvironment.java +++ b/support/jakarta-ee/src/main/java/org/apache/shiro/ee/listeners/IniEnvironment.java @@ -40,7 +40,7 @@ public class IniEnvironment extends IniWebEnvironment { private String otherConfigLocation; @SuppressWarnings("deprecation") - private static class SecurityManagerFactory extends WebIniSecurityManagerFactory { + private static final class SecurityManagerFactory extends WebIniSecurityManagerFactory { private final Lazy cipherService = new Lazy<>(AesCipherService::new); @Override diff --git a/support/jakarta-ee/src/test/java/org/apache/shiro/ee/cdi/ShiroScopeContextTest.java b/support/jakarta-ee/src/test/java/org/apache/shiro/ee/cdi/ShiroScopeContextTest.java index 3241ea123e..003a6408ff 100644 --- a/support/jakarta-ee/src/test/java/org/apache/shiro/ee/cdi/ShiroScopeContextTest.java +++ b/support/jakarta-ee/src/test/java/org/apache/shiro/ee/cdi/ShiroScopeContextTest.java @@ -56,7 +56,7 @@ public class ShiroScopeContextTest { private MyBean bean; private ShiroScopeContext ctx; - private static class MyBean implements ViewScoped, Serializable { + private static final class MyBean implements ViewScoped, Serializable { private static final long serialVersionUID = 1L; @Override