fix: Handle null planning values in ValueTabuAcceptor#2200
Open
paoloantinori wants to merge 1 commit intoTimefoldAI:mainfrom
Open
fix: Handle null planning values in ValueTabuAcceptor#2200paoloantinori wants to merge 1 commit intoTimefoldAI:mainfrom
paoloantinori wants to merge 1 commit intoTimefoldAI:mainfrom
Conversation
ValueTabuAcceptor threw NullPointerException when processing moves with nullable planning variables that contain null values. The null values represent "unassigned" state and cannot be tracked in the tabu deque. Root cause: AbstractTabuAcceptor.adjustTabuList() tried to add null elements directly to ArrayDeque, which throws NullPointerException. Fix: Skip null values in adjustTabuList() before adding to the tabu tracking structures. Null planning values are semantically "unassigned" and tracking them as tabu has no meaningful purpose. Added test: nullablePlanningValue() verifies the fix and ensures null values are skipped while non-null values are correctly tracked. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2199
Summary
ValueTabuAcceptor throws
NullPointerExceptionwhen processing moves with nullable planning variables that contain null values. The null values represent "unassigned" state and cannot be tracked in the tabu deque.Root Cause
AbstractTabuAcceptor.adjustTabuList()tried to add null elements directly toArrayDeque, which throwsNullPointerException.Fix
Skip null values in
adjustTabuList()before adding to tabu tracking structures. Null planning values represent "unassigned" state and tracking them as tabu has no meaningful purpose.Test
Added
nullablePlanningValue()test inValueTabuAcceptorTestwhich verifies: