[lworld] RFR: 8377162: [lworld] getResourceAsStream() doesn't work in preview mode for exploded images [v2]

David Beaumont duke at openjdk.org
Thu Feb 19 11:34:19 UTC 2026


On Wed, 18 Feb 2026 18:24:57 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> David Beaumont has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
>> 
>>  - Merge branch 'lworld' into jdk_8377162_exploded_modules/squashed
>>  - revert unnecessary filter in ModulePatcher
>>  - Latest version
>>  - Limit awareness of preview resources to system modules only.
>>    
>>    * limit preview handling
>>    * Patch ModuleReaderTest from mainline
>>  - Preview mode for exploded system module readers
>>    
>>    * with better flag plumbing
>>    * Simpler approach with linked hash set
>>    * Revert weird import change
>>    * First cut at a preview aware module reader for exploded builds
>>    * Test for partiy of JRT file-system and class resources in preview mode
>
> test/jdk/java/lang/module/ModuleReader/ModuleReaderTest.java line 269:
> 
>> 267:     }
>> 268: 
>> 269:     private static String assertUtf8Resource(ModuleReader reader, String name) throws IOException {
> 
> This method is very confusing. Maybe replace it with two method. One to test the ModuleReader methods, the other to return the contents of the the resource as a String.

I'll try. The method currently cross checks that the bytes read from the input stream of `open()` are the same as the bytes read by `read()`, which makes splitting the string extraction a little more subtle.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/2032#discussion_r2827278548


More information about the valhalla-dev mailing list