Summary
I need access to the continueChainBeforeSuccessfulAuthentication field value in order to make some decision in my filter that is derived from AbstractAuthenticationProcessingFilter. This field is private and has only a public setter. I believe an isContinueChainBeforeSuccessfulAuthentication() method should also be provided (specifically) - but generally, I believe all the internal private fields should have getter(s) in order to query the object instance as to its internal configuration. After all, if they have public (or whatever other visibility) setters why not provide also same visibility getters ?
Obviously, one could override the relevant field setter and store locally a copy of the set value, but why duplicate the fields ?
Version
5.0.3
Comment From: rwinch
Thanks for the report. What are you using the continueChainBeforeSuccessfulAuthentication for?
We leave members as write only to keep things better encapsulated. For example, Spring Security filters use to have a member of the URL that they operated on as a member variable and allow that URL to be set. If we had exposed a getter, we wouldn't have been able to change the member variable to a RequestMatcher passively (there wouldn't have been the ability to read the URL on the RequestMatcher implementation. In short, the decision to keep the members private is by design.
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-projects-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.