Skip to content

Allow null-returning do expressions with failOnUnknownTokens - #1334

Open
alloutflo wants to merge 1 commit into
HubSpot:masterfrom
alloutflo:codex/issue-1259-do-null-expression
Open

Allow null-returning do expressions with failOnUnknownTokens#1334
alloutflo wants to merge 1 commit into
HubSpot:masterfrom
alloutflo:codex/issue-1259-do-null-expression

Conversation

@alloutflo

Copy link
Copy Markdown

Summary

  • track whether expression evaluation completed a real method invocation
  • allow a null result with failOnUnknownTokens only when the complete expression is a successful method call
  • keep unknown methods and property access after a null-returning call as errors
  • cover both default and eager execution modes

Fixes #1259.

Testing

  • focused FailOnUnknownTokens, DoTag, and eager DoTag tests: 15 passed
  • full mvn verify under JDK 23 with Java release 17 and an explicit en_US test locale: 2,220 tests passed, 23 skipped
  • Spotless, Checkstyle, SpotBugs, and PMD passed

AI assistance disclosure

OpenAI Codex was used to analyze, implement, and test this change. The diff and checks listed above were verified in the contribution workspace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot evaluate null-returning expression in DoTag when failOnUnknownTokens is enabled

1 participant