Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-16713

Replace Guava usages with pure Java

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • main (10.0), 9.3
    • 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

      Attachments

        Activity

          People

            krisden Kevin Risden
            krisden Kevin Risden
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 5h 10m
                5h 10m