-
Notifications
You must be signed in to change notification settings - Fork 38.4k
SpEL variable evaluation fails with NPE against ConcurrentHashMap [SPR-17565] #22097
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
Juergen Hoeller commented Rob Winch, have you seen this before? Is In any case, this seems to be a regression caused by #21980 where we switched to a |
Rob Winch commented Juergen Hoeller I haven't seen this before, but can confirm it is happening. The reason is that Spring Security's I created spring-projects/spring-security#6223 to address this from the Spring Security perspective. There may be other places, but it appears that MethodBasedEvaluationContext will need to be more defensive as well. |
Juergen Hoeller commented Rob Winch, as far as I can tell, So it looks like a fix on Spring Security's side is all that's needed here. In addition, we could defensively ignore a |
Juergen Hoeller commented I've addressed this on |
Rob Winch commented Juergen Hoeller Thanks. Given that Based upon what you said above it appears that ParameterNameDiscoverer is intended to resolve all parameter names or nothing. However, my initial understanding from the Javadoc was that if at least one name was discovered it could return a non-null array with null values for any parameter name that couldn't be determined. This also makes sense for an annotation based In either case, it might be worth putting some polish on the Thoughts? |
Juergen Hoeller commented Rob Winch, indeed, I've revised |
Michael Igler opened SPR-17565 and commented
After upgrading from spring-boot 2.1.0.RELEASE to 2.1.1.RELEASE I get an NPE when the following code is evaluated:
If downgrading to spring 5.1.2.RELEASE it works again.
Affects: 5.1.3
Issue Links:
Backported to: 5.0.12
The text was updated successfully, but these errors were encountered: