0

I'm using guava Multiset library using their maven dependency version 18.0.

I had a following code that used to work fine until a few weeks ago:

ImmutableMultiset<String> entryList = Multisets.copyHighestCountFirst(weightedDocs);

which returns a sorted list of a given multiset. But suddenly my IDE shows that the method doesn't exist, and woudln't compile. I checked their code in github, but the static method seems to be still alive... what would be a problem??

pandagrammer
  • 841
  • 2
  • 12
  • 24

1 Answers1

1

The method Multisets.copyHighestCountFirst(Multiset<E>) appeared in Guava 11.0. I'm quite sure that you have somewhere an older version of Guava (maybe even Google Collections that is used instead of the version 18.0 that you want to use.

So double-check your dependencies and their dependencies. An older version of Guava is present somewhere and is interfering with yours.

Olivier Grégoire
  • 33,839
  • 23
  • 96
  • 137