-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Nullpointer Exception on Generating Key with SimpleKeyGenerator #31676
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
Comments
Would you consider updating your usage to follow the contract? |
You should be calling |
Our usecase is an afterStartup script that populates the cache with information that is retrieved from a database. At the time I implemented it in our boot application I found no clean solution that would work with I think it would be no problem to change our code in that way, that I directly call Today there is an automatic injected I can't really tell if I found that solution online or made it up by myself. But if it was the former, then others might experience similar issues which could result in a slower adaption rate of the newer spring framework version. |
Thanks for your quick feedback. I am going to decline this change request because the team is not in favor of making the |
If you are populating the cache, expecting that further calls on the actual annotated method(s) will match, it's even more important to take control over key generation. Relying on what's auto-configured and calling it will null while the actual production code will be invoked with a method and a target class is an important risk that the generated keys would not match. To be clear, calling this method with |
Thanks for the constructive feedback and conversation. I will review our caching approach. |
The issue #31412 introduced an regression for us.
The check
KotlinDetector.isSuspendingFunction(method)
results in a Nullpointer-Exception since we are calling thegenerate
Method in the following wayThe text was updated successfully, but these errors were encountered: