On Wed, 2 Sep 2026 16:32:31 GMT, Naoto Sato <[email protected]> wrote:

>> 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.

Yeah, this interface used to be used for deriving values a long time ago with 
an older iteration of the implementation. It stuck around and since the 
leftovers are only used for diagnostics now, we can make some improvements.

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

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

Reply via email to