fix potential NPE, throw failure only if exists
This commit is contained in:
parent
703f374a8a
commit
333e7df3bc
|
@ -166,7 +166,7 @@ public abstract class ElasticsearchTestCase extends AbstractRandomizedTest {
|
||||||
if (!w.successfullyClosed()) {
|
if (!w.successfullyClosed()) {
|
||||||
if (w.closeException() == null) {
|
if (w.closeException() == null) {
|
||||||
w.close();
|
w.close();
|
||||||
if (w.closeException() == null) {
|
if (w.closeException() != null) {
|
||||||
throw w.closeException();
|
throw w.closeException();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue