ObjectOutputStream.java (writeObject): Use component type when writing arrays.
authorWarren Levy <warrenl@cygnus.com>
Wed, 24 May 2000 21:15:51 +0000 (21:15 +0000)
committerWarren Levy <warrenl@gcc.gnu.org>
Wed, 24 May 2000 21:15:51 +0000 (21:15 +0000)
* java/io/ObjectOutputStream.java (writeObject): Use component type
when writing arrays.
Fixed typo.

From-SVN: r34142

libjava/ChangeLog
libjava/java/io/ObjectOutputStream.java

index bd8c7fbd648061f107b132f475d58d842a852df1..165b56d3358e747c4853aaeb051f67b050175f22 100644 (file)
@@ -1,3 +1,9 @@
+2000-05-24  Warren Levy  <warrenl@cygnus.com>
+
+       * java/io/ObjectOutputStream.java (writeObject): Use component type
+       when writing arrays.
+       Fixed typo.
+
 2000-05-20  Bryce McKinlay  <bryce@albatross.co.nz>
 
        Fix for PR libgcj/226:
index a98b55baf191da6ce1e8434ae764ad2af126b5ff..23bcce49d763d9723c398bdd9223fd0ee303ec52 100644 (file)
@@ -1,5 +1,5 @@
 /* ObjectOutputStream.java -- Class used to write serialized objects
-   Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -276,7 +276,7 @@ public class ObjectOutputStream extends OutputStream
          realOutput.writeByte (TC_ARRAY);
          writeObject (osc);
          assignNewHandle (obj);
-         writeArraySizeAndElements (obj, clazz);
+         writeArraySizeAndElements (obj, clazz.getComponentType ());
          break;
        }
 
@@ -395,7 +395,7 @@ public class ObjectOutputStream extends OutputStream
       throw new NotActiveException ("defaultWriteObject called by non-active class and/or object");
 
     if (fieldsAlreadyWritten)
-      throw new IOException ("Only one of putFields and defalutWriteObject may be called, and it may only be called once");
+      throw new IOException ("Only one of putFields and defaultWriteObject may be called, and it may only be called once");
 
     fieldsAlreadyWritten = true;
   }