* Patch: throw NoClassDefFoundError for missing array type
@ 2006-05-03 17:05 Andrew Haley
0 siblings, 0 replies; only message in thread
From: Andrew Haley @ 2006-05-03 17:05 UTC (permalink / raw)
To: java-patches
For some reason we throw the correct error when a single-dimension
array type is missing, but not a multi-dimension array type.
Andrew.
2006-05-03 Andrew Haley <aph@redhat.com>
* prims.cc (_Jv_NewMultiArray): Throw NoClassDefFoundError if
array_type is phantom.
Index: libjava/prims.cc
===================================================================
--- libjava/prims.cc (revision 113252)
+++ libjava/prims.cc (working copy)
@@ -762,6 +762,11 @@
jobject
_Jv_NewMultiArray (jclass array_type, jint dimensions, ...)
{
+ // Creating an array of an unresolved type is impossible. So we throw
+ // the NoClassDefFoundError.
+ if (_Jv_IsPhantomClass(array_type))
+ throw new java::lang::NoClassDefFoundError(array_type->getName());
+
va_list args;
jint sizes[dimensions];
va_start (args, dimensions);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-05-03 17:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-03 17:05 Patch: throw NoClassDefFoundError for missing array type Andrew Haley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).