docs(serialize): add note on unchecked exceptions in SerializeReader.iterator and .stream
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
133e1d75f9
commit
21beed944d
|
@ -110,6 +110,8 @@ public abstract class SerializeReader<TEx extends Exception, T extends Serialize
|
|||
* Returns a {@link Stream} of the tokens within the current object or array.
|
||||
* The stream consumes tokens and advances the reader, so it is not possible to iterate over the tokens more than once.
|
||||
* Additionally, iteration may throw {@link RuntimeException}s created with {@link ExceptionWrapper#wrap(Throwable)} around {@link TEx}.
|
||||
* That exception MUST be caught and handled by the caller immediately. Throwing it in a TypeAdapter is NOT allowed.
|
||||
*
|
||||
* @return a stream of the tokens
|
||||
*/
|
||||
public @NotNull Stream<RToken> stream() {
|
||||
|
@ -120,6 +122,8 @@ public abstract class SerializeReader<TEx extends Exception, T extends Serialize
|
|||
* Returns an {@link Iterator} over the tokens within the current object or array.
|
||||
* The iterator consumes tokens and advances the reader, so it is not possible to iterate over the tokens more than once.
|
||||
* Additionally, iteration may throw {@link RuntimeException}s created with {@link ExceptionWrapper#wrap(Throwable)} around {@link TEx}.
|
||||
* That exception MUST be caught and handled by the caller immediately. Throwing it in a TypeAdapter is NOT allowed.
|
||||
*
|
||||
* @return an iterator over the tokens
|
||||
*/
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue