> +            .trimResults()
> +            .omitEmptyStrings()
> +            .withKeyValueSeparator('=')
> +            .split(hardwareSpec);
> +      if (!specValues.containsKey("ram") || 
> !specValues.containsKey("cores")) {
> +         throw new IllegalArgumentException(String.format("Omitted keys on 
> hardwareId: %s", hardwareId));
> +      }
> +      spec.ram = Integer.parseInt(specValues.get("ram"));
> +      spec.cores = Double.parseDouble(specValues.get("cores"));
> +      return spec;
> +   }
> +
> +   public static AutomaticHardwareIdSpec 
> AutomaticHardwareIdSpecBuilder(Double cores, int ram) {
> +      AutomaticHardwareIdSpec spec = new AutomaticHardwareIdSpec();
> +      if (cores == 0 || ram == 0) {
> +         throw new IllegalArgumentException(String.format("Omitted or wrong 
> parms"));

Be explicit about what is exactly missing or wrong.

---
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/pull/984/files/24d1c709310ffe7e511e13c203f2d7f0d4709d37#r71836041

Reply via email to