Problems with Serializable-String[] in 2.96

Tom Tromey tromey@redhat.com
Mon Sep 16 15:33:00 GMT 2002


>>>>> "Pete" == Pete Kelly <ramsfanxxxiv@yahoo.com> writes:

Pete> [root@PetesRedHat java]# gcj --main=example.TestSer -o
Pete> Test TestSer.class
Pete> example/TestSer.java: In class `example.TestSer':
Pete> example/TestSer.java: In method
Pete> `example.TestSer.main(java.lang.String[])':
Pete> example/TestSer.java:9: verification error at PC=52
Pete> example/TestSer.java:9: invalid argument type
Pete> example/TestSer.java:9: expected type
Pete> 'java.io.Serializable' but stack
Pete> contains 'java.lang.String[]'
This is a known bug in the gcj verifier. Eric Blake sent a PR for it
just a few days ago.
The problem is that gcj doesn't correctly notice that an array
implements Cloneable and Serializable. The front end accepts this
code since it has special cases for this.
One workaround for you would be to compile your program from source,
not from .class files.
Tom


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /