Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YassonParser does not implement JsonParser.currentEvent() #611

Open
nibsi opened this issue Aug 17, 2023 · 0 comments
Open

YassonParser does not implement JsonParser.currentEvent() #611

nibsi opened this issue Aug 17, 2023 · 0 comments
Labels
bug Something isn't working right

Comments

@nibsi
Copy link

nibsi commented Aug 17, 2023

Describe the bug
Version 2.1 of the Jakarta JSON Processing API added the method currentEvent() to the JsonParser interface. This method has a default implementation that throws UnsupportedOperationException.

Yasson implements JSON-P 2.1, but it does not override the default implementation for JsonParser.currentEvent().

This is likely an oversight. It's easy to miss new methods in interfaces when they have a default implementation.

To Reproduce

  • Initialize a YassonParser parser.
  • Call parser.next()
  • Call parser.currentEvent()
  • Observe that UnsupportedOperationException is thrown.

Expected behavior

  • parser.currentEvent() returns the last event returned by parser.next().
@nibsi nibsi added the bug Something isn't working right label Aug 17, 2023
api-from-the-ion added a commit to api-from-the-ion/yasson that referenced this issue Nov 13, 2023
Signed-off-by: Anton Pinsky <anton.pinsky@ionos.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right
Projects
None yet
Development

No branches or pull requests

1 participant