R4481 Checkstyle Parameter Rename Issue

Brent Putman putmanb at georgetown.edu
Wed Sep 7 17:13:46 EDT 2016



On 9/7/16 4:43 PM, Cantor, Scott wrote:
>
> I mean constructor arguments. They're inherently a problem when exposing Spring wiring to users, 

Well, I personally don't see a huge difference between a property and a
constructor.  I use them interchangeably in my own Spring stuff and
honestly haven't really ever thought about them as distinct.  Maybe
that's just the programmer in me, and the world looks different to a
non-developer deployer...

> and good or bad, that's how this system was built. It was that or custom XML.

That's obviously true.

>
> I think the point of the Component interfaces was to get to a place where we could use properties safely. 

I guess I've always thought of the Component interfaces for things that
were "larger", more important, semi-big ticker.  So something like a
Function or Predicate to me doesn't fall into that category for me.

Partially, I'm thinking here about lower-level stuff in java-support
and OpenSAML, etc.  If most every class as to be initialized(), in
order to avoid having ctors with args, that seems to me to get a bit
unwieldy.

> Maybe I'm reading into that, but given the problems with constructors in Spring wiring, that seemed like the point of it to me.

Yeah, I guess we just differ on that.  I don't see c:_0="foo" as a
problem, really.  Or if that's too unsightly for the non-developer
deployer, then can always just use (ordered) <constructor> child elements.

>
> Sometimes it's unavoidable, but I think we could have used the component interfaces more than we did.

Maybe.  There could be things that naturally should be components that
aren't.

> I inherited a lot of code that didn't use them and also seems to have used constructors and I think that was probably a mistake to keep.

I think the thing about all this that rubs me slightly the wrong way is
that: We say we want to keep (almost all of) our code formally
independent of Spring.  But then if we really do (to me) unnatural
things to avoid the use of constructors in favor of properties+init,
just to be more Spring-friendly, then that seems a bit weird.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20160907/1058f139/attachment.html>


More information about the dev mailing list