-
Notifications
You must be signed in to change notification settings - Fork 82
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
NullPointerException
in org.openrewrite.java.spring.security6.UpdateRequestCache.isContinueParameterStatement(UpdateRequestCache.java:146)
#507
Comments
NullPointerException
in org.openrewrite.java.spring.security6.UpdateRequestCache.isContinueParameterStatement(UpdateRequestCache.java:146)
To followup with a more thorough fix if we learn more about the usage there.
Hi @xtermi2 ; thanks for the report; It's hard to say what exactly is going on without more details, but I did add this one small change already to get rid of the immediate NPE 8f1f7b9 Since the recipe looks at the use of |
And note that you can already try out the above change through |
Thanks @timtebeek for the fast reply. I'll test the snapshot build later. @Configuration
public class MasterdataSecurityConfiguration {
@Configuration
static class BaseSecurityConfiguration {
RequestCache requestCache() {
// configure Spring Security 5 behavior for request cache checking
HttpSessionRequestCache requestCache = new HttpSessionRequestCache();
requestCache.setMatchingRequestParameterName(null);
return requestCache;
}
@Bean
SecurityFilterChain baseSecurityConfigurationSecurityFilterChainMasterdata(HttpSecurity http) throws Exception {
http.requestCache(cache -> cache.requestCache(requestCache()));
return http.build();
}
}
} |
Thanks for the reduced example! Yes that'll not have worked previously, but I hope that's covered now by switching around that equals; thanks! I'll be optimistic and already close this issue, but monitor any replies if there's more to do still. |
OK, this issue is gone with the
|
Hmm that's odd; we seem to throw here, but the details from the nested exception are somehow now visible above. Perhaps we'd need a new release of openrewrite/rewrite to go along with the new rewrite-spring snapshot. 🤔 |
What version of OpenRewrite are you using?
org.openrewrite.rewrite gradle plugin version 6.8.4
I am using
How are you running OpenRewrite?
I am using the Gradle plugin, and my project is a multi module project (
./gradlew rewriteRun --stacktrace --no-daemon
). It's not public and I can't share it, because it contains of several hundred gradle modules.What is the smallest, simplest way to reproduce the problem?
don't know, it's a complicated configuration class with nested/inner configurations which I can't share. There are multiple SecurityFilterChain's as nested configuration class within this class.
What did you expect to see?
no Exception
What did you see instead?
a NullPointerException
What is the full stack trace of any errors you encountered?
Are you interested in contributing a fix to OpenRewrite?
no
The text was updated successfully, but these errors were encountered: