Added guard to avoid the case where count == 0.
This commit is contained in:
parent
927fe9ec44
commit
1711642309
|
@ -45,6 +45,8 @@ public class CountingCallback extends Callback.Nested
|
|||
public CountingCallback(Callback callback, int count)
|
||||
{
|
||||
super(callback);
|
||||
if (count < 1)
|
||||
throw new IllegalArgumentException();
|
||||
this.count = new AtomicInteger(count);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue