> + requestBuilder.put("sourceIp", payload.sourceIp());
> +
> + if (payload.targetIp() != null)
> + requestBuilder.put("targetIp", payload.targetIp());
> +
> + if (payload.icmpCode() != null)
> + requestBuilder.put("icmpCode", payload.icmpCode());
> +
> + if (payload.icmpType() != null)
> + requestBuilder.put("icmpType", payload.icmpType());
> +
> + if (payload.portRangeStart() != null)
> + requestBuilder.put("portRangeStart", payload.portRangeStart());
> +
> + if (payload.portRangeEnd() != null)
> + requestBuilder.put("portRangeEnd", payload.portRangeEnd());
This pattern is everywhere and introduces quite verbosity to the code. Consider
making a method int he base class `puIfPresent` or so, to remove the
boilerplate.
---
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/pull/255/files/a468fa433e15575616a062912756bb7e8a6f4dd0#r59285288