> + return
> OperatingSystem.builder().family(OsFamily.WINDOWS).version(version)
> + .description(image.description());
> + }
> + return
> OperatingSystem.builder().family(OsFamily.LINUX).version(version).description(image.description());
> + }
> +
> + private Location createLocation(String input) {
> + return new
> LocationBuilder().id(input).scope(LocationScope.REGION).description(input).parent(
> +
> Iterables.getOnlyElement(provider.get())).metadata(ImmutableMap.<String,
> Object>of("name", input)).build();
> + }
> +
> + public static Function<String, OsFamily> osFamily() {
> + return new Function<String, OsFamily>() {
> + @Override
> + public OsFamily apply(final String label) {
> + if (label != null) {
Instead of using this conditional use `checkNotNull` to fail on a null input
value.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/117/files#r22192061