mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8312203: Improve specification of Array.newInstance
Reviewed-by: bpb, mchung
This commit is contained in:
parent
c2f421b8bf
commit
e5ecbff69e
1 changed files with 3 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -49,13 +49,11 @@ class Array {
|
||||||
/**
|
/**
|
||||||
* Creates a new array with the specified component type and
|
* Creates a new array with the specified component type and
|
||||||
* length.
|
* length.
|
||||||
|
* @implSpec
|
||||||
* Invoking this method is equivalent to creating an array
|
* Invoking this method is equivalent to creating an array
|
||||||
* as follows:
|
* as follows:
|
||||||
* <blockquote>
|
* <blockquote>
|
||||||
* <pre>
|
* {@code Array.newInstance(componentType, new int[]{length});}
|
||||||
* int[] x = {length};
|
|
||||||
* Array.newInstance(componentType, x);
|
|
||||||
* </pre>
|
|
||||||
* </blockquote>
|
* </blockquote>
|
||||||
*
|
*
|
||||||
* <p>The number of dimensions of the new array must not
|
* <p>The number of dimensions of the new array must not
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue