Skip to content

Include missing paths in mutation errors - #1095

Open
hutiefang76 wants to merge 1 commit into
json-path:masterfrom
hutiefang76:frank/fix-jsonpath1053-mutation-errors-20261125
Open

hutiefang76 wants to merge 1 commit into
json-path:masterfrom
hutiefang76:frank/fix-jsonpath1053-mutation-errors-20261125

Conversation

@hutiefang76

Copy link
Copy Markdown

Mutation methods currently throw an empty PathNotFoundException when evaluation finds no paths. Include the compiled path for set, map, delete, add, and put, using the existing read diagnostic: No results for path: ....

The regression covers all five operations with an unmatched filter and an empty wildcard. Eight additional set controls check suppression return values and document preservation, including AS_PATH_LIST and ALWAYS_RETURN_LIST.

Validation:

  • The same 18 regression cases on unchanged production code: 10 failed on the empty message; all 8 suppression controls passed. With the fix: 18 passed.
  • JDK 17.0.18: ./gradlew --no-daemon clean build check --warning-mode all passed, including both modules and Javadoc. 1,044 tests, 13 skipped, no failures or errors.
  • JDK 21.0.10: the same full build with --rerun-tasks passed: 1,044 tests, 13 skipped, no failures or errors.

AI-assisted implementation and review; the reported regression and full builds were executed locally.

Fixes #1053.

This branch has not been deployed

No deployments
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.

Why don't methods in JsonPath throw PathNotFoundException with the not-found path in the message?

1 participant