> +import org.jclouds.rest.Binder;
> +
> +import com.google.common.collect.ImmutableMap;
> +
> +public class CreateHttpRedirectBinder implements Binder {
> +   private final Json json;
> +
> +   @Inject
> +   CreateHttpRedirectBinder(Json json){
> +      this.json = checkNotNull(json, "json");
> +   }
> +
> +   @SuppressWarnings("unchecked")
> +   @Override
> +   public <R extends HttpRequest> R bindToRequest(R request, Object 
> httpRedirect) {
> +      HttpRedirect in = HttpRedirect.class.cast(checkNotNull(httpRedirect, 
> "httpRedirect"));

Would a `checkArgument(httpRedirect instanceof ...)` help here, or is that 
assumed by contract?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/37/files#r5013016

Reply via email to