Do not use LocalVariableTableParameterNameDiscoverer in AOT mode
Closes gh-29531
This commit is contained in:
parent
04366f4129
commit
f4e23fe204
|
@ -16,11 +16,13 @@
|
||||||
|
|
||||||
package org.springframework.core;
|
package org.springframework.core;
|
||||||
|
|
||||||
|
import org.springframework.aot.AotDetector;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default implementation of the {@link ParameterNameDiscoverer} strategy interface,
|
* Default implementation of the {@link ParameterNameDiscoverer} strategy interface,
|
||||||
* using the Java 8 standard reflection mechanism (if available), and falling back
|
* using the Java 8 standard reflection mechanism (if available), and falling back
|
||||||
* to the ASM-based {@link LocalVariableTableParameterNameDiscoverer} for checking
|
* to the ASM-based {@link LocalVariableTableParameterNameDiscoverer} (when not using
|
||||||
* debug information in the class file.
|
* AOT-processed optimizations) for checking debug information in the class file.
|
||||||
*
|
*
|
||||||
* <p>If a Kotlin reflection implementation is present,
|
* <p>If a Kotlin reflection implementation is present,
|
||||||
* {@link KotlinReflectionParameterNameDiscoverer} is added first in the list and
|
* {@link KotlinReflectionParameterNameDiscoverer} is added first in the list and
|
||||||
|
@ -43,7 +45,9 @@ public class DefaultParameterNameDiscoverer extends PrioritizedParameterNameDisc
|
||||||
addDiscoverer(new KotlinReflectionParameterNameDiscoverer());
|
addDiscoverer(new KotlinReflectionParameterNameDiscoverer());
|
||||||
}
|
}
|
||||||
addDiscoverer(new StandardReflectionParameterNameDiscoverer());
|
addDiscoverer(new StandardReflectionParameterNameDiscoverer());
|
||||||
addDiscoverer(new LocalVariableTableParameterNameDiscoverer());
|
if (!AotDetector.useGeneratedArtifacts()) {
|
||||||
|
addDiscoverer(new LocalVariableTableParameterNameDiscoverer());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue