IDP-1004 and @Duration

Ian Young ian at iay.org.uk
Wed Jul 6 10:31:15 EDT 2016


> On 6 Jul 2016, at 10:20, Rod Widdowson <rdw at steadingsoftware.com> wrote:
> 
> In order for the @Duration to be available to our converter, one of the
> following need to be appropriately annotated:
> 
> - The field (private @Duration long foo)
> - The getter (public @Duration long getFoo())
> - The setter method (public @Duration void setFoo(long what))
> 
> In particular having the setter parameter marked (public void setFoo(long
> @Duration what)) isn't sufficient.  In nearly all the cases we lucked out
> with the field.
> 
> Scott's suggestion (which I like) is to add a new annotation
> @DurationPropertySetter and put that onto all out setters (as well as the
> annotation on the parameter).
> 
> Does anyone think this is a bad idea?

It seems unnecessary, if @Duration exists and would also work. Annotating the field seems like a good solution as well, unless of course there isn't one.

    -- Ian




-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3563 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/dev/attachments/20160706/412a15ca/attachment.p7s>


More information about the dev mailing list