Avoid NPE when batch passed in was null.

This commit is contained in:
Greg Burd 2018-03-05 08:37:48 -05:00
parent ef455ac032
commit 6c245c121e

View file

@ -474,10 +474,12 @@ public abstract class AbstractUnitOfWork<E extends Exception>
}
private void addBatched(BatchOperation batch) {
if (this.batch == null) {
this.batch = batch;
} else {
this.batch.addAll(batch);
if (batch != null) {
if (this.batch == null) {
this.batch = batch;
} else {
this.batch.addAll(batch);
}
}
}