From: Andrew Haley <aph@redhat.com>
To: java-patches@gcc.gnu.org
Subject: Patch: throw NoClassDefFoundError for missing array type
Date: Wed, 03 May 2006 17:05:00 -0000 [thread overview]
Message-ID: <17496.58086.288407.94335@zapata.pink> (raw)
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);
reply other threads:[~2006-05-03 17:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17496.58086.288407.94335@zapata.pink \
--to=aph@redhat.com \
--cc=java-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).