[foreign-memaccess] RFR: 8256466: MemoryLayout factories do not guard against null layouts
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Wed Nov 18 19:11:27 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
-------------
Commit messages:
- Fix whitespaces
- Add missing file
- * Add @throws for all vvarious null pointer exceptions
Changes: https://git.openjdk.java.net/panama-foreign/pull/395/files
Webrev: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=395&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8256466
Stats: 801 lines in 20 files changed: 776 ins; 1 del; 24 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