-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Update OncePerRequestFilter to match with spring-web #1657
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @bboyz269!
Could you add a test demonstrating the bug?
Also, please add Closes gh-1658
to the commit message, so that the issue you reported is automatically closed when this is merged.
I'm not sure what would be suffice for the test you mention but I'll look it up as soon as I get available time at a PC.On Jul 17, 2020 9:28 PM, Eleftheria Stein-Kousathana <[email protected]> wrote:
@eleftherias requested changes on this pull request.
Thanks for the PR @bboyz269!
Could you add a test demonstrating the bug?
Also, please add Closes gh-1658 to the commit message, so that the issue you reported is automatically closed when this is merged.
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.
|
I think a unit test demonstrating that a subclass of OncePerRequestFilter that has overridden getAlreadyFilteredAttributeName will still work is sufficient. |
Calling `this.alreadyFilteredAttributeName` with bean being proxied by Spring AOP cause NPE
Not quite, it has to be a subclass being proxied by Spring AOP. @eleftherias I add a new test class |
Yes, it was being proxied by Spring AOP with CGLIb. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification @bboyz269.
I just notice 2 small typos.
Once these are fixed, we can merge this PR.
...on-core/src/test/java/org/springframework/session/web/http/OncePerRequestFilterAopTests.java
Outdated
Show resolved
Hide resolved
...on-core/src/test/java/org/springframework/session/web/http/OncePerRequestFilterAopTests.java
Outdated
Show resolved
Hide resolved
fix typos
Thanks for the PR @bboyz269! This is now merged into master. |
Call "getAlreadyFilteredAttributeName()" instead of direct usage if private "this.alreadyFilteredAttributeName"
Fix the error of the property value is null when proxied by CGLIB (bean from extending SessionRepositoryFilter)