On Fri, 28 Aug 2026 13:54:24 GMT, Markus KARG <[email protected]> wrote:

>> InputStreamReader checks for nulls at the "front door", in its constructors 
>> before creating the StreamDecoder. A separate JBS issue to track updating 
>> the ISR constructor to specify these NPEs would be good.
>
> As the PR at hand simply copies the existing problem, I would agree to the 
> opinion that this should *not* get handled in this PR but in a separate JBS 
> issue / Github PR. If that is fine for everybody, I would close this 
> conversation thread here, and create a separate JBS issue for that. OK?

I had another look at the `tryReadAllAsString()` today and as far as I can see, 
this code path doesn't introduce any possibility deferencing a null `Charset` 
(which would then have propagated out of `readAllAsString()`). So yes, it's OK 
to file a separate issue for specifying the `NullPointerException` from 
`InputStreamReader` constructors and for throwing `NullPointerException` from 
relevant `StreamDecoder` constructors when `Charset` is null.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32264#discussion_r3886857596

Reply via email to