Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

Replace "throw exception" with the more idiomatic Junit's "assertNull", following Uwe's advice.

Adrien Grandc4f6e3053e17
diff --git a/lucene/test-framework/src/java/org/apache/lucene/index/BaseTermVectorsFormatTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/index/BaseTermVectorsFormatTestCase.java
index c76b9442075..63de145d89f 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/index/BaseTermVectorsFormatTestCase.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/index/BaseTermVectorsFormatTestCase.java
@@ -721,9 +721,7 @@ public abstract class BaseTermVectorsFormatTestCase extends LuceneTestCase {
reader.close();
writer.close();
dir.close();
- if (exception.get() != null) {
- throw new RuntimeException("One thread threw an exception", exception.get());
- }
+ assertNull("One thread threw an exception", exception.get());
}
}