On Wed, 2 Sep 2026 10:43:14 GMT, Viktor Klang <[email protected]> wrote:

>> Naoto Sato has updated the pull request incrementally with two additional 
>> commits since the last revision:
>> 
>>  - Merge remote-tracking branch 'jdk-sandbox/json' into 
>> JDK-8381976-Implementation-for-Simple-JSON-API
>>  - Use SequencedMap type for the member field
>
> src/jdk.incubator.json/share/classes/jdk/incubator/json/impl/JsonValueSupport.java
>  line 45:
> 
>> 43:      * if it was parsed. Otherwise, return -1.
>> 44:      */
>> 45:     int offset();
> 
> I might be wrong, but looking at the PR it seems like these are only used for 
> error messages / debug information. I suspect that it would be cleaner to 
> instead of "exposing the internals" here (i.e. returning a mutable array, and 
> separating offset etc) to replace these two methods with a "String 
> toErrorString()" or a "void renderError(StringBuilder sb)". Another option is 
> "CharSequence origin()".

Yes, that is correct. The interface is used solely to provide error 
information. I plan to refactor this in some form after the initial integration.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/32282#discussion_r3916354738

Reply via email to