This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch docs
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/docs by this push:
     new 98038fe012 TODO-135 - HOCON peekNoSkip/skipWhitespaceAndComments 
invariant tightening
98038fe012 is described below

commit 98038fe0121a54e2cbdd3b878a3728ba5257c68d
Author: James Bognar <[email protected]>
AuthorDate: Fri May 29 06:47:44 2026 -0400

    TODO-135 - HOCON peekNoSkip/skipWhitespaceAndComments invariant tightening
---
 pages/release-notes/9.5.0.md | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/pages/release-notes/9.5.0.md b/pages/release-notes/9.5.0.md
index 8c5128f9ff..a0de569d02 100644
--- a/pages/release-notes/9.5.0.md
+++ b/pages/release-notes/9.5.0.md
@@ -400,6 +400,17 @@ land, parser sessions other than `JsonParserSession` / 
`Json5ParserSession` prod
   `MarshalledPropertyPostProcessor`. The thread-context classloader is still 
used as a fallback when
   no session classloader is configured, preserving historical behavior for 
existing callers.
 
+- **`HoconTokenizer` peek/skip invariant hardened** (TODO-135). 
`HoconTokenizer.skipWhitespaceAndComments()`
+  is now a no-op while a token has already been peeked (`peek()` / 
`peekNoSkip()` has cached a token).
+  Once a token is cached the underlying reader sits *after* that token, so 
skipping whitespace would
+  consume characters that semantically follow the cached token — most 
dangerously a newline that is the
+  element separator of an enclosing array/object. 
`HoconParserSession.parseArray` / `parseObject`
+  previously protected against this with targeted peek-before-skip guards; the 
invariant is now centralized
+  in the tokenizer, and those guards have been removed. No behavior change for 
existing inputs (newline-
+  separated nested arrays/objects still stay nested; same-line array/object 
concatenation still works); the
+  change forecloses a class of latent bugs where a future caller of 
`skipWhitespaceAndComments` could
+  silently reintroduce the over-read.
+
 ### juneau-commons
 
 #### `@Value` annotation + `${xxx}` shortcut (TODO-79)

Reply via email to