bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/23026] ObjectInputStream can't deserialize arrays from a


From: audriusa at bluewin dot ch
Subject: [Bug classpath/23026] ObjectInputStream can't deserialize arrays from a Sun stream
Date: 2 Mar 2006 22:38:50 -0000


------- Comment #7 from audriusa at bluewin dot ch  2006-03-02 22:38 -------
If I write with Sun's jre 1.5:

        FileOutputStream f = new FileOutputStream("array.dat");
        ObjectOutputStream oou = new ObjectOutputStream(f);
        oou.writeObject(new String[] {"s1","s2","s3"});

then I read the written content with Classpath 0.21 CVS version:

        FileInputStream f = new FileInputStream("array.dat");
        ObjectInputStream oou = new ObjectInputStream(f);
        String[] array = (String[]) oou.readObject();
        for (int i = 0; i < array.length; i++)
          {
            System.out.println(array[i]);  
          }
prints that is expected.

I also tried arrays of primite types, this also works without problems. I think
the bug is fixed now and should be closed.


-- 

audriusa at bluewin dot ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WORKSFORME


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23026





reply via email to

[Prev in Thread] Current Thread [Next in Thread]