[foreign] RFR 8218153: Read/Write of Value layout should honor declared endianness

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Wed Feb 27 22:58:03 UTC 2019


Yeah - covering Group (Sequence is a Group) and Value (Address is a 
Value) gives you a lot of cover... but...

Most of the code will work on 'Layout' - and if the root doesn't have 
the API point, clients will suffer.

Actually, it seems to me that the only Layout for which this will be a 
no-op is Unresolved. Everything else will have a non-trivial override, 
as your current implementation of the protected method in Group 
demonstrates.

Maurizio

On 27/02/2019 22:25, Henry Jen wrote:
> OK, if we agreed that certainly can be done. :)
>
> Just that, the method doesn’t make sense for other Layout except Value and Group, so they will be no-op.
>
> Cheers,
> Henry
>
>
>> On Feb 27, 2019, at 2:13 PM, John Rose <john.r.rose at oracle.com> wrote:
>>
>> On Feb 27, 2019, at 11:06 AM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
>>> Henry I think what we were suggesting was to add a new interface method to Layout
>>>
>>> e.g.
>>>
>>> interface Layout
>>>
>>>     Layout withEndianness(Endianness)
>>> }
>>>
>>> and have the subtypes override accordingly. We want this to be usable by clients.
>> Yes please; that's what I was hoping for also.
>>
>>


More information about the panama-dev mailing list