Actually, it will not NPE if `names` is null and you have selected
equals/hashCode as the name. Might be better to do requiresNonNull() up
front for all the arguments, just to make such analysis simpler:
requireNonNull(methodName);
requireNonNull(type);
requireNonNull(recordClass);
requireNonNull(names);
requireNonNull(getters);
On 8/23/2021 4:04 PM, Brian Goetz wrote:
+1
On 8/23/2021 2:22 PM, Vicente Romero wrote:
Please review this simple PR along with the associated CSR. The PR is
basically adding a line the the specification of method
`java.lang.runtime.ObjectMethods::bootstrap` stating under what
conditions a NPE will be thrown.
TIA
link to the [CSR](https://bugs.openjdk.java.net/browse/JDK-8272852)
-------------
Commit messages:
- 8272347: ObjectMethods::bootstrap should specify NPE if any
argument except lookup is null
Changes: https://git.openjdk.java.net/jdk/pull/5226/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5226&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8272347
Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/5226.diff
Fetch: git fetch https://git.openjdk.java.net/jdk
pull/5226/head:pull/5226
PR: https://git.openjdk.java.net/jdk/pull/5226