eagerly check null on constructor

This commit is contained in:
Adrian Cole 2011-07-20 23:51:02 +10:00
parent f81bb95ab0
commit dddbd10490
1 changed files with 2 additions and 1 deletions

View File

@ -18,6 +18,7 @@
*/
package org.jclouds.concurrent;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Throwables.propagate;
import java.util.concurrent.TimeoutException;
@ -34,7 +35,7 @@ public class RetryOnTimeOutExceptionSupplier<T> implements Supplier<T> {
private final Supplier<T> delegate;
public RetryOnTimeOutExceptionSupplier(Supplier<T> delegate) {
this.delegate = delegate;
this.delegate = checkNotNull(delegate, "delegate");
}
@Override