R4481 Checkstyle Parameter Rename Issue

Brent Putman putmanb at georgetown.edu
Tue Sep 13 12:33:59 EDT 2016



On 9/13/16 6:29 AM, Etienne Dysli-Metref wrote:
> On 07/09/16 23:23, Brent Putman wrote:
>>> Nothing's absolute, but that was my impression as to recommended 
>>> practice, and why Spring has the init-method ook.
>> It's true that the Spring project definitely has, or at least had, that
>> position.  IIRC way way back they originally didn't even support ctors
>> at all on wired beans, or at last poorly.  But they started supporting
>> non-default ctors eventually as first-class citizens.  So I'm not so
>> sure that's their philosophical position now.
> If Spring's documentation is any indication of what they think, here
> what it says in the sidebar named "Constructor-based or setter-based
> DI?" [1]:
>
>> Since you can mix constructor-based and setter-based DI, it is a good
>> rule of thumb to use constructors for mandatory dependencies and
>> setter methods or configuration methods for optional dependencies.
>>
>>
>>
>
Thanks for that reference.  I do remember reading that now, and I think
I was unconsciously channeling that exact sentiment.



More information about the dev mailing list