Reputation: 4003
Currently com.google.common.cache.Cache.get(Object) is deprecated at Guava 11.0.1 version. But I can't understand what should be used instead of it. JavaDocs are poor and not clear (for me, of course :) ) :
Deprecated. This method has been split out into the LoadingCache interface, and will be removed from Cache in Guava release 12.0. Note that CacheBuilder.build(CacheLoader) now returns a LoadingCache, so this deprecation (migration) can be dealt with by simply changing the type of references to the results of CacheBuilder.build(CacheLoader).
Can you help with this?
Upvotes: 1
Views: 699
Reputation: 28981
It says to use interface LoadingCache
instead of Cache
in your code, the former has the method get
. If you see guava 12, it actually doesn't have the method. Or I've missed your actual question?
Upvotes: 2