File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
core/src/main/java/org/springframework/security/core/annotation Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change 31
31
*/
32
32
public final class SecurityAnnotationScanners {
33
33
34
- private static final Map <Class <? extends Annotation >, SecurityAnnotationScanner <? extends Annotation >> uniqueScanners = new ConcurrentHashMap <>();
35
-
36
34
private static final Map <Class <? extends Annotation >, SecurityAnnotationScanner <? extends Annotation >> uniqueTemplateScanners = new ConcurrentHashMap <>();
37
35
38
36
private static final Map <List <Class <? extends Annotation >>, SecurityAnnotationScanner <? extends Annotation >> uniqueTypesScanners = new ConcurrentHashMap <>();
@@ -48,8 +46,7 @@ private SecurityAnnotationScanners() {
48
46
* @return the default {@link SecurityAnnotationScanner}
49
47
*/
50
48
public static <A extends Annotation > SecurityAnnotationScanner <A > requireUnique (Class <A > type ) {
51
- return (SecurityAnnotationScanner <A >) uniqueScanners .computeIfAbsent (type ,
52
- (t ) -> new UniqueSecurityAnnotationScanner <>(type ));
49
+ return requireUnique (type , new AnnotationTemplateExpressionDefaults ());
53
50
}
54
51
55
52
/**
@@ -68,9 +65,6 @@ public static <A extends Annotation> SecurityAnnotationScanner<A> requireUnique(
68
65
*/
69
66
public static <A extends Annotation > SecurityAnnotationScanner <A > requireUnique (Class <A > type ,
70
67
AnnotationTemplateExpressionDefaults templateDefaults ) {
71
- if (templateDefaults == null ) {
72
- return requireUnique (type );
73
- }
74
68
return (SecurityAnnotationScanner <A >) uniqueTemplateScanners .computeIfAbsent (type ,
75
69
(t ) -> new ExpressionTemplateSecurityAnnotationScanner <>(t , templateDefaults ));
76
70
}
You can’t perform that action at this time.
0 commit comments