RFR: 8361286: Allow enabling of background loading for images loaded from an InputStream [v4]
Kevin Rushforth
kcr at openjdk.org
Fri Oct 10 14:46:24 UTC 2025
On Fri, 22 Aug 2025 10:41:49 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:
>> John Hendrikx has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix typo
>
> Thanks for all the input. I think there are now two ways to proceed:
>
> 1. Leave it as is, including the new `backgroundLoading` variants for `InputStream`, but document clearly for both the old and new constructors when the stream will be closed (ie. only when `backgroundLoading` is `true` we will close the stream).
>
> 2. Don't add these new constructors, but add a more obvious variant with `Supplier<InputStream>`, where the ownership is more clear, with the caller of the supplier owning the stream created.
>
> I get the impression the consensus leans towards option 1. I don't see a direct compelling need for the `Supplier` variant, although I'm happy to provide an implementation if option 2 is favored.
@hjohn In case you missed it, the spec changes for this are almost ready, pending your reply to my feedback about the wording in a few places and the creation of the CSR.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1875#issuecomment-3390549694
More information about the openjfx-dev
mailing list