From c4f6e3053e17026fd9393f139ae4b4d18fceb1fa Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Sat, 2 Feb 2013 23:20:38 +0000 Subject: [PATCH] Replace "throw exception" with the more idiomatic Junit's "assertNull", following Uwe's advice. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1441831 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/lucene/index/BaseTermVectorsFormatTestCase.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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()); } }