[lworld] RFR: 8362252: [lworld] Possible synchronization issue in jdk/internal/jimage/ImageReader.java

David Beaumont duke at openjdk.org
Fri Jan 16 14:39:43 UTC 2026


On Thu, 18 Dec 2025 21:11:49 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Tidying up syncrhonization around shared image.
>
> src/java.base/share/classes/jdk/internal/jimage/ImageReader.java line 416:
> 
>> 414:                     OPEN_FILES.put(key, sharedReader);
>> 415:                 } else if (sharedReader.getByteOrder() != byteOrder) {
>> 416:                     throw new IOException("\"" + sharedReader.getName() + "\" is not an image file");
> 
> Its pre-existing, but ...
> Testing the byteOrder and then throwing an exception that says it is not an Image file doesn't make sense.

That's a very good point.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1828#discussion_r2698753659


More information about the valhalla-dev mailing list