> + }); > + if (!optionalBootableVolume.isPresent()) { > + return Type.LOCAL.ordinal(); > + } > + return optionalBootableVolume.get().getType().ordinal(); > + } > + > + private Optional<OperatingSystem> tryExtractOperatingSystemFrom(final > String imageId) { > + Set<OperatingSystem> operatingSystemsAvailable = > createObjectOptionsSupplier.get().getVirtualGuestOperatingSystems(); > + return tryFind(FluentIterable.from(operatingSystemsAvailable) > + .filter(new Predicate<OperatingSystem>() { > + @Override > + public boolean apply(OperatingSystem input) { > + return input.getId().contains(imageId); > + } > + }), Predicates.notNull());
[minor] What is the `notNull()` for? Does `operatingSystemsAvailable` possible contain `null` elements? And just to check I'm understanding the logic correctly here: the image ID can be a substring of the the ID of an OperatingSystem, and that is what we are looking? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/568/files#r18748139