returning a "null object", which does nothing would be an interesting approach..<div><br></div><div>That said, I think on iOS (for now) i stay with the current approach returning 'nil' - if a store,pipe,(auth)module could not be found. I guess JS does the same.</div>
<div><br></div><div><br><br><div class="gmail_quote">On Wed, Oct 24, 2012 at 9:03 PM, <span dir="ltr"><<a href="mailto:supittma@redhat.com" target="_blank">supittma@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I've added a gist with some pseudo code to describe what I am talking bout.<br>
<br>
<a href="https://gist.github.com/1efc515a68e3585817f4" target="_blank">https://gist.github.com/1efc515a68e3585817f4</a><br>
<div class="HOEnZb"><div class="h5"><br>
On 10/24/2012 02:12 PM, <a href="mailto:supittma@redhat.com">supittma@redhat.com</a> wrote:<br>
> So I try to avoid nulls wherever possible. In the case of the<br>
> Authenticator (and Pipeline) API's we have methods get(String name).<br>
><br>
> The obvious thing to do would be to return a null object if the name<br>
> isn't a known name.<br>
><br>
> Would it be better/preferable to return some kind of default<br>
> AuthenticationModule (or Pipe) which does nothing instead?<br>
><br>
> Alternatively we could supply a peek(name) method which tests for the<br>
> name and throw an exception if you call get with a bad name.<br>
><br>
> Just some idle thoughts.<br>
><br>
> Summers<br>
> _______________________________________________<br>
> aerogear-dev mailing list<br>
> <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
</div>