Skip to content

Fix AddKeyValue logging parser errors for trailing dot in keyPath#7327

Merged
timtebeek merged 2 commits intomainfrom
tim/fix-jakarta-javaee-recipes
Apr 9, 2026
Merged

Fix AddKeyValue logging parser errors for trailing dot in keyPath#7327
timtebeek merged 2 commits intomainfrom
tim/fix-jakarta-javaee-recipes

Conversation

@timtebeek
Copy link
Copy Markdown
Member

@timtebeek timtebeek commented Apr 9, 2026

Summary

  • Normalize trailing dot in JsonPathMatcher constructor so $. is treated as $, preventing ANTLR from printing a spurious parse error to stderr
  • Fix @Option example in AddKeyValue that showed '$.' as valid syntax
  • Add test reproducing the exact scenario from the issue (keyPath: "$." with a simple JSON object)

)

Normalize trailing dot in JsonPathMatcher constructor so that `$.` is
treated as `$`, preventing ANTLR from printing a parse error to stderr.
@timtebeek timtebeek merged commit d9459d0 into main Apr 9, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Apr 9, 2026
@timtebeek timtebeek deleted the tim/fix-jakarta-javaee-recipes branch April 9, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

AddKeyValue logging parser errors for valid json files

1 participant