thomasmueller commented on code in PR #538:
URL: https://github.com/apache/jackrabbit-oak/pull/538#discussion_r850150176


##########
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/MergeRunner.java:
##########
@@ -297,14 +332,20 @@ private class Task implements Callable<File> {
             mergeTaskPhaser.register();
         }
 
+
         @Override
-        public File call() {
+        public File call() throws Exception {

Review Comment:
   Instead of throwing "Exception", a more specific exception should be thrown. 
There are two options here:
   (a) use you own exception class, or
   (b) use an existing one. 
   
   I think appropriate would be java.io.EOFException (end-of-file): 
https://docs.oracle.com/javase/9/docs/api/java/io/EOFException.html



##########
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/MergeRunner.java:
##########
@@ -297,14 +332,20 @@ private class Task implements Callable<File> {
             mergeTaskPhaser.register();
         }
 
+
         @Override
-        public File call() {
+        public File call() throws Exception {

Review Comment:
   I wonder, do we have a test case that checks an exception is thrown at the 
right time?



-- 
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