This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Getting ArrayStoreException: Cannot store (valid inner subclass) in array of type (parent class)


In my application, manta.mts5000.application.SoftkeyMenu.EntryCell is a
valid subclass of manta.mts5000.widgets.EntryField, yet in some spots I get
the following exception in the compiled binary.  In other places within the
application, the same code (i.e. storing an EntryCell in an EntryField
array) works fine.  In the JVM, or interpreted with gcj, it works fine.
Note that EntryCell is an inner class - I've tried making it "static", with
no change.  The EntryField array is two-dimensional, in case that matters.

The exception:
java.lang.ArrayStoreException: Cannot store
[Lmanta.mts5000.application.SoftkeyMenu$EntryCell;
in array of type
[Lmanta.mts5000.widgets.EntryField;
   at _Jv_CheckArrayStore
...

I'm compiling from the class files.  I've tried both a February snapshot of
the 3.3 branch and yesterday's tip from cvs.  I don't know if the same thing
happens compiling from java source.  I'd had problems in the past which were
solved by compiling from class files, but I could try it again in case the
compiler has improved in that regard.

Does anyone know why this might be happening?



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]