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

NullPointerException in AbstractTabuAcceptor.adjustTabuList

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • 7.12.0.Final
    • 7.10.0.Final
    • optaplanner-core
    • None
    • NEW
    • NEW

      In tailChainSwapMove, if the targeted planning value doesn’t have a tail chain, the rightEntity is null. The findNewTabu method of EntityTabuAcceptor may return a collection containing a null.

      In this case, on the line 104 of AbstractTabuAcceptor.java, the second argument supplied for adjustTabuList method is a collection containing a null. Because null values cannot be added to ArrayDeque, a NullPointerException is thrown out on line 133.

      Call stack:

      Exception in thread "main" java.lang.NullPointerException
      	at java.util.ArrayDeque.addLast(ArrayDeque.java:249)
      	at java.util.ArrayDeque.add(ArrayDeque.java:423)
      	at org.optaplanner.core.impl.localsearch.decider.acceptor.tabu.AbstractTabuAcceptor.adjustTabuList(AbstractTabuAcceptor.java:133)
      	at org.optaplanner.core.impl.localsearch.decider.acceptor.tabu.AbstractTabuAcceptor.stepEnded(AbstractTabuAcceptor.java:104)
      	at org.optaplanner.core.impl.localsearch.decider.LocalSearchDecider.stepEnded(LocalSearchDecider.java:162)
      	at org.optaplanner.core.impl.localsearch.DefaultLocalSearchPhase.stepEnded(DefaultLocalSearchPhase.java:130)
      	at org.optaplanner.core.impl.localsearch.DefaultLocalSearchPhase.solve(DefaultLocalSearchPhase.java:93)
      	at org.optaplanner.core.impl.solver.AbstractSolver.runPhases(AbstractSolver.java:87)
      	at org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:191)
      	at com.xti.App.main(App.java:256)
      

              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              guangyuanzhu Guangyuan Zhu (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: