nacx commented on this pull request.

Thanks @justinThompson! This looks great. Thanks for taking your time to add 
the mock tests. Highly appreciated!

> +import com.google.common.collect.ImmutableMultimap.Builder;
+
+/**
+ * Binds the Iterable<String> to form parameters named with 
Subnets.member.index
+ */
+@Singleton
+public class BindSubnetIdsToIndexedFormParams implements Binder {
+   
+   @SuppressWarnings("unchecked")
+   @Override
+   public <R extends HttpRequest> R bindToRequest(R request, Object input) {
+      Iterable<?> values = Iterable.class.cast(checkNotNull(input, 
"subnetIds"));
+      Builder<String, String> builder = ImmutableMultimap.builder();
+      int i = 0;
+      for (Object o : values) {
+         builder.put("Subnets.member." + (i++ + 1), o.toString());

Initialize `i` to 1 to make the code easier to read?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/70#pullrequestreview-18368668

Reply via email to