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

WebServiceTemplate.setInterceptors() should not be final #1244

Open
gizmo71 opened this issue Apr 5, 2022 · 1 comment
Open

WebServiceTemplate.setInterceptors() should not be final #1244

gizmo71 opened this issue Apr 5, 2022 · 1 comment

Comments

@gizmo71
Copy link

gizmo71 commented Apr 5, 2022

Alternatively, getInterceptors() should be (but that seems more wrong and would break backwards compatibility).

I tripped over this trying to use Spring AOP to weave aspects around some of the other methods in WebServiceTemplate; I couldn't work out why the interceptors weren't being called during the send/receive process, but worked fine without the aspect. Finally I noticed that setInterceptors is final but getInterceptors is not, so the set was saving the array of interceptors in the proxy but the get was retrieving them from the underlying instance (whose array was of course empty).

@gregturn
Copy link
Contributor

I frankly don't see the value in opening up setInterceptors. I would favor making getInterceptors final to align with it in the next major release.

If you're in the proxy environment, you should be able to wrap this object and relay calls back and forth to the underlying delegate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants