> - */
> - @Override
> - public <R extends HttpRequest> R bindToRequest(R request, Map<String,
> Object> postParams) {
> - FirewallOptions options = (FirewallOptions)
> checkNotNull(postParams.get("options"), "firewallOptions");
> - String name = (String) checkNotNull(postParams.get("name"), "name");
> - URI network = (URI) checkNotNull(postParams.get("network"), "network");
> - options.name(name);
> - options.network(network);
> + private final BindToJsonPayload jsonBinder;
> +
> + @Inject FirewallBinder(BindToJsonPayload jsonBinder){
> + this.jsonBinder = jsonBinder;
> + }
> +
> + @Override public <R extends HttpRequest> R bindToRequest(R request,
> Map<String, Object> postParams) {
> + FirewallOptions options = (FirewallOptions) postParams.get("options");
didn't know that the request was already not-null checked. nice!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/64/files#r19376667