mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02: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
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue