RFR: 4954405: Data buffers created with an offset are unusable [v2]
Phil Race
prr at openjdk.org
Sun Nov 2 17:31:08 UTC 2025
On Fri, 24 Oct 2025 21:01:35 GMT, Phil Race <prr at openjdk.org> wrote:
>> ByteInterleavedRaster is not including the DataBuffer offset in returns from getDataElements
>> The super-class sets it in the constructor which runs very much like this subclass except it omits this.
>> The parent class of ByteInterleavedRaster is ByteComponentRaster and it uses the DataBuffer offset
>> to adjust dataOffsets values used in all calculations.
>>
>> Instead ByteInterleavedRaster does something a bit different than other classes where it includes it in some instance vars
>> that also have additional offsets that apply for getPixels and getSamples but aren't used in getDataElements.
>>
>> It looks to me as if this is what ByteInterleavedRaster should also do instead.
>> All existing tests pass, and this resolves the specific complaint in the bug report.
>
> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
>
> 4954405
@prsadhuk @jayathirthrao please review
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27782#issuecomment-3478128792
More information about the client-libs-dev
mailing list