fix potential NPE, throw failure only if exists

This commit is contained in:
Shay Banon 2014-03-23 19:03:30 +01:00
parent 703f374a8a
commit 333e7df3bc
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ public abstract class ElasticsearchTestCase extends AbstractRandomizedTest {
if (!w.successfullyClosed()) {
if (w.closeException() == null) {
w.close();
if (w.closeException() == null) {
if (w.closeException() != null) {
throw w.closeException();
}
} else {