mirror of https://github.com/apache/jclouds.git
eagerly check null on constructor
This commit is contained in:
parent
f81bb95ab0
commit
dddbd10490
|
@ -18,6 +18,7 @@
|
||||||
*/
|
*/
|
||||||
package org.jclouds.concurrent;
|
package org.jclouds.concurrent;
|
||||||
|
|
||||||
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
import static com.google.common.base.Throwables.propagate;
|
import static com.google.common.base.Throwables.propagate;
|
||||||
|
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
||||||
|
@ -34,7 +35,7 @@ public class RetryOnTimeOutExceptionSupplier<T> implements Supplier<T> {
|
||||||
private final Supplier<T> delegate;
|
private final Supplier<T> delegate;
|
||||||
|
|
||||||
public RetryOnTimeOutExceptionSupplier(Supplier<T> delegate) {
|
public RetryOnTimeOutExceptionSupplier(Supplier<T> delegate) {
|
||||||
this.delegate = delegate;
|
this.delegate = checkNotNull(delegate, "delegate");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue