[foreign] RFR: Fix UndefinedLayoutException exception message
Jorn Vernee
jbvernee at xs4all.nl
Mon Jan 28 14:52:33 UTC 2019
Ok, it took a while to find a good test case. I was seeing the exception
due to a cross-header layout reference, so that's also the test case I
added. It seems that that is currently the only realistic use-case where
this exception is being thrown. I believe not being able to resolve
cross-header layout references is a known issue as well?
Updated webrev:
http://cr.openjdk.java.net/~jvernee/panama/webrevs/fixmessage/webrev.01/
Jorn
Jorn Vernee schreef op 2019-01-28 14:16:
> Yes, I will do that. (wasn't sure if it was useful enough).
>
> Jorn
>
> Sundararajan Athijegannathan schreef op 2019-01-28 14:12:
>> Is it possible to add a test with invalid (unresolvable) name
>> reference in a layout descriptor and check the exception message?
>>
>> -Sundar
>>
>> On 28/01/19, 6:36 PM, Jorn Vernee wrote:
>>> Hi,
>>>
>>> JDK-8217245 changed the syntax for Unresolved layouts from `$(Name)`
>>> to `${Name}`. This also means Unresolved now has a dedicated
>>> `layoutExpression` field instead of relying on the name annotation.
>>>
>>> LayoutResolver.UndefinedLayoutException is still using the name
>>> annotation in the exception message, which is now incorrect. This
>>> small patch fixes that, and changes it to use
>>> Unresolved::layoutExpression().
>>>
>>> Please review.
>>>
>>> Webrev:
>>> http://cr.openjdk.java.net/~jvernee/panama/webrevs/fixmessage/webrev.00/
>>>
>>> Cheers,
>>> Jorn
More information about the panama-dev
mailing list