[foreign] RFR 8218153: Read/Write of Value layout should honor declared endianness
Henry Jen
henry.jen at oracle.com
Fri Mar 1 02:54:42 UTC 2019
On Feb 28, 2019, at 6:00 PM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
>
>
> On 01/03/2019 01:31, Henry Jen wrote:
>> A-ha, I was expecting withEndianness will make all components within a layout with any element that is no-endianness to be replaced.
>>
>> That means this example should work as well. So I considered this a bug and just did a jshell test to verify it.
>
> No, withEndianness should NOT affect the addresee part of an address layout.
>
> This was deliberate, and discussed here:
>
> https://mail.openjdk.java.net/pipermail/panama-dev/2019-February/004147.html
>
> (near the end)
>
Yes, that I aware. And now I understand that we consider withEndianness() API as the byte swap operator, this is correct behavior.
I was considering withEndianness() simply a method to convert any non-specified endian elements into specified endianness.
Cheers,
Henry
More information about the panama-dev
mailing list