Fix for PR libgcj/2024, plus other class name cleanups:
* include/jvm.h (_Jv_VerifyFieldSignature, _Jv_VerifyMethodSignature, _Jv_VerifyClassName, _Jv_VerifyIdentifier, _Jv_ClassNameSamePackage): Moved from ... * include/java-interp.h: ... here. * defineclass.cc (UTF8_PEEK): No longer conditional on interpreter. (_Jv_VerifyOne): Likewise. (_Jv_VerifyFieldSignature): Likewise. (_Jv_VerifyMethodSignature): Likewise. (is_identifier_start): Likewise. (is_identifier_part): Likewise. (_Jv_VerifyIdentifier): Likewise. (_Jv_VerifyClassName): Likewise. (_Jv_VerifyClassName): Likewise. (_Jv_ClassNameSamePackage): Likewise. (_Jv_VerifyClassName): Fail if class name is too long. * java/lang/natClassLoader.cc (_Jv_NewArrayClass): Disallow array of void. * java/lang/natClass.cc (forName): Check syntax of class name. Include IllegalArgumentException.h. From-SVN: r47334
This commit is contained in:
parent
4bdd26e608
commit
bea31ffbcb
6 changed files with 118 additions and 86 deletions
|
@ -598,7 +598,11 @@ _Jv_NewArrayClass (jclass element, java::lang::ClassLoader *loader,
|
|||
return;
|
||||
|
||||
if (element->isPrimitive())
|
||||
len = 3;
|
||||
{
|
||||
if (element == JvPrimClass (void))
|
||||
throw new java::lang::ClassNotFoundException ();
|
||||
len = 3;
|
||||
}
|
||||
else
|
||||
len = element->name->length + 5;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue