This is the mail archive of the
java-prs@sources.redhat.com
mailing list for the Java project.
gcj/343: can't cast array to serializable
- To: java-gnats at sourceware dot cygnus dot com
- Subject: gcj/343: can't cast array to serializable
- From: tromey at redhat dot com
- Date: 7 Sep 2000 22:57:02 -0000
- Reply-To: tromey at redhat dot com
- Resent-Cc: java-prs at sourceware dot cygnus dot com, green at cygnus dot com
- Resent-Reply-To: java-gnats@sourceware.cygnus.com, tromey@redhat.com
>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: