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

Maurizio Cimadamore mcimadamore at openjdk.java.net
Wed Nov 18 21:08:28 UTC 2020


> 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

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

Changes:
  - all: https://git.openjdk.java.net/panama-foreign/pull/395/files
  - new: https://git.openjdk.java.net/panama-foreign/pull/395/files/f14599c7..ede50c37

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=395&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=395&range=00-01

  Stats: 36 lines in 2 files changed: 31 ins; 0 del; 5 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/395.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/395/head:pull/395

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


More information about the panama-dev mailing list