jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig <mdue...@apache.org>
Subject Re: svn commit: r1344262 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: plugins/name/NameValidator.java plugins/type/TypeValidator.java spi/commit/Validator.java
Date Fri, 01 Jun 2012 15:28:59 GMT


On 1.6.12 11:16, Jukka Zitting wrote:
> Actually, contrary to our earlier discussion, I did now remember why
> it's a good idea for the childNodeDeleted() method to return a
> Validator to be used for descending into the removed subtree.
>
> See the NamespaceValidator class that I added in revision 1345006 for
> validating changes to the /jcr:system/jcr:namespaces subtree. It's
> easier to write that code if I can rely on the ValidatingCommitHook
> calling the propertyDeleted() methods on the removed namespace mapping
> properties instead of also interpreting childNodeDeleted() calls on
> /jcr:system or /jcr:system/jcr:namespaces.

Ack, makes sense.

>
> In that revision I adjusted all the relevant code to reflect the
> restored childNodeDeleted() return value. I also did some further
> cleanup on the exception handling in ValidatingCommitHook (using a
> member variable instead of an array reference from the surrounding
> class).

Ok yes this looks better now. I further cleaned it up a bit in revision 
1345233. It seemed odd to me that you had to pass in the validator to 
the constructor of ValidatorDiff and to its validate method. It should 
only be a member of ValidatorDiff.

Michael

>
> BR,
>
> Jukka Zitting


Mime
View raw message