Commit d0faf19
committed
Allow calls to
The documentation if anything implies that a null array is _not_
allowed. But it is, since the method delegates straight to
`Arrays.hashCode`, which accepts `null` (and even documents as much).
The JDK would be within its rights to change that in the future, but I
can't imagine they would risk the compatibility problems it would cause.
I do grant that it's somewhat unlikely that callers would pass a null
array. The reason that I care is that I'm looking at making Guava's
ancient
[`Objects.hashCode`](https://github.com/google/guava/blob/990557ca1295e068e7a83a0ee4556ccbca2bc240/guava/src/com/google/common/base/Objects.java#L76)
call Java's `Objects.hash`-leading to a nullness error with the current
JDK stubs.Objects.hash with a null varargs array.1 parent e717210 commit d0faf19
File tree
1 file changed
+1
-1
lines changed1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
0 commit comments