This is a list of the imports from Guava that can be found in core Elasticsearch today. Let's check these off as we go and reference the corresponding issues and pull requests. Most of these will be relatively straightforward with the most serious ones being replacing the caching layer. Those will probably require full issues and careful review cycles.
- remove
import com.google.common.annotations.Beta;fe46227 - remove
import com.google.common.base.Charsets;Remove and forbid use of guava Function, Charsets, Collections2 #13533 - remove
import com.google.common.base.Function;Remove and forbid use of guava Function, Charsets, Collections2 #13533 - remove
import com.google.common.base.Joiner;Remove and forbid use of com.google.common.base.Joiner #13572 - remove
import com.google.common.base.Objects;Remove and forbid use of com.google.common.base.Objects #13355 - remove
import com.google.common.base.Preconditions;Remove and forbid use of com.google.common.base.Preconditions #13540 - remove
import com.google.common.base.Predicate;Remove and forbid the use of com.google.common.base.Predicate(s)? #13349 - remove
import com.google.common.base.Predicates;Remove and forbid the use of com.google.common.base.Predicate(s)? #13349 - remove
import com.google.common.base.Strings;a6ffe8f - remove
import com.google.common.base.Throwables;Remove and forbid use of com.google.common.base.Throwables #13409 - remove
import com.google.common.cache.*;Create concurrent cache with flexible eviction policies #13717, Replace Guava cache with simple concurrent LRU cache #13879 - remove
import com.google.common.cache.Cache;Create concurrent cache with flexible eviction policies #13717, Replace Guava cache with simple concurrent LRU cache #13879 - remove
import com.google.common.cache.CacheBuilder;Create concurrent cache with flexible eviction policies #13717, Replace Guava cache with simple concurrent LRU cache #13879 - remove
import com.google.common.cache.CacheLoader;30bd46a - remove
import com.google.common.cache.LoadingCache;30bd46a - remove
import com.google.common.cache.RemovalListener;Create concurrent cache with flexible eviction policies #13717, Replace Guava cache with simple concurrent LRU cache #13879 - remove
import com.google.common.cache.RemovalNotification;Create concurrent cache with flexible eviction policies #13717, Replace Guava cache with simple concurrent LRU cache #13879 - remove
import com.google.common.cache.Weigher;Create concurrent cache with flexible eviction policies #13717, Replace Guava cache with simple concurrent LRU cache #13879 - remove
import com.google.common.collect.*; - remove
import com.google.common.collect.ArrayListMultimap;Replace and ban next batch of Guava classes #13562, 257f3e8 - remove
import com.google.common.collect.Collections2;Remove and forbid use of guava Function, Charsets, Collections2 #13533 - remove
import com.google.common.collect.FluentIterable;Remove and forbid the use of com.google.common.base.Predicate(s)? #13349, 257f3e8 - remove
import com.google.common.collect.HashMultimap;Replace and ban next batch of Guava classes #13562, 257f3e8 - remove
import com.google.common.collect.EvictingQueue;Remove and forbid use of com.google.common.collect.EvictingQueue #13903 - remove
import com.google.common.collect.ImmutableCollection;Remove and forbid use of com.google.common.collect.ImmutableCollection #13909 - remove
import com.google.common.collect.ImmutableList;Remove and forbid use of com.google.common.collect.ImmutableList #13227 - remove
import com.google.common.collect.ImmutableMap.Builder;Remove and ban ImmutableMap #13939 - remove
import com.google.common.collect.ImmutableMap;Remove Map from CodecService #13762, Remove and ban ImmutableMap #13939 - remove
import com.google.common.collect.ImmutableSet;Remove and ban ImmutableMap#entrySet #13724, Removes and bans ImmutableSet #13754 - remove
import com.google.common.collect.ImmutableSortedMap;Remove and forbid use of com.google.common.collect.ImmutableSortedMap #13525 - remove
import com.google.common.collect.ImmutableSortedSet;65353b8 - remove
import com.google.common.collect.Iterators;Remove and forbid use of com.google.common.collect.Iterators #13916 - remove
import com.google.common.collect.ForwardingSet;Forbid ForwardingSet #13720 - remove
import com.google.common.collect.Iterables;Remove and forbid use of com.google.common.collect.Iterables #13559 - remove
import com.google.common.collect.Lists;Remove and forbid use of com.google.common.collect.Lists #13170 - remove
import com.google.common.collect.Maps;Remove and forbid use of com.google.common.collect.Maps #13438 - remove
import com.google.common.collect.Multimap;Replace and ban next batch of Guava classes #13562 - remove
import com.google.common.collect.MultimapBuilder;Replace and ban next batch of Guava classes #13562 - remove
import com.google.common.collect.ObjectArrays;Replace and ban next batch of Guava classes #13562 - remove
import com.google.common.collect.Queues;Remove and forbid use of com.google.common.collect.Queues #13498 - remove
import com.google.common.collect.Sets;Remove and forbid use of com.google.common.collect.Sets #13463 - remove
import com.google.common.collect.UnmodifiableIterator;Replace and ban next batch of Guava classes #13562 - remove
import com.google.common.hash.HashCode;Remove and forbid use of com.google.common.hash.* #13907 - remove
import com.google.common.hash.HashFunction;Remove and forbid use of com.google.common.hash.* #13907 - remove
import com.google.common.hash.Hashing;Remove and forbid use of com.google.common.hash.* #13907 - remove
import com.google.common.io.ByteStreams;Replace and ban next batch of Guava classes #13562 - remove
import com.google.common.io.Files;Replace and ban next batch of Guava classes #13562, 257f3e8 - remove
import com.google.common.io.Resources;Remove and forbid use of com.google.common.io.Resources #13908 - remove
import com.google.common.jimfs.Configuration;remain as test-only dependency - remove
import com.google.common.jimfs.Jimfs;remain as test-only dependency - remove
import com.google.common.math.LongMath;Remove and forbid use of com.google.common.math.LongMath #13575 - remove
import com.google.common.net.InetAddresses;Remove and forbid use of com.google.common.net.InetAddresses #13905 - remove
import com.google.common.primitives.Ints;Remove and forbid use of com.google.common.primitives.Ints #13596 - remove
import com.google.common.primitives.Longs;Replace and ban next batch of Guava classes #13562 - remove
import com.google.common.util.concurrent.AtomicLongMap;Replace and ban next batch of Guava classes #13562 - remove
import com.google.common.util.concurrent.Futures;Remove and forbid use of several com.google.common.util. classes #13524 - remove
import com.google.common.util.concurrent.ListenableFuture;Remove and forbid use of several com.google.common.util. classes #13524 - remove
import com.google.common.util.concurrent.MoreExecutors;Remove and forbid use of several com.google.common.util. classes #13524 - remove
import com.google.common.util.concurrent.SettableFuture;Remove and forbid use of several com.google.common.util. classes #13524 - remove
import com.google.common.util.concurrent.UncheckedExecutionException;Replace and ban next batch of Guava classes #13562 - remove
import static com.google.common.base.Preconditions.*;Remove and forbid use of com.google.common.base.Preconditions #13540 - remove
import static com.google.common.base.Preconditions.checkArgument;Remove and forbid use of com.google.common.base.Preconditions #13540 - remove
import static com.google.common.base.Preconditions.checkNotNull;Remove and forbid use of com.google.common.base.Preconditions#checkNotNull #13493 - remove
import static com.google.common.base.Preconditions.checkState;Remove and forbid use of com.google.common.base.Preconditions #13540 - remove
import static com.google.common.base.Predicates.isNull;Remove and forbid the use of com.google.common.base.Predicate(s)? #13349 - remove
import static com.google.common.collect.Lists.*;Remove and forbid use of com.google.common.collect.Lists #13170 - remove
import static com.google.common.collect.Lists.newArrayList;Remove and forbid use of com.google.common.collect.Lists #13170 - remove
import static com.google.common.collect.Lists.newArrayListWithCapacity;Remove and forbid use of com.google.common.collect.Lists #13170 - remove
import static com.google.common.collect.Maps.filterEntries;Remove and forbid use of com.google.common.collect.Maps #13438 - remove
import static com.google.common.collect.Maps.newHashMap;Remove and forbid use of com.google.common.collect.Maps #13438 - remove
import static com.google.common.collect.Maps.newHashMapWithExpectedSize;Remove and forbid use of com.google.common.collect.Maps #13438 - remove
import static com.google.common.collect.Sets.newHashSet;Remove and forbid use of com.google.common.collect.Sets #13463
Note that jimfs is in an artifact separate from guava, but depends on guava itself; it will remain as a test-only dependency.
The above was generated via:
ack --type java -h "import\s+(static\s+)?com\.google\.common" | sort | uniq | perl -p -e 's/^(.*)/- [ ] remove `$1`/g'