Skip to content

Commit d9c1f03

Browse files
committed
Unnecessary interface modifier
1 parent 40bee45 commit d9c1f03

File tree

23 files changed

+63
-75
lines changed

23 files changed

+63
-75
lines changed

core/src/main/java/org/springframework/security/access/annotation/Secured.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@
5555
*
5656
* @return String[] The secure method attributes
5757
*/
58-
public String[] value();
58+
String[] value();
5959
}

core/src/main/java/org/springframework/security/access/hierarchicalroles/RoleHierarchy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public interface RoleHierarchy {
4040
* @param authorities - List of the directly assigned authorities.
4141
* @return List of all reachable authorities given the assigned authorities.
4242
*/
43-
public Collection<? extends GrantedAuthority> getReachableGrantedAuthorities(
43+
Collection<? extends GrantedAuthority> getReachableGrantedAuthorities(
4444
Collection<? extends GrantedAuthority> authorities);
4545

4646
}

core/src/main/java/org/springframework/security/access/method/MethodSecurityMetadataSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@
2929
* @author Ben Alex
3030
*/
3131
public interface MethodSecurityMetadataSource extends SecurityMetadataSource {
32-
public Collection<ConfigAttribute> getAttributes(Method method, Class<?> targetClass);
32+
Collection<ConfigAttribute> getAttributes(Method method, Class<?> targetClass);
3333
}

core/src/main/java/org/springframework/security/access/prepost/PostAuthorize.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@
3838
* @return the Spring-EL expression to be evaluated after invoking the protected
3939
* method
4040
*/
41-
public String value();
41+
String value();
4242
}

core/src/main/java/org/springframework/security/access/prepost/PostFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@
3838
* @return the Spring-EL expression to be evaluated after invoking the protected
3939
* method
4040
*/
41-
public String value();
41+
String value();
4242
}

core/src/main/java/org/springframework/security/access/prepost/PreFilter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@
5050
* @return the Spring-EL expression to be evaluated before invoking the protected
5151
* method
5252
*/
53-
public String value();
53+
String value();
5454

5555
/**
5656
* @return the name of the parameter which should be filtered (must be a non-null
5757
* collection instance) If the method contains a single collection argument, then this
5858
* attribute can be omitted.
5959
*/
60-
public String filterTarget() default "";
60+
String filterTarget() default "";
6161
}

core/src/main/java/org/springframework/security/core/ComparableVersion.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ class ComparableVersion implements Comparable<ComparableVersion> {
9292
private ListItem items;
9393

9494
private interface Item {
95-
final int INTEGER_ITEM = 0;
96-
final int STRING_ITEM = 1;
97-
final int LIST_ITEM = 2;
95+
int INTEGER_ITEM = 0;
96+
int STRING_ITEM = 1;
97+
int LIST_ITEM = 2;
9898

9999
int compareTo(Item item);
100100

core/src/main/java/org/springframework/security/core/authority/mapping/Attributes2GrantedAuthoritiesMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ public interface Attributes2GrantedAuthoritiesMapper {
3737
* @param attributes the attributes to be mapped
3838
* @return the collection of authorities created from the attributes
3939
*/
40-
public Collection<? extends GrantedAuthority> getGrantedAuthorities(
40+
Collection<? extends GrantedAuthority> getGrantedAuthorities(
4141
Collection<String> attributes);
4242
}

docs/manual/src/docs/asciidoc/_includes/servlet/preface/java-configuration.adoc

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,14 +1165,11 @@ These will be passed to the AccessDecisionManager for it to make the actual deci
11651165
----
11661166
public interface BankService {
11671167
1168-
@Secured("IS_AUTHENTICATED_ANONYMOUSLY")
1169-
public Account readAccount(Long id);
1168+
@Secured("IS_AUTHENTICATED_ANONYMOUSLY") Account readAccount(Long id);
11701169
1171-
@Secured("IS_AUTHENTICATED_ANONYMOUSLY")
1172-
public Account[] findAccounts();
1170+
@Secured("IS_AUTHENTICATED_ANONYMOUSLY") Account[] findAccounts();
11731171
1174-
@Secured("ROLE_TELLER")
1175-
public Account post(Account account, double amount);
1172+
@Secured("ROLE_TELLER") Account post(Account account, double amount);
11761173
}
11771174
----
11781175

@@ -1203,14 +1200,11 @@ and the equivalent Java code would be
12031200
----
12041201
public interface BankService {
12051202
1206-
@PreAuthorize("isAnonymous()")
1207-
public Account readAccount(Long id);
1203+
@PreAuthorize("isAnonymous()") Account readAccount(Long id);
12081204
1209-
@PreAuthorize("isAnonymous()")
1210-
public Account[] findAccounts();
1205+
@PreAuthorize("isAnonymous()") Account[] findAccounts();
12111206
1212-
@PreAuthorize("hasAuthority('ROLE_TELLER')")
1213-
public Account post(Account account, double amount);
1207+
@PreAuthorize("hasAuthority('ROLE_TELLER')") Account post(Account account, double amount);
12141208
}
12151209
----
12161210

docs/manual/src/docs/asciidoc/_includes/servlet/preface/namespace.adoc

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -763,14 +763,11 @@ These will be passed to the `AccessDecisionManager` for it to make the actual de
763763
----
764764
public interface BankService {
765765
766-
@Secured("IS_AUTHENTICATED_ANONYMOUSLY")
767-
public Account readAccount(Long id);
766+
@Secured("IS_AUTHENTICATED_ANONYMOUSLY") Account readAccount(Long id);
768767
769-
@Secured("IS_AUTHENTICATED_ANONYMOUSLY")
770-
public Account[] findAccounts();
768+
@Secured("IS_AUTHENTICATED_ANONYMOUSLY") Account[] findAccounts();
771769
772-
@Secured("ROLE_TELLER")
773-
public Account post(Account account, double amount);
770+
@Secured("ROLE_TELLER") Account post(Account account, double amount);
774771
}
775772
----
776773

@@ -795,14 +792,11 @@ and the equivalent Java code would be
795792
----
796793
public interface BankService {
797794
798-
@PreAuthorize("isAnonymous()")
799-
public Account readAccount(Long id);
795+
@PreAuthorize("isAnonymous()") Account readAccount(Long id);
800796
801-
@PreAuthorize("isAnonymous()")
802-
public Account[] findAccounts();
797+
@PreAuthorize("isAnonymous()") Account[] findAccounts();
803798
804-
@PreAuthorize("hasAuthority('ROLE_TELLER')")
805-
public Account post(Account account, double amount);
799+
@PreAuthorize("hasAuthority('ROLE_TELLER')") Account post(Account account, double amount);
806800
}
807801
----
808802

0 commit comments

Comments
 (0)