> > >>> >> Well, is it effectively any better to get such an Exception served than an >> NPE?? >> >> Returning 'null' at least allows the client to "recover", for instance >> what is happening in UnitOfWorkPropagation, which otherwise will have >> an "expensive" exception thrown in many cases... >> > > Right, but my guess is that most of the time when you are asking for > something, you expect to get it back and then work with it. As it is, the > client code has to do null checks before continuining to use it, and if not > it might blow up quite a bit later. > > For method arguments you have the @Optional to say that an argument could be null. Wouldn't it be more symmetric if you, similarly, had to annotate that this method is allowed to return null. So if nothing is said about the return type it cannot be null.
Regards, Mads _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

