<div>
+1 for an empty user if you're just doing a query.
</div><div><br></div><div>+1 for throw a runtime exception BRUTAL (if you're check if the user can login)</div><div><br></div><div>AG Sec will handle this exception and return the appropriate HTTP status code. Something like "401 - I'm brutal"</div>
<div><div><br></div><div><br></div><div><div>-- </div><div>"The measure of a man is what he does with power" - Plato</div><div>-</div><div>@abstractj</div><div>-</div><div>Volenti Nihil Difficile</div></div></div>
<p style="color: #A0A0A8;">On Friday, January 11, 2013 at 1:01 PM, Sebastien Blanc wrote:</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div><div dir="ltr">Hi All,<div style="">In the scope of <a href="https://issues.jboss.org/browse/AEROGEAR-803">https://issues.jboss.org/browse/AEROGEAR-803</a> , we have a method to retrieve an user (based on its id). If the user don't exist it returns null.</div>
<div style=""><br></div><div style="">There were some suggestions to change that into :</div><div style="">- throwing a runtime exception (seems a bit brutal)</div><div style="">- or returning an empty user (can be confusing)</div><div style="">
<br></div><div style="">What is your opinion about this ? </div><div style=""><br></div><div style="">Seb</div><div style=""><br></div><div style="">ps: the method <a href="https://gist.github.com/4510879">https://gist.github.com/4510879</a></div>
<div style=""><br></div><div style=""><br></div></div>
</div><div><div>_______________________________________________</div><div>aerogear-dev mailing list</div><div><a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a></div><div><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></div></div></div></span>
</blockquote>
<div>
<br>
</div>