Skip to content

Commit 4728b6b

Browse files
committed
enh(checkstyle): made private classes final to conform to latest checkstyle rules
1 parent 42eacac commit 4728b6b

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

support/cdi/src/test/java/org/apache/shiro/cdi/AnnotatedTypeWrapperTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ class AnnotatedTypeWrapperTest {
4444
@RequiresAuthentication
4545
@RequiresGuest
4646
@RequiresPermissions("hello")
47-
private class Annotated { }
47+
private final class Annotated { }
4848

4949
@ShiroSecureAnnotation
50-
private class ShiroSecureAnnotated { }
50+
private final class ShiroSecureAnnotated { }
5151

5252
@Stateless
53-
private class StatelessAnnotated { }
53+
private final class StatelessAnnotated { }
5454

5555
@SessionScoped
5656
@SuppressWarnings("serial")
57-
private static class SessionScopedAnnotated implements Serializable { }
57+
private static final class SessionScopedAnnotated implements Serializable { }
5858

5959
@Test
6060
void noAnnotations() {

support/jakarta-ee/src/main/java/org/apache/shiro/ee/cdi/ShiroSessionScopeExtension.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,23 @@ public class ShiroSessionScopeExtension implements Extension, Serializable {
4646

4747
@SessionScoped
4848
@SuppressWarnings("serial")
49-
private static class SessionScopedAnnotated implements Serializable { }
49+
private static final class SessionScopedAnnotated implements Serializable { }
5050
@javax.faces.view.ViewScoped
5151
@SuppressWarnings("serial")
52-
private static class FacesViewScopedAnnotated implements Serializable { }
52+
private static final class FacesViewScopedAnnotated implements Serializable { }
5353
@org.omnifaces.cdi.ViewScoped
5454
@SuppressWarnings("serial")
55-
private static class OmniViewScopedAnnotated implements Serializable { }
55+
private static final class OmniViewScopedAnnotated implements Serializable { }
5656

5757
@ShiroSessionScoped
5858
@SuppressWarnings("serial")
59-
private static class ShiroSessionScopedAnnotated implements Serializable { }
59+
private static final class ShiroSessionScopedAnnotated implements Serializable { }
6060
@ShiroFacesViewScoped
6161
@SuppressWarnings("serial")
62-
private static class ShiroFacesViewScopedAnnotated implements Serializable { }
62+
private static final class ShiroFacesViewScopedAnnotated implements Serializable { }
6363
@ShiroOmniViewScoped
6464
@SuppressWarnings("serial")
65-
private static class ShiroOmniViewScopedAnnotated implements Serializable { }
65+
private static final class ShiroOmniViewScopedAnnotated implements Serializable { }
6666

6767

6868
/**

support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/FormAuthenticationFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class FormAuthenticationFilter extends org.apache.shiro.web.filter.authc.
3838
static final FallbackPredicate NO_PREDICATE = (path, request) -> false;
3939
private final @Delegate AuthenticationFilterDelegate delegate;
4040

41-
private class Methods implements MethodsFromFilter {
41+
private final class Methods implements MethodsFromFilter {
4242
@Override
4343
public Subject getSubject(ServletRequest request, ServletResponse response) {
4444
return FormAuthenticationFilter.super.getSubject(request, response);

support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/LogoutFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class LogoutFilter extends org.apache.shiro.web.filter.authc.LogoutFilter
3333
static final String LOGOUT_PREDICATE_ATTR_NAME = "org.apache.shiro.ee.logout-predicate";
3434
private final @Delegate AuthenticationFilterDelegate delegate;
3535

36-
private class Methods implements MethodsFromFilter {
36+
private final class Methods implements MethodsFromFilter {
3737
@Override
3838
public Subject getSubject(ServletRequest request, ServletResponse response) {
3939
return LogoutFilter.super.getSubject(request, response);

support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/PassThruAuthenticationFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
public class PassThruAuthenticationFilter extends org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter {
3131
private final @Delegate AuthenticationFilterDelegate delegate;
3232

33-
private class Methods implements MethodsFromFilter {
33+
private final class Methods implements MethodsFromFilter {
3434
@Override
3535
public Subject getSubject(ServletRequest request, ServletResponse response) {
3636
return PassThruAuthenticationFilter.super.getSubject(request, response);

support/jakarta-ee/src/main/java/org/apache/shiro/ee/listeners/IniEnvironment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class IniEnvironment extends IniWebEnvironment {
4040
private String otherConfigLocation;
4141

4242
@SuppressWarnings("deprecation")
43-
private static class SecurityManagerFactory extends WebIniSecurityManagerFactory {
43+
private static final class SecurityManagerFactory extends WebIniSecurityManagerFactory {
4444
private final Lazy<AesCipherService> cipherService = new Lazy<>(AesCipherService::new);
4545

4646
@Override

support/jakarta-ee/src/test/java/org/apache/shiro/ee/cdi/ShiroScopeContextTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public class ShiroScopeContextTest {
5656
private MyBean bean;
5757
private ShiroScopeContext ctx;
5858

59-
private static class MyBean implements ViewScoped, Serializable {
59+
private static final class MyBean implements ViewScoped, Serializable {
6060
private static final long serialVersionUID = 1L;
6161

6262
@Override

0 commit comments

Comments
 (0)