-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
Affects Version/s: None
-
Component/s: tools
-
b24
The code in: src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java
attempts to read the offsets buffer in order to iterate location entries.
It does this via:
------
int[] attributeOffsets = new int[offsets.capacity()];
offsets.get(attributeOffsets);
------
However, the `get()` method in `IntBuffer` does a builk read of the data and adjusts the internal position. This means it's impossible to call the method twice on the same reader instance (and especially the singleton system instance).
This can fairly trivially be fixed to just iterate the offsets directly without the buffer copy.
attempts to read the offsets buffer in order to iterate location entries.
It does this via:
------
int[] attributeOffsets = new int[offsets.capacity()];
offsets.get(attributeOffsets);
------
However, the `get()` method in `IntBuffer` does a builk read of the data and adjusts the internal position. This means it's impossible to call the method twice on the same reader instance (and especially the singleton system instance).
This can fairly trivially be fixed to just iterate the offsets directly without the buffer copy.
- clones
-
JDK-8371645 BasicImageReader getEntryNames() is stateful and cannot be called more than once
-
- Resolved
-
- links to
-
Commit(lworld)
openjdk/valhalla/58d748ef
-
Review(lworld)
openjdk/valhalla/1736