prims.cc (_Jv_NewMultiArrayUnchecked): New method.
* prims.cc (_Jv_NewMultiArrayUnchecked): New method. (_Jv_NewMultiArray): Use it. Check each array dimension. (_Jv_NewMultiArray): Likewise. * java/lang/reflect/natMethod.cc (can_widen): Nothing promotes to `char'. * java/lang/reflect/natArray.cc (newInstance): Throw IllegalArgumentException if there are no dimensions. From-SVN: r45951
This commit is contained in:
parent
6cbd1b6f7e
commit
62a040818a
4 changed files with 34 additions and 9 deletions
|
@ -100,8 +100,8 @@ can_widen (jclass from, jclass to)
|
|||
// Boolean arguments may not be widened.
|
||||
if (fromx == BOOLEAN && tox != BOOLEAN)
|
||||
return false;
|
||||
// Special-case short->char conversions.
|
||||
if (fromx == SHORT && tox == CHAR)
|
||||
// Nothing promotes to char.
|
||||
if (tox == CHAR && fromx != CHAR)
|
||||
return false;
|
||||
|
||||
return fromx <= tox;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue