jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@adobe.com>
Subject Re: hasProperty vs getProperty
Date Thu, 19 Jul 2012 19:47:16 GMT
On 12.06.2012, at 15:01, Julian Reschke wrote:

> Is this just to avoid catching exceptions? (keep in mind that the 
> exception might be thrown anyway...)

No, if hasProperty() returns true, you don't expect the PathNotFoundEx and don't have to handle
it for the purpose of semantics! There is no catch(PathNotFoundEx) in the code you quote :-)

You only have to handle the RepositoryException, which can then be seen as unrecoverable error
condition (and is usually passed through and handled at a more generic layer in application


View raw message