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

Maurizio Cimadamore mcimadamore at openjdk.java.net
Thu Nov 19 10:22:12 UTC 2020


On Wed, 18 Nov 2020 18:09:32 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

This pull request has now been integrated.

Changeset: b2012d89
Author:    Maurizio Cimadamore <mcimadamore at openjdk.org>
URL:       https://git.openjdk.java.net/panama-foreign/commit/b2012d89
Stats:     832 lines in 20 files changed: 807 ins; 1 del; 24 mod

8256466: MemoryLayout factories do not guard against null layouts

Reviewed-by: jvernee

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

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


More information about the panama-dev mailing list