Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-1138

Remove the guava dependency

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 8.0.0.Beta1
    • None
    • optaplanner-core
    • None

      Hello,
      I'm trying to keep my dependencies as minimal as possible. Do you really need guava?

       

      Current usages jun-2020:

      Targets
          Occurrences of 'import com.google.common' in project
      Found Occurrences  (12 usages found)
          Production  (7 usages found)
              optaplanner-core  (6 usages found)
                  org.optaplanner.core.api.score.stream  (1 usage found)
                      ConstraintCollectors.java  (1 usage found)
                          66 import com.google.common.base.Functions;
                  org.optaplanner.core.config.domain  (1 usage found)
                      ReflectionsWorkaroundClasspathHelper.java  (1 usage found)
                          36 import com.google.common.collect.Sets;
                  org.optaplanner.core.impl.domain.solution.descriptor  (1 usage found)
                      SolutionDescriptor.java  (1 usage found)
                          108 import com.google.common.collect.Iterators;
                  org.optaplanner.core.impl.domain.valuerange.buildin.composite  (1 usage found)
                      CompositeCountableValueRange.java  (1 usage found)
                          30 import com.google.common.collect.Iterators;
                  org.optaplanner.core.impl.heuristic.selector.common.decorator  (1 usage found)
                      WeightFactorySelectionSorter.java  (1 usage found)
                          32 import com.google.common.collect.Ordering;
                  org.optaplanner.core.impl.heuristic.selector.move.composite  (1 usage found)
                      UnionMoveSelector.java  (1 usage found)
                          35 import com.google.common.collect.Iterators;
              optaplanner-examples  (1 usage found)
                  org.optaplanner.examples.common.persistence  (1 usage found)
                      AbstractSolutionImporter.java  (1 usage found)
                          26 import com.google.common.math.BigIntegerMath;
          Test  (5 usages found)
              optaplanner-core  (5 usages found)
                  org.optaplanner.core.api.score.stream  (1 usage found)
                      AdvancedGroupByConstraintStreamTest.java  (1 usage found)
                          44 import com.google.common.base.Functions;
                  org.optaplanner.core.api.score.stream.uni  (1 usage found)
                      UniConstraintStreamTest.java  (1 usage found)
                          60 import com.google.common.base.Functions;
                  org.optaplanner.core.impl.heuristic.selector  (2 usages found)
                      SelectorTestUtils.java  (2 usages found)
                          44 import com.google.common.collect.ImmutableListMultimap;
                          45 import com.google.common.collect.ListMultimap;
                  org.optaplanner.core.impl.testdata.util  (1 usage found)
                      KieContainerHelper.java  (1 usage found)
                          34 import com.google.common.io.Resources;
      

      As 8.x is minimal Java 11, we must first replace as much code as possible with Java 11 util methods such as `Objects`, `Collections`, etc Every new java release makes more and more of commons-langs and guava obsolete.

            lpetrovi@redhat.com Lukáš Petrovický (Inactive)
            paranoiabla@gmail.com Petar Tahchiev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: