gcj/343: can't cast array to serializable
tromey@redhat.com
tromey@redhat.com
Thu Sep 7 16:00:00 GMT 2000
>Number: 343
>Category: gcj
>Synopsis: can't cast array to serializable
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apbianco
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Sep 07 16:00:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Tom Tromey
>Release: unknown-1.0
>Organization:
>Environment:
>Description:
Java arrays implement serializable (as of 1.1 or 1.2,
I forget). However, gcj disallows casting an array
to serializable:
import java.io.*;
public class t
{
public static void main (String[] args)
{
System.out.println ((Serializable) args);
}
}
creche. gcj --syntax-only t.java
t.java: In class `t':
t.java: In method `main(java.lang.String[])':
t.java:6: Invalid cast from `java.lang.String[]' to `java.io.Serializable'.
System.out.println ((Serializable) args);
^
1 error
creche. javac t.java
creche.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Java-prs
mailing list