> +import org.jclouds.glacier.domain.JobRequest;
> +import org.jclouds.http.HttpRequest;
> +import org.jclouds.json.Json;
> +import org.jclouds.rest.Binder;
> +
> +import com.google.inject.Inject;
> +
> +public class BindJobRequestToJsonPayload implements Binder {
> +   @Inject
> +   private Json json;
> +
> +   @Override
> +   public <R extends HttpRequest> R bindToRequest(R request, Object input) {
> +      checkArgument(checkNotNull(input, "input") instanceof JobRequest,
> +            "This binder is only valid for JobRequest");
> +      checkNotNull(request, "request");

I think an IllegalState wouldn't be appropriate here. The state of the binder 
is correct, it's the argument the one that is Illegal. Since we are using 
checkNotNull for most null arguments, I think checkNotNull would be the right 
choice here. Anyway, this argument won't be null when used by the 
RestAnnotationProcessor.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/25/files#r14287005

Reply via email to