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,12 +474,14 @@ public abstract class AbstractUnitOfWork<E extends Exception>
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addBatched(BatchOperation batch) {
|
private void addBatched(BatchOperation batch) {
|
||||||
|
if (batch != null) {
|
||||||
if (this.batch == null) {
|
if (this.batch == null) {
|
||||||
this.batch = batch;
|
this.batch = batch;
|
||||||
} else {
|
} else {
|
||||||
this.batch.addAll(batch);
|
this.batch.addAll(batch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Explicitly discard the work and mark it as as such in the log. */
|
/* Explicitly discard the work and mark it as as such in the log. */
|
||||||
public synchronized void abort() {
|
public synchronized void abort() {
|
||||||
|
|
Loading…
Reference in a new issue