nacx 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"); Yes, Guice already fails if a value is missing so we'd better remove those null checks. I know there are many constructors like this in the codebase but were trying to avoid the redundant checks in all new contributions. -- 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