简体   繁体   中英

Google Collections sources don't compile

I just downloaded the Google Collections sources and imported them into a new Eclipse project with JDK 1.6.

They don't compile for a couple of reasons:

  • javax.annotation.Nullable can not be found
  • javax.annotation.ParametersAreNonnullByDefault can not be found
  • Cannot reduce the visibility of the inherited method #createCollection() from AbstractMultimap
  • + 11 similar ones
  • Name clash: The method forcePut(K, V) of type AbstractBiMap has the same erasure as forcePut(Object, Object) of type BiMap but does not override it
  • + 2 similar ones
What am I missing?

I also wonder if unit tests for these collections are available to the public.

Seems like you're missing JSR-305 as dependency. Try adding it to the classpath.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM