-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P3
-
Affects Version/s: 17, 21, 25, 26, 27
-
Component/s: client-libs
The method does not specify what should happen when out-of-bounds values are passed to the getSampleSize(int) method. Normally, an ArrayIndexOutOfBoundsException should be specified in the method contract. This should be added to the specification for all versions of the method across the different classes.
For example:
int x = new SinglePixelPackedSampleModel(
DataBuffer.TYPE_INT,
30, 20,
new int[]{0x00, 0xFF, 0xFFFF, 0xFFFFFFFF}
).getSampleSize(20);
For example:
int x = new SinglePixelPackedSampleModel(
DataBuffer.TYPE_INT,
30, 20,
new int[]{0x00, 0xFF, 0xFFFF, 0xFFFFFFFF}
).getSampleSize(20);
- links to
-
Review(master)
openjdk/jdk/29457