Avoid NPE when batch passed in was null.
This commit is contained in:
parent
ef455ac032
commit
6c245c121e
1 changed files with 6 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue