On Tue, 18 Aug 2026 06:42:17 GMT, Alan Bateman <[email protected]> wrote:
>> Naoto Sato has updated the pull request with a new target base due to a
>> merge or a rebase. The pull request now contains 741 commits:
>>
>> - Merge remote-tracking branch 'jdk-sandbox/json' into
>> JDK-8381976-Implementation-for-Simple-JSON-API
>> - Clarifications for behavior of JsonString.of
>> - Make Utils.toPath iterative
>> - consolidated append('\\')
>> - in.clone()
>> - Reflecting comments
>> - Tests for non-sealed sub-interfaces
>> - Clean up duplicate member name message on parsing
>> - Ensure that JS created from factory do not produce faulty paths
>> - Minor Javadoc cleanup as pointed out in review
>> - ... and 731 more: https://git.openjdk.org/jdk/compare/f5a59340...5f7263b9
>
> src/jdk.incubator.json/share/classes/jdk/incubator/json/impl/Utils.java line
> 191:
>
>> 189: default -> throw new InternalError();
>> 190: };
>> 191: offset = walkWhitespace(offset - 1);
>
> arrayNode and objectNode insert at beginning. The backtracking is for the
> exception so probably not performance critical. If it does become an issue
> then you could change this so that arrayNode and objectNode return String,
> collect them in a list, and iterate in reverse order to append to the SB.
The code in question only runs when an exception is thrown, so I agree that it
probably won't b performance critical.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/32282#discussion_r3805921101