throw (AssertionError)  (new AssertionError("One thread threw an 
exception").initCause(exception.get()));

also works. But inside JUnit the following is better:
assertNull("One thread threw an exception", exception.get());

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de


> -----Original Message-----
> From: jpou...@apache.org [mailto:jpou...@apache.org]
> Sent: Saturday, February 02, 2013 4:32 PM
> To: comm...@lucene.apache.org
> Subject: svn commit: r1441764 - /lucene/dev/trunk/lucene/test-
> framework/src/java/org/apache/lucene/index/BaseTermVectorsFormatTest
> Case.java
> 
> Author: jpountz
> Date: Sat Feb  2 15:32:09 2013
> New Revision: 1441764
> 
> URL: http://svn.apache.org/viewvc?rev=1441764&view=rev
> Log:
> Fix compilation under Java 6.
> 
> Modified:
>     lucene/dev/trunk/lucene/test-
> framework/src/java/org/apache/lucene/index/BaseTermVectorsFormatTest
> Case.java
> 
> Modified: lucene/dev/trunk/lucene/test-
> framework/src/java/org/apache/lucene/index/BaseTermVectorsFormatTest
> Case.java
> URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/test-
> framework/src/java/org/apache/lucene/index/BaseTermVectorsFormatTest
> Case.java?rev=1441764&r1=1441763&r2=1441764&view=diff
> ==========================================================
> ====================
> --- lucene/dev/trunk/lucene/test-
> framework/src/java/org/apache/lucene/index/BaseTermVectorsFormatTest
> Case.java (original)
> +++ lucene/dev/trunk/lucene/test-
> framework/src/java/org/apache/lucene/index/BaseTermVectorsFormatTest
> Case.java Sat Feb  2 15:32:09 2013
> @@ -722,7 +722,7 @@ public abstract class BaseTermVectorsFor
>        writer.close();
>        dir.close();
>        if (exception.get() != null) {
> -        throw new AssertionError("One thread threw an exception",
> exception.get());
> +        throw new RuntimeException("One thread threw an exception",
> exception.get());
>        }
>      }
>    }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to