> +      Gson gson = new GsonBuilder().disableHtmlEscaping().create();
> +      org.jclouds.json.Json json = new GsonWrapper(gson);
> +
> +      final String deploymentTemplate = 
> UrlEscapers.urlFormParameterEscaper().escape(json.toJson(properties));
> +
> +      logger.debug("Deployment created with name: %s", name);
> +
> +      final Set<VMDeployment> deployments = Sets.newHashSet();
> +      if (!retry(new Predicate<String>() {
> +         @Override
> +         public boolean apply(final String name) {
> +            runningNumber++;
> +
> +
> +            ResourceGroupApi resourceGroupApi = api.getResourceGroupApi();
> +            ResourceGroup resourceGroup = resourceGroupApi.get(getGroupId());

The group id and the api class could be assigned outside the predicate, to 
compute them only once.

---
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-labs/pull/267/files/bae5d6dfcdb26e31057db4551c5996836666a31b#r63964025

Reply via email to