You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by md...@apache.org on 2018/04/09 15:39:09 UTC
svn commit: r1828740 -
/jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/ReadOnlyFileStore.java
Author: mduerig
Date: Mon Apr 9 15:39:09 2018
New Revision: 1828740
URL: http://svn.apache.org/viewvc?rev=1828740&view=rev
Log:
OAK-7396: ReadOnlyFileStore.readSegment does not correctly throw SegmentNotFoundException
Catch UncheckedExecutionException along with ExecutionException
Modified:
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/ReadOnlyFileStore.java
Modified: jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/ReadOnlyFileStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/ReadOnlyFileStore.java?rev=1828740&r1=1828739&r2=1828740&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/ReadOnlyFileStore.java (original)
+++ jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/ReadOnlyFileStore.java Mon Apr 9 15:39:09 2018
@@ -32,6 +32,7 @@ import java.util.concurrent.ExecutionExc
import javax.annotation.Nonnull;
import com.google.common.io.Closer;
+import com.google.common.util.concurrent.UncheckedExecutionException;
import org.apache.jackrabbit.oak.segment.RecordId;
import org.apache.jackrabbit.oak.segment.Segment;
import org.apache.jackrabbit.oak.segment.SegmentId;
@@ -117,7 +118,7 @@ public class ReadOnlyFileStore extends A
return readSegmentUncached(tarFiles, id);
}
});
- } catch (ExecutionException e) {
+ } catch (ExecutionException | UncheckedExecutionException e) {
throw asSegmentNotFoundException(e, id);
}
}