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

NPE in DefaultHardAndSoftScore.compareTo()

XMLWordPrintable

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

      When running a benchmark on a very slow machine (virtual machine), hard and soft part of the score might remain uninitialized for long time (might be related to JBRULES-3413). This discovered an issue in the compareTo() method.

      Caused by: java.lang.NullPointerException
      at org.drools.planner.core.score.buildin.hardandsoft.DefaultHardAndSoftScore.compareTo(DefaultHardAndSoftScore.java:125)
      at org.drools.planner.core.score.buildin.hardandsoft.DefaultHardAndSoftScore.compareTo(DefaultHardAndSoftScore.java:27)
      at org.drools.planner.benchmark.core.ProblemBenchmark.determineWinningResult(ProblemBenchmark.java:180)
      at org.drools.planner.benchmark.core.ProblemBenchmark.benchmarkingEnded(ProblemBenchmark.java:173)
      at org.drools.planner.benchmark.core.DefaultPlannerBenchmark.benchmarkingEnded(DefaultPlannerBenchmark.java:201)
      at org.drools.planner.benchmark.core.DefaultPlannerBenchmark.benchmark(DefaultPlannerBenchmark.java:135)
      at org.drools.planner.examples.tournaments.Benchmark.main(Benchmark.java:25)
      ... 6 more

              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              mvecera Martin Vecera (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: