maidh91 / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

cartesianProduct fails on nulls #351

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a set containing null.
2. add this set to a list.
3. pass the list to Sets.cartesianProduct()

What is the expected output? 

Generated cartesian product with nulls.

What do you see instead?
Stack trace:
java.lang.NullPointerException
    at 
com.google.common.collect.ImmutableSet.create(ImmutableSet.java:290)
    at 
com.google.common.collect.ImmutableSet.copyOfInternal(ImmutableSet.java:239
)
    at 
com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:213)
    at 
com.google.common.collect.Sets$CartesianSet$Axis.<init>(Sets.java:928)
    at 
com.google.common.collect.Sets$CartesianSet.<init>(Sets.java:846)
    at com.google.common.collect.Sets.cartesianProduct(Sets.java:790)
...

What version of the product are you using? On what operating system?
RC03 on Windows XP. JDK 1.6.0_18

Original issue reported on code.google.com by matixo on 24 Apr 2010 at 12:40

GoogleCodeExporter commented 9 years ago
Can you explain your use case in detail?   Thanks.

Original comment by kevinb@google.com on 25 Apr 2010 at 7:28

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 30 Jul 2010 at 3:56

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 12 Jan 2011 at 10:30

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:15

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:10