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

Examples: get rid of solutionsEquals() and solutionsHashCode()

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Minor Minor
    • 7.32.0.Final
    • None
    • None
    • None
    • 2019 Week 50-52 (from Dec 9)
    • 3
    • NEW
    • NEW

      TravelingTournament.java for one uses it.

      On Match.java

      /**

      • The normal methods {@link #equals(Object)}

        and

        {@link #hashCode()}

        cannot be used

      • because the rule engine already requires them (for performance in their original state).
      • @see #solutionHashCode()
        */
        public boolean solutionEquals(Object o) {

      Ok, that didn't age well... (the code was written in 2007 or even 2006, because it's part of the first commit that came from SourceForge)
      That javadocs is probably not true any more. Drools doesn't use Java equality since Drools 4 or so. Mario can confirm.

            lpetrovi@redhat.com Lukáš Petrovický (Inactive)
            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: