This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Getting ArrayStoreException: Cannot store (valid inner subclass) in array of type (parent class)
- From: Tom Tromey <tromey at redhat dot com>
- To: "Scott Gilbertson" <scottg at mantatest dot com>
- Cc: <java at gcc dot gnu dot org>
- Date: 30 Apr 2003 12:27:26 -0600
- Subject: Re: Getting ArrayStoreException: Cannot store (valid inner subclass) in array of type (parent class)
- References: <00db01c30f2d$0bb91610$3c16a8c0@mantatest.com>
- Reply-to: tromey at redhat dot com
>>>>> "Scott" == Scott Gilbertson <scottg@mantatest.com> writes:
Scott> In my application, manta.mts5000.application.SoftkeyMenu.EntryCell is a
Scott> valid subclass of manta.mts5000.widgets.EntryField
Scott> The exception:
Scott> java.lang.ArrayStoreException: Cannot store
Scott> [Lmanta.mts5000.application.SoftkeyMenu$EntryCell;
Scott> in array of type
Scott> [Lmanta.mts5000.widgets.EntryField;
Scott> at _Jv_CheckArrayStore
Scott> ...
Scott> Does anyone know why this might be happening?
It's just a bug in libgcj :-(. You can reproduce it with the
appended. How odd that we've never run across this before.
_Jv_CheckArrayStore needs to be taught about multi-dimensional arrays.
Tom
class a
{
}
class b extends a
{
}
public class ar
{
public static void main(String[] args)
{
a[][] x1 = new a[3][3];
b[] x2 = new b[5];
x1[0] = x2;
}
}