[foreign-memaccess] RFR: 8256466: MemoryLayout factories do not guard against null layouts [v2]

Jorn Vernee jvernee at openjdk.java.net
Wed Nov 18 21:39:16 UTC 2020


On Wed, 18 Nov 2020 21:08:28 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> This is a trivial, but a bit bigger than expected patch which fixes mentions of NPEs in the foreign memory access API javadoc. Almost all API points are affected, from memory layouts, to memory segments, etc.   
>> This patch does a number of things:
>> * Document the various possible NPEs with corresponding `@throws` javadoc tags
>> * Add `Objects::requireNotNull calls` where required
>> * Added tests to check for nulls
>> * Added a brand new test for `MemoryAccess`; this is both to check normal behavior, and also to check behavior when it comes to nulls
>
> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Address review comments

LGTM! Thanks for the thorough testing!

-------------

Marked as reviewed by jvernee (Committer).

PR: https://git.openjdk.java.net/panama-foreign/pull/395


More information about the panama-dev mailing list