Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip parameter name resolution when not needed in AbstractAutowireCapableBeanFactory #30103

Closed
sdeleuze opened this issue Mar 10, 2023 · 2 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@sdeleuze
Copy link
Contributor

As pointed out in #29612 (comment), ParameterNameDiscoverer is used even when parameter name resolution is not needed and could be skipped via a proper ConstructorArgumentValues#containsNamedArgument.

That could be beneficial both from an efficiency and compatibility perspective (no need to use -parameter javac option for such use case).

@moritzreiter
Copy link

moritzreiter commented Apr 12, 2023

I came here through the precursor issue (#29612). I get the same warning described there in a Spring Boot project in the context of using the Pebble Templates Engine:

2023-04-12T15:56:46.198+02:00  WARN 25044 --- [  restartedMain] ocalVariableTableParameterNameDiscoverer : Using deprecated '-debug' fallback for parameter name resolution. Compile the affected code with '-parameters' instead or avoid its introspection: io.pebbletemplates.boot.autoconfigure.PebbleAutoConfiguration

After reading the comments there and this issue here I was hoping it would get fixed by upgrading to Spring 6.0.7, but it doesn't.

Or is it maybe a legitimate warning in this case so that I should file an issue over at the Pebble repo?

@vishalsingh2972
Copy link

vishalsingh2972 commented Apr 13, 2023

Getting similar warning after trying everything....any resolution?

Apr 14, 2023 1:09:54 AM org.springframework.core.LocalVariableTableParameterNameDiscoverer inspectClass WARNING: Using deprecated '-debug' fallback for parameter name resolution. Compile the affected code with '-parameters' instead or avoid its introspection: demo.LoggingAspect

I am currently using Spring 6.0.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants