File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
spring-core/src/main/java/org/springframework/core Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 16
16
17
17
package org .springframework .core ;
18
18
19
+ import org .springframework .aot .AotDetector ;
20
+
19
21
/**
20
22
* Default implementation of the {@link ParameterNameDiscoverer} strategy interface,
21
23
* using the Java 8 standard reflection mechanism (if available), and falling back
22
- * to the ASM-based {@link LocalVariableTableParameterNameDiscoverer} for checking
23
- * debug information in the class file.
24
+ * to the ASM-based {@link LocalVariableTableParameterNameDiscoverer} (when not using
25
+ * AOT-processed optimizations) for checking debug information in the class file.
24
26
*
25
27
* <p>If a Kotlin reflection implementation is present,
26
28
* {@link KotlinReflectionParameterNameDiscoverer} is added first in the list and
@@ -43,7 +45,9 @@ public DefaultParameterNameDiscoverer() {
43
45
addDiscoverer (new KotlinReflectionParameterNameDiscoverer ());
44
46
}
45
47
addDiscoverer (new StandardReflectionParameterNameDiscoverer ());
46
- addDiscoverer (new LocalVariableTableParameterNameDiscoverer ());
48
+ if (!AotDetector .useGeneratedArtifacts ()) {
49
+ addDiscoverer (new LocalVariableTableParameterNameDiscoverer ());
50
+ }
47
51
}
48
52
49
53
}
You can’t perform that action at this time.
0 commit comments