Anotating Constructor Parameters (IDP-1047)

Tom Zeller tzeller at dragonacea.biz
Thu Sep 29 17:50:10 EDT 2016


> This is a pretty busy class and so the constructor declaration is getting pretty noisy;
> I don't think that we have a choice but before I make further changes I want to
> check what other think.

I think the noisy-ness of any one of those constructor declarations
can be minimized by better/manual formatting, but removing
(eventually, deprecating for now I guess) those multiple constructors
seems like a win to me, but that has nothing really to do with the new
parameter annotation.

> My question is how helpful/noisy do we want this class to be.
>
> The code is currently set up to only care about "net.shibboleth.*" and "org.opensaml.*" classes, and it warns if it sees a
> constructor used for one of them with no annotation.

Maybe those package prefixes could be a configurable property, to
support deployers/plugins who want to take advantage of the same
mechanism.

> But is this too much?  Or too little?
>
> Too much:
> - It will warn on implementation classes as well as api classes (yes we could add a filter on the name but that’s getting icky)
>
> - It will warn when called with numbering parameters (c:_0) (I don't think that this is fixable)

Both of those seem fine to me.

> Too little:

I probably don't understand completely, but personally I would rather
spend time moving away from constructors.

Tom


More information about the dev mailing list