Skip to content

Support string membership in selectattr and rejectattr - #1333

Open
alloutflo wants to merge 1 commit into
HubSpot:masterfrom
alloutflo:codex/issue-1227-string-membership
Open

Support string membership in selectattr and rejectattr#1333
alloutflo wants to merge 1 commit into
HubSpot:masterfrom
alloutflo:codex/issue-1227-string-membership

Conversation

@alloutflo

Copy link
Copy Markdown

Summary

  • allow CharSequence operands in the in expression test, matching the membership operator's existing behavior and the documented string example
  • add the issue's exact rejectattr expression as a regression test
  • preserve the existing invalid-argument behavior for non-string, non-iterable operands

Fixes #1227.

Testing

  • focused membership, rejectattr, and selectattr tests: 17 passed
  • full mvn verify under JDK 23 with Java release 17 and an explicit en_US test locale: 2,217 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.

selectattr and rejectattr require the third argument to be a collection

1 participant