mreutegg commented on a change in pull request #485:
URL: https://github.com/apache/jackrabbit-oak/pull/485#discussion_r803817011



##########
File path: 
oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/SessionDelegate.java
##########
@@ -212,6 +213,8 @@ public void refreshAtNextAccess() {
             } finally {
                 postPerform(sessionOperation, t0);
             }
+        } catch (ReadyOnlyBuilderException e) {
+            throw new RepositoryException(e);

Review comment:
       What is the rationale behind throwing a RepositoryException vs 
ConstraintViolationException?
   
   I'm not saying it's wrong. Just want to understand the reason why one is 
used instead of the other.

##########
File path: 
oak-lucene/src/test/java/org/apache/jackrabbit/oak/composite/blueGreen/IndexUtils.java
##########
@@ -142,7 +142,7 @@ public static void checkLibsIsReadOnly(Persistence p) 
throws RepositoryException
         try {
             libsNode.addNode("illegal");
             Assert.fail();
-        } catch (UnsupportedOperationException e) {
+        } catch (RepositoryException e) {

Review comment:
       I think it would be better if the test also check if the cause of the 
RepositoryException is a ReadOnlyBuilderException.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to