assert before we set the suppressed

This commit is contained in:
Britta Weber 2016-01-13 16:27:26 +01:00
parent 2c2264d8d0
commit 0c08d796c5
1 changed files with 1 additions and 1 deletions

View File

@ -580,8 +580,8 @@ public class Translog extends AbstractIndexShardComponent implements IndexShardC
// don't do anything in this case. The AlreadyClosedException comes from TranslogWriter and we should not add it as suppressed because // don't do anything in this case. The AlreadyClosedException comes from TranslogWriter and we should not add it as suppressed because
// will contain the Exception ex as cause. See also https://github.com/elastic/elasticsearch/issues/15941 // will contain the Exception ex as cause. See also https://github.com/elastic/elasticsearch/issues/15941
} catch (Exception inner) { } catch (Exception inner) {
ex.addSuppressed(inner);
assert (ex != inner.getCause()); assert (ex != inner.getCause());
ex.addSuppressed(inner);
} }
} }
} }