> + return this;
> + }
> +
> + public TemplateOptions commands(Iterable<String> commands) {
> + for (String command : checkNotNull(commands, "commands"))
> + checkNotNull(command, "all commands must be non-empty");
> + this.commands = Optional.<List<String>>
> of(ImmutableList.copyOf(commands));
> + return this;
> + }
> +
> + public TemplateOptions commands(String... commands) {
> + return commands(ImmutableList.copyOf(checkNotNull(commands,
> "commands")));
> + }
> +
> + public TemplateOptions cpuShares(int cpuShares) {
> + checkNotNull(cpuShares, "cpuShares was null");
Why do you do the `checkNotNull` then create an `Optional`? In fact, since this
is a primitive, it cannot ever *be* null. If we want the null semantics, change
to the following (and see also `memory`, plus `dns` and `hostname` which are
strings, so *could* be null...)
```Java
public TemplateOptions cpuShares(@Nullable Integer cpuShares) {
this.cpuShares = Optional.fromNullable(cpuShares);
return this;
}
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/57/files#r14482891