You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2011/05/28 20:35:42 UTC
svn commit: r1128734 -
/lucene/dev/branches/leaky3147/lucene/src/test-framework/org/apache/lucene/store/MockIndexInputWrapper.java
Author: rmuir
Date: Sat May 28 18:35:41 2011
New Revision: 1128734
URL: http://svn.apache.org/viewvc?rev=1128734&view=rev
Log:
LUCENE-3147: maybe throw exceptions from IndexInput close() too
Modified:
lucene/dev/branches/leaky3147/lucene/src/test-framework/org/apache/lucene/store/MockIndexInputWrapper.java
Modified: lucene/dev/branches/leaky3147/lucene/src/test-framework/org/apache/lucene/store/MockIndexInputWrapper.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/leaky3147/lucene/src/test-framework/org/apache/lucene/store/MockIndexInputWrapper.java?rev=1128734&r1=1128733&r2=1128734&view=diff
==============================================================================
--- lucene/dev/branches/leaky3147/lucene/src/test-framework/org/apache/lucene/store/MockIndexInputWrapper.java (original)
+++ lucene/dev/branches/leaky3147/lucene/src/test-framework/org/apache/lucene/store/MockIndexInputWrapper.java Sat May 28 18:35:41 2011
@@ -40,12 +40,16 @@ public class MockIndexInputWrapper exten
@Override
public void close() throws IOException {
- delegate.close();
- // Pending resolution on LUCENE-686 we may want to
- // remove the conditional check so we also track that
- // all clones get closed:
- if (!isClone) {
- dir.removeIndexInput(this, name);
+ try {
+ dir.maybeThrowDeterministicException();
+ } finally {
+ delegate.close();
+ // Pending resolution on LUCENE-686 we may want to
+ // remove the conditional check so we also track that
+ // all clones get closed:
+ if (!isClone) {
+ dir.removeIndexInput(this, name);
+ }
}
}