8219480: j.l.c.ClassDesc::arrayType(int rank) throws IllegalArgumentException if rank = 0
Reviewed-by: mchung, briangoetz
This commit is contained in:
parent
3d6795e0e3
commit
4d368850e1
@ -170,7 +170,7 @@ public interface ClassDesc
|
||||
*
|
||||
* @param rank the rank of the array
|
||||
* @return a {@linkplain ClassDesc} describing the array type
|
||||
* @throws IllegalArgumentException if the rank is less than zero or if the rank of the resulting array type is
|
||||
* @throws IllegalArgumentException if the rank is less than or equal to zero or if the rank of the resulting array type is
|
||||
* greater than 255
|
||||
* @jvms 4.4.1 The CONSTANT_Class_info Structure
|
||||
*/
|
||||
|
@ -176,6 +176,12 @@ public class ClassDescTest extends SymbolicDescTest {
|
||||
} catch (IllegalArgumentException e) {
|
||||
// good
|
||||
}
|
||||
try {
|
||||
cr.arrayType(0);
|
||||
fail("");
|
||||
} catch (IllegalArgumentException e) {
|
||||
// good
|
||||
}
|
||||
}
|
||||
|
||||
public void testArrayClassDesc() throws ReflectiveOperationException {
|
||||
|
Loading…
Reference in New Issue
Block a user