mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-28 15:51:02 +00:00
8296935: Arrays.asList() can return a List that throws undocumented ArrayStoreException
Reviewed-by: rriggs, lancea
This commit is contained in:
parent
05af487a2d
commit
da9efee1c2
@ -4186,6 +4186,10 @@ public final class Arrays {
|
||||
* those that would change the size of the returned list. Those methods leave
|
||||
* the list unchanged and throw {@link UnsupportedOperationException}.
|
||||
*
|
||||
* <p>If the specified array's actual component type differs from the type
|
||||
* parameter T, this can result in operations on the returned list throwing an
|
||||
* {@code ArrayStoreException}.
|
||||
*
|
||||
* @apiNote
|
||||
* This method acts as bridge between array-based and collection-based
|
||||
* APIs, in combination with {@link Collection#toArray}.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user