RFR: 8372787: ModuleReader should throw IOException consistently when using --patch-module and ModuleReader is closed [v4]
Alan Bateman
alanb at openjdk.org
Mon Dec 1 16:03:31 UTC 2025
On Mon, 1 Dec 2025 12:49:13 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> Can I please get a review of this change which proposes to address the issue noted in https://bugs.openjdk.org/browse/JDK-8372787?
>>
>> The commit in this PR updates several methods in the `jdk.internal.module.ModulePatcher$PatchedModuleReader` to throw an `IOException` if the `ModuleReader` has been closed. This updated implementation now matches the specification of the corresponding methods in `ModuleReader`.
>>
>> A new jtreg test has been introduced to reproduce the issue and verify the fix. CI testing is currently in progress with this change.
>
> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>
> apply review suggestions
test/jdk/java/lang/module/ModuleReader/patched/PatchedModuleReaderTest.java line 61:
> 59: */
> 60: @Test
> 61: void testPatchedResourcePresence() throws Exception {
The exist tests use "found" and "not found" so maybe rename these to testResourceFound and testResourceNotFound.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28569#discussion_r2577685902
More information about the core-libs-dev
mailing list