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

Settings a termination config list will not create the Termination instance

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.4.0.Final
    • None
    • optaplanner-core
    • None

      Setting a sub termination config list using TerminationConfig.setTerminationConfigList(List<TerminationConfig>) will not create the termination when buildTermination is called. The problem is due to an error in TerminationConfig.java:179.

      if (terminationConfigList != null && terminationConfigList.isEmpty()) {
      for (TerminationConfig terminationConfig : terminationConfigList) {
      Termination termination = terminationConfig.buildTermination(scoreDefinition);
      if (termination != null)

      { terminationList.add(termination); }

      }
      }

      The boolean expression terminationConfigList.isEmpty() should become !terminationConfigList.isEmpty().

            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            ikus060 Patrik Dufresne (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: