> @@ -78,7 +97,12 @@
>              String arg0 = checkNotNull(args.get(0), "arg[0] in %s", 
> input).toString();
>              if (any(extensions.getUnchecked(arg0), 
> namespaceOrAliasEquals(namespace, aliasesForNamespace)))
>                 return input.getResult();
> -            // Could not find extension by namespace or namespace alias. Try 
> to find it by name next:
> +            // Could not find extension by namespace or namespace alias. Try 
> to find it by alias next:
> +            if (!"".equals(alias)) {
> +               if (any(extensions.getUnchecked(arg0), aliasEquals(alias)))
> +                  return input.getResult();
> +            }

The logic is duplicated. Let's refactor the three lookups into a method that 
takes the `arg0` or the `""` as an argument and returns the extension.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/918/files#r52883946

Reply via email to