Original
 1 public static <B> Set<List<B>> cartesianProduct(
 2     List<? extends Set<? extends B>> sets) {
   
   
   
   
   
 3   CartesianSet<B> cartesianSet = new CartesianSet<B>(sets);
 4   return cartesianSet.isEmpty() ? ImmutableSet.<List<B>>of() : cartesianSet;
 5 }
 6 
Modified
 1 public static <B> Set<List<B>> cartesianProduct(
 2     List<? extends Set<? extends B>> sets) {
 3   for (Set<? extends B> set : sets) {
 4     if (set.isEmpty()) {
 5       return ImmutableSet.of();
 6     }
 7   }
 8   CartesianSet<B> cartesianSet = new CartesianSet<B>(sets);
 9   return cartesianSet;
10 }
11