yasson
yasson copied to clipboard
YassonParser does not implement JsonParser.currentEvent()
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
UnsupportedOperationExceptionis thrown.
Expected behavior
parser.currentEvent()returns the last event returned byparser.next().