jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Phillips <notificati...@github.com>
Subject Re: [jclouds-labs] CloudSigma2 ComputeService and SecurityGroupExtension (#70)
Date Sun, 21 Sep 2014 15:11:10 GMT
> +   private List<Tag> configureTags(CloudSigma2TemplateOptions options) {
> +      ImmutableList.Builder<Tag> builder = ImmutableList.builder();
> +      for (String tagName : options.getTags()) {
> +         String nameWithPrefix = groupNamingConvention.sharedNameForGroup(tagName);
> +         builder.add(new Tag.Builder().name(nameWithPrefix).build());
> +      }
> +
> +      List<Tag> tags = builder.build();
> +      List<Tag> result = Lists.newArrayList();
> +
> +      if (!tags.isEmpty()) {
> +         logger.debug(">> creating tags...");
> +         result.addAll(api.createTags(tags));
> +      }
> +
> +      return result;

Use an immutable list builder here? Or does `result` _need_ to be mutable?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/70/files#r17826043
Mime
View raw message