File tree Expand file tree Collapse file tree
core/src/main/java/org/springframework/security/core/parameters
messaging/src/test/java/org/springframework/security/messaging/handler/invocation
web/src/test/java/org/springframework/security/web/method Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ public DefaultSecurityParameterNameDiscoverer(List<? extends ParameterNameDiscov
7575 annotationClassesToUse .add (DATA_PARAM_CLASSNAME );
7676 }
7777 addDiscoverer (new AnnotationParameterNameDiscoverer (annotationClassesToUse ));
78- addDiscoverer (new DefaultParameterNameDiscoverer ());
78+ addDiscoverer (DefaultParameterNameDiscoverer . getSharedInstance ());
7979 }
8080
8181}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ org-jetbrains-kotlin = "2.2.21"
1212org-jetbrains-kotlinx = " 1.10.2"
1313org-mockito = " 5.17.0"
1414org-opensaml5 = " 5.1.6"
15- org-springframework = " 7.0.2 "
15+ org-springframework = " 7.0.3-SNAPSHOT "
1616com-password4j = " 1.8.4"
1717
1818[libraries ]
Original file line number Diff line number Diff line change 4040import org .springframework .cglib .proxy .Enhancer ;
4141import org .springframework .cglib .proxy .Factory ;
4242import org .springframework .cglib .proxy .MethodProxy ;
43- import org .springframework .core .DefaultParameterNameDiscoverer ;
4443import org .springframework .core .MethodIntrospector ;
4544import org .springframework .core .MethodParameter ;
46- import org .springframework .core .ParameterNameDiscoverer ;
4745import org .springframework .core .ResolvableType ;
4846import org .springframework .core .annotation .AnnotatedElementUtils ;
4947import org .springframework .core .annotation .AnnotationUtils ;
@@ -132,8 +130,6 @@ public final class ResolvableMethod {
132130
133131 private static final SpringObjenesis objenesis = new SpringObjenesis ();
134132
135- private static final ParameterNameDiscoverer nameDiscoverer = new DefaultParameterNameDiscoverer ();
136-
137133 // Matches ValueConstants.DEFAULT_NONE (spring-web and spring-messaging)
138134 private static final String DEFAULT_VALUE_NONE = "\n \t \t \n \t \t \n \uE000 \uE001 \uE002 \n \t \t \t \t \n " ;
139135
@@ -634,7 +630,6 @@ private List<MethodParameter> applyFilters() {
634630 List <MethodParameter > matches = new ArrayList <>();
635631 for (int i = 0 ; i < ResolvableMethod .this .method .getParameterCount (); i ++) {
636632 MethodParameter param = new SynthesizingMethodParameter (ResolvableMethod .this .method , i );
637- param .initParameterNameDiscovery (nameDiscoverer );
638633 if (this .filters .stream ().allMatch ((p ) -> p .test (param ))) {
639634 matches .add (param );
640635 }
Original file line number Diff line number Diff line change 4040import org .springframework .cglib .proxy .Enhancer ;
4141import org .springframework .cglib .proxy .Factory ;
4242import org .springframework .cglib .proxy .MethodProxy ;
43- import org .springframework .core .DefaultParameterNameDiscoverer ;
4443import org .springframework .core .MethodIntrospector ;
4544import org .springframework .core .MethodParameter ;
46- import org .springframework .core .ParameterNameDiscoverer ;
4745import org .springframework .core .ResolvableType ;
4846import org .springframework .core .annotation .AnnotatedElementUtils ;
4947import org .springframework .core .annotation .AnnotationUtils ;
@@ -131,8 +129,6 @@ public final class ResolvableMethod {
131129
132130 private static final SpringObjenesis objenesis = new SpringObjenesis ();
133131
134- private static final ParameterNameDiscoverer nameDiscoverer = new DefaultParameterNameDiscoverer ();
135-
136132 private final Method method ;
137133
138134 private ResolvableMethod (Method method ) {
@@ -620,7 +616,6 @@ private List<MethodParameter> applyFilters() {
620616 List <MethodParameter > matches = new ArrayList <>();
621617 for (int i = 0 ; i < ResolvableMethod .this .method .getParameterCount (); i ++) {
622618 MethodParameter param = new SynthesizingMethodParameter (ResolvableMethod .this .method , i );
623- param .initParameterNameDiscovery (nameDiscoverer );
624619 if (this .filters .stream ().allMatch ((p ) -> p .test (param ))) {
625620 matches .add (param );
626621 }
You can’t perform that action at this time.
0 commit comments