Attribute resolution for private credentials in subject

Cantor, Scott cantor.2 at
Thu Apr 7 09:39:59 EDT 2016

> In the example code on the wiki, there are always checks for nulls.
> I guess that's a good practice, although I don't know in what situation not checking for nulls might break
> things, or what to do when something is null.

Everything in Java is a pointer, and null exceptions are unchecked, so code paths can get very screwed up when you don't allow for them. It's impossible to say what it will do.

Your example mainly just assumes that the Subject you want is the one in the first position, and that assumption only holds if you know exactly which login flows are enabled. As a local script it's perfectly fine, but people take examples too literally and don't pay any attention to what they're actually doing when they copy them, so that's the point I was making.

-- Scott

More information about the users mailing list