jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: svn commit: r1547174 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/accesscontrol: AccessControlValidator.java AccessControlValidatorProvider.java
Date Tue, 03 Dec 2013 09:04:01 GMT

On Tue, Dec 3, 2013 at 3:08 AM, Michael Dürig <mduerig@apache.org> wrote:
> Could we include some form of an explanation why a RuntimeException is
> thrown here. E.g. throw a tailored descendant of RuntimeException including
> some extra message?

Good point, I kind of thought about that but then dropped the ball.

The replaced code used to log an "Unexpected error: failed to read
privileges." error message in that case, and would follow up to fail
the commit because matching privileges were not found. That kind of
confuses the purpose of the commit failure (was it caused by an
unexpected repository error or a validation issue) so I figured it
would be better to throw a separate exception in that case. Given our
practice of using checked exceptions for recoverable issues (adjust
the content being committed, etc.) and unchecked ones for unexpected
issues (network problems, etc.) I went for RuntimeException but left
it at that. Fixed in revision 1547319.


Jukka Zitting

View raw message