On Tue, 20 May 2025 17:32:03 GMT, Brian Burkhalter wrote:
>> I see this has been changed to "then some characters, but not all" but it
>> doesn't flow very well. The original sentence, which was copied/modified
>> from InputStream.readAllBytes, is much cleaner and I think I would prefer to
>>
On Mon, 19 May 2025 07:15:00 GMT, Alan Bateman wrote:
>> Thank you Brian, the updated text for this section looks good to me. Once
>> this PR gets integrated, I'll go through the Files.readXXX methods and file
>> an issue to have that text simplified too.
>
> I see this has been changed to "th
On Fri, 16 May 2025 18:37:38 GMT, Brian Burkhalter wrote:
>> src/java.base/share/classes/java/io/Reader.java line 478:
>>
>>> 476: *
>>> 477: * If an I/O error occurs reading from the stream, then it
>>> 478: * may do so after some, but not all, characters have been read.
>>
>>
On Mon, 19 May 2025 06:59:58 GMT, Jaikiran Pai wrote:
>>> I read this sentence a couple of times [...]
>>
>> Please see
>> [a86610d](https://github.com/openjdk/jdk/pull/24728/commits/a86610d06169445a5c4b81a0c60527130a45e045).
>>
>>> I suspect that sentence was motivated from similar existing t
On Fri, 16 May 2025 20:00:53 GMT, Roger Riggs wrote:
>> This API is concerned with the "what" and not so much the "how."
>
> The purpose of Reader and subclasses is to normalize characters in various
> forms (char arrays, byte streams, char buffers, etc) into a coherent stream
> of characters a
On Thu, 15 May 2025 20:34:13 GMT, Brian Burkhalter wrote:
>> @stuart-marks Sorry, didn't want to pull you in here, that's why I said, I
>> am just *paraphrasing*.
>>
>> That is correct, it is a different case, but the *final effect* for the
>> caller is the same: If he needs to now whether a c
On Fri, 16 May 2025 18:21:10 GMT, Brian Burkhalter wrote:
>> src/java.base/share/classes/java/io/Reader.java line 478:
>>
>>> 476: *
>>> 477: * If an I/O error occurs reading from the stream, then it
>>> 478: * may do so after some, but not all, characters have been read.
>>
>>
On Fri, 16 May 2025 07:57:01 GMT, Jaikiran Pai wrote:
> I read this sentence a couple of times [...]
Please see
[a86610d](https://github.com/openjdk/jdk/pull/24728/commits/a86610d06169445a5c4b81a0c60527130a45e045).
> I suspect that sentence was motivated from similar existing text in
> `Files
On Fri, 16 May 2025 18:13:45 GMT, Roger Riggs wrote:
> Is this better?
I think it is clearer.
-
PR Review Comment: https://git.openjdk.org/jdk/pull/24728#discussion_r2093501372
On Wed, 14 May 2025 18:16:22 GMT, Brian Burkhalter wrote:
>> Implement the requested methods and add a test thereof.
>
> Brian Burkhalter has updated the pull request incrementally with one
> additional commit since the last revision:
>
> 8354724: Replace getChars in previous commit with subS
On Wed, 14 May 2025 18:16:22 GMT, Brian Burkhalter wrote:
>> Implement the requested methods and add a test thereof.
>
> Brian Burkhalter has updated the pull request incrementally with one
> additional commit since the last revision:
>
> 8354724: Replace getChars in previous commit with subS
On Thu, 15 May 2025 05:53:44 GMT, Markus KARG wrote:
>> @mkarg Please don't invoke my name to try to buttress your arguments. The
>> calls the Reader.of() instance makes on its backing CharSequence is a
>> different kind of issue from what promises or guarantees the concrete
>> methods of the
On Wed, 14 May 2025 22:19:39 GMT, Stuart Marks wrote:
>> I meant that the implementation of `subSequence` *might or might not*
>> perform copy (so we need to tell the javaDoc reader), while `getChar`
>> *clearly* performs a copy as part of it design. So `subSequence` can be
>> surprising as th
On Wed, 14 May 2025 21:02:20 GMT, Markus KARG wrote:
>> Both `subSequence` and `getChars` are implemented by the CharSequence.
>> They have the same level of trustworthiness about their implementation.
>
> I meant that the implementation of `subSequence` *might or might not* perform
> copy (so w
On Wed, 14 May 2025 20:58:47 GMT, Roger Riggs wrote:
>> BTW, paraphrasing Stuart here: "We want to reduce self-calls". `subSequence`
>> is a self-call, *as we do not know* how it behaves in the actual
>> implementation. For `getChars` we can be sure that it has no overridable
>> side effects.
On Wed, 14 May 2025 20:36:47 GMT, Markus KARG wrote:
>> Actually I am working on exact these optimizations right now and do not like
>> the idea that I have to file another JBS and PR just for a single code line.
>> As `subSequence` typically *does* a copy (to not hold the original full text
>
On Wed, 14 May 2025 20:32:38 GMT, Markus KARG wrote:
>> I have no idea whether `subSequence` is more performant than `getChars` but
>> it seems cleaner. In any case, at this point we are concerned primarily with
>> the APIs getting into JDK 25. We can improve performance after that.
>
> Actuall
On Wed, 14 May 2025 20:14:21 GMT, Brian Burkhalter wrote:
>> I think this may be a good way to reduce redundant allocation if the
>> CharSequence's subsequence is a simple view (frequently the case for user
>> ones) or a String (for StringBuilder, String)
>
> I have no idea whether `subSequence
On Wed, 14 May 2025 20:00:50 GMT, Chen Liang wrote:
>> src/java.base/share/classes/java/io/Reader.java line 206:
>>
>>> 204: ensureOpen();
>>> 205: int len = cs.length();
>>> 206: String result = cs.subSequence(next, len).toString();
>>
>> Are you
On Wed, 14 May 2025 19:44:56 GMT, Markus KARG wrote:
>> Brian Burkhalter has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8354724: Replace getChars in previous commit with subSequence
>
> src/java.base/share/classes/java/io/Reader.java li
On Wed, 14 May 2025 18:16:22 GMT, Brian Burkhalter wrote:
>> Implement the requested methods and add a test thereof.
>
> Brian Burkhalter has updated the pull request incrementally with one
> additional commit since the last revision:
>
> 8354724: Replace getChars in previous commit with subS
> Implement the requested methods and add a test thereof.
Brian Burkhalter has updated the pull request incrementally with one additional
commit since the last revision:
8354724: Replace getChars in previous commit with subSequence
-
Changes:
- all: https://git.openjdk.org/jdk/
22 matches
Mail list logo