Skip to content

Commit d166d5d

Browse files
authored
JsonParser needs to have a way to get current event (#303)
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
1 parent 54b2547 commit d166d5d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

api/src/main/java/jakarta/json/stream/JsonParser.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,17 @@ enum Event {
252252
*/
253253
Event next();
254254

255+
/**
256+
* Returns the event for the current parsing state.
257+
*
258+
* @return the event for the current parsing state
259+
*
260+
* @since 2.1
261+
*/
262+
default public Event currentEvent() {
263+
throw new UnsupportedOperationException();
264+
}
265+
255266
/**
256267
* Returns a {@code String} for the name in a name/value pair,
257268
* for a string value or a number value. This method should only be called

0 commit comments

Comments
 (0)