Details
-
Task
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
Guava is used in a variety of places that can be simplified especially with Java streams.
- Preconditions -> Objects
- Strings.isNullOrEmpty -> Simple helper method on StrUtils
- Maps/ImmutableMap -> Java Map
- Lists/ImmutableList -> Java List
- Sets/ImmutableSet/ImmutableSortedSet -> Java Set
- Collections2/Iterables/Iterators/ObjectArrays -> Java Stream
- Guava cache -> Caffeine cache
This ends up removing the Guava dependency from 4 build.gradle files:
- modules/analytics
- modules/sql
- modules/gcs-repository - test
- solrj - test
Second pass cleans up
- com.google.common.base.Throwables
- com.google.common.collect.ImmutableMap
- com.google.common.collect.**
- com.google.common.io.** (and consequently org.apache.commons.io.IOUtils#toString(java.io.Reader) since its the same usage)
This ends up removing Guava dependency from
- test-framework
- solrj-zookeeper - test