Closed GoogleCodeExporter closed 9 years ago
This sounds like there may be multiple versions of Guava on the classpath. If
the problem started with 7u40 or 14.0.1, that may mean that the JDK happens to
load a different version of one of the classes than it did with previous
versions.
I've tried to reproduce the problem but had no luck. If I can reproduce your
setup, I can investigate further.
$ cat Foo.java
import com.google.common.collect.ImmutableList;
public class Foo {
public static void main(String[] args) {
ImmutableList.of().toArray();
ImmutableList.of().toArray(new Object[0]);
}
}
$ /tmp/jdk1.7.0_40/bin/javac -cp $HOME/guava-15.0.jar Foo.java &&
/tmp/jdk1.7.0_40/bin/java -cp .:$HOME/guava-15.0.jar Foo
<success>
Original comment by cpov...@google.com
on 20 Sep 2013 at 1:41
Hmm, yes, there are definitely two versions of Guava on the classpath. You can
tell because EmptyImmutableList doesn't exist in Guava 15.
Original comment by cpov...@google.com
on 20 Sep 2013 at 1:45
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<issue id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:12
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:08
Original issue reported on code.google.com by
sspirido...@gmail.com
on 20 Sep 2013 at 9:58