> - public String
> apply(String input) {
> -
> checkArgument(isCidrFormat(input),
> -
> "input %s is not a valid CIDR",
> -
> input);
> - return input;
> - }
> - }));
> + new Function<String, String>() {
> + @Override
> + public String apply(String input) {
> + checkArgument(isCidrFormat(input),
> + "input %s is not a valid CIDR",
> + input);
> + return input;
> + }
> + }));
Wow...if I'm getting this right, the "transform" simply validates each entry?
In that case perhaps simply write:
```
for (String cidrBlock : cidrBlocks) {
checkArgument(isCidrFormat(cirdBlock), "%s is not a valid CIDR", cirdBlock);
}
Iterables.addAll(this.cidrBlocks, cidrBlocks);
return this;
```
? Intent seems much clearer here to me...
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/145/files#r6228647