[aerogear-dev] Question about retrieving an AeroGearUser ?

Daniel Bevenius daniel.bevenius at gmail.com
Fri Jan 11 11:14:35 EST 2013


Just that it might cause an error later down that could possibly be hard to
track down, that is all. The application might fail at some later stage
long after this call was made.

/Dan


On 11 January 2013 17:07, Sebastien Blanc <scm.blanc at gmail.com> wrote:

> What is really wrong with returning 'null' ?
> I'm used to this situation when using Hibernate for example, when the user
> don't exist then it just return null and it's up to the developer (as Lucas
> said) to handle this situation ...
> Seb
>
>
>
> On Fri, Jan 11, 2013 at 5:02 PM, Matthias Wessendorf <matzew at apache.org>wrote:
>
>> On Fri, Jan 11, 2013 at 4:01 PM, Sebastien Blanc <scm.blanc at gmail.com>
>> wrote:
>> > Hi All,
>> > In the scope of https://issues.jboss.org/browse/AEROGEAR-803 , we have
>> a
>> > method to retrieve an user (based on its id). If the user don't exist it
>> > returns null.
>> >
>> > There were some suggestions to change that into :
>> > - throwing a runtime exception (seems a bit brutal)
>>
>> +1 on exception
>>
>> -M
>>
>>
>> > - or returning an empty user (can be confusing)
>> >
>> > What is your opinion about this ?
>> >
>> > Seb
>> >
>> > ps: the method https://gist.github.com/4510879
>> >
>> >
>> >
>> > _______________________________________________
>> > aerogear-dev mailing list
>> > aerogear-dev at lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/aerogear-dev
>> >
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>> _______________________________________________
>> aerogear-dev mailing list
>> aerogear-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>
>
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20130111/1f8c45f4/attachment.html 


More information about the aerogear-dev mailing list