Attribute Encoders: @Nullable or @NonNull

Cantor, Scott cantor.2 at osu.edu
Thu May 2 10:26:59 EDT 2013


On 5/2/13 9:20 AM, "Rod Widdowson" <rdw at steadingsoftware.com> wrote:

>My feeling is that the Interface implementation is correct.  By the time
>an
>Attribute exits the filter stage it will either be not present in the
>result
>set or it have at least one value, hence an encoder will only not be able
>to
>do anything (and thus either return null or throw an exception) if there
>is
>the Attribute Values are of a type which do not lend themselves to being
>encoded (so a StringValue being passed to a XmlObjectEncoder), and this
>is a
>configuration issue, not a glitch in normal running.
>
>But I thought I should check with others with more experience in the
>field...

I would assume @Nonnull and that it would throw in the event of a problem.
So yes, I agree.

-- Scott




More information about the dev mailing list