DaveAKing / guava-libraries

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

ImmutableSet missing method with YouTube API #1599

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am using the gdata-java-client version 1.47 found here: 
https://code.google.com/p/gdata-java-client/downloads/list

I was using the google-collections jar(version 1.0) in conjunction with the 
above jar.  I brought in a dependency to my project that used guava version 
14.0.1 and it was causing some conflicts.  I am using maven and I removed the 
dependency to the google-collections jar and I get this run time error:

java.lang.NoSuchMethodError: 
com.google.common.collect.ImmutableSet.of([Ljava/lang/Object;)Lcom/google/common
/collect/ImmutableSet;
    at com.google.gdata.wireformats.AltFormat$Builder.setAcceptableTypes(AltFormat.java:399)
    at com.google.gdata.wireformats.AltFormat$Builder.setAcceptableXmlTypes(AltFormat.java:387)
    at com.google.gdata.wireformats.AltFormat.<clinit>(AltFormat.java:49)
    at com.google.gdata.client.Service.<clinit>(Service.java:558)

Line  399 of AltFormat is acceptableTypes = ImmutableSet.of(types);

I compared the source code of ImmutableSet in google collections and guava and 
noticed the static of method that takes a a variable length argument was 
removed in guava.  I know guava is supposed to be an super set of the older 
google collections but I am running into this issue which may have gone 
unnoticed.  Let me know if you think this is a real issue or have any 
suggestions on how to work around.  Currently I forked the guava git repo and 
made some modifications but hopefully there is a better work around.

Thanks
Frank

Original issue reported on code.google.com by fmann...@gmail.com on 2 Dec 2013 at 4:16

GoogleCodeExporter commented 9 years ago
Some Google Collections utilities have gone through the requisite 18-month 
deprecation period and been deleted.  In any event, nobody should be using 
Google Collections anymore...?

Original comment by lowas...@google.com on 2 Dec 2013 at 4:52

GoogleCodeExporter commented 9 years ago
Yes I removed the google collection dependency from this project and switched 
to guava and was getting the NoSuchMethodException after making the switch.

Original comment by fmann...@gmail.com on 2 Dec 2013 at 6:52

GoogleCodeExporter commented 9 years ago
I see.

It does look like that method went through the 18-month deprecation period and 
has been deleted.  It looks like this ought to be a bug filed against gdata, 
rather than against Guava.

Original comment by lowas...@google.com on 2 Dec 2013 at 7:07

GoogleCodeExporter commented 9 years ago

Original comment by lowas...@google.com on 17 Oct 2014 at 10:32

GoogleCodeExporter commented 9 years ago
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:10

GoogleCodeExporter commented 9 years ago

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