On 15.03.2013, at 09:01, Felix Meschberger <fmesc...@adobe.com> wrote:

> I would prefer a SecurityException, but JCR has a notion of "no access looks 
> the same as non-existing",

Right, it should not be possible to find out if something exists if you don't 
have the permission!

> so an ItemNotFoundException would probably be thrown in this case (due to JCR 
> throwing an exception if something does not exist instead of just returning 
> null).

I always found that a bad design - returning "null" for not found allows much 
more readable code, since it is an expected case and not an unexpected failure 
case for which exceptions are designed for. Not sure if a custom Jackrabbit API 
extension has to follow the same design...

Cheers,
Alex

Reply via email to