jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Svet <notificati...@github.com>
Subject Re: [jclouds/jclouds-labs] Load existing machines info on startup (#355)
Date Mon, 30 Jan 2017 10:36:18 GMT
neykov commented on this pull request.



> +import com.google.common.base.Supplier;
+import com.google.common.collect.Collections2;
+import com.google.inject.Inject;
+
+public class ImageSupplier<B> implements Supplier<Collection<Image>>, Function<String,
Image> {
+   private final Function<Collection<B>, Collection<B>> outdatedBoxesFilter;
+   private final VagrantBoxApiFacade.Factory<B> cliFactory;
+   private final Function<B, Image> boxToImage;
+
+   @Inject
+   ImageSupplier(Function<Collection<B>, Collection<B>> outdatedBoxesFilter,
+         VagrantBoxApiFacade.Factory<B> cliFactory,
+         Function<B, Image> boxToImage) {
+      this.outdatedBoxesFilter = checkNotNull(outdatedBoxesFilter, "outdatedBoxesFilter");
+      this.cliFactory = checkNotNull(cliFactory, "cliFactory");
+      this.boxToImage = checkNotNull(boxToImage, "boxToImage");

Wdym redundant? Is it because non-Nullable and guice guarantees a value?
Remove from all constructors or just those you flagged?


-- 
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/355
Mime
View raw message