+2001-03-08 Tom Tromey <tromey@redhat.com>
+
+ * java/io/ObjectStreamClass.java (setUID): Don't write interface
+ info for array classes.
+ Fixes PR libgcj/1971.
+
2001-03-06 Bryce McKinlay <bryce@albatross.co.nz>
* java/util/TreeSet.java (writeObject): Use a for-loop instead of
| Modifier.INTERFACE | Modifier.PUBLIC);
data_out.writeInt (modifiers);
- Class[] interfaces = cl.getInterfaces ();
- Arrays.sort (interfaces, interfaceComparator);
- for (int i=0; i < interfaces.length; i++)
- data_out.writeUTF (interfaces[i].getName ());
-
+ // Pretend that an array has no interfaces, because when array
+ // serialization was defined (JDK 1.1), arrays didn't have it.
+ if (! cl.isArray ())
+ {
+ Class[] interfaces = cl.getInterfaces ();
+ Arrays.sort (interfaces, interfaceComparator);
+ for (int i=0; i < interfaces.length; i++)
+ data_out.writeUTF (interfaces[i].getName ());
+ }
Field field;
Field[] fields = cl.getDeclaredFields ();