[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: java.io.ObjectOutputStream
From: |
Guilhem Lavaux |
Subject: |
FYI: java.io.ObjectOutputStream |
Date: |
Wed, 31 Dec 2003 11:27:54 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 |
Hi,
here is a small fix concerning java.io.ObjectOutputStream: writeFields()
should only be call once and putFields() has some unused code.
Guilhem.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.1742
diff -u -r1.1742 ChangeLog
--- ChangeLog 31 Dec 2003 08:44:39 -0000 1.1742
+++ ChangeLog 31 Dec 2003 10:25:44 -0000
@@ -1,3 +1,10 @@
+2003-12-31 Guilhem Lavaux <address@hidden>
+
+ * java/io/ObjectOutputStream.java
+ (putFields): Removed redundant code.
+ (writeFields): Check for multiple call to writeFields.
+ (markFieldsWritten): Fixed exception message.
+
2003-12-30 Guilhem Lavaux <address@hidden>
* java/net/URLStreamHandler.java,
Index: java/io/ObjectOutputStream.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/io/ObjectOutputStream.java,v
retrieving revision 1.42
diff -u -r1.42 ObjectOutputStream.java
--- java/io/ObjectOutputStream.java 28 Dec 2003 18:12:43 -0000 1.42
+++ java/io/ObjectOutputStream.java 31 Dec 2003 10:25:45 -0000
@@ -450,7 +450,7 @@
if (fieldsAlreadyWritten)
throw new IOException
- ("Only one of putFields and defaultWriteObject may be called, and it
may only be called once");
+ ("Only one of writeFields and defaultWriteObject may be called, and it
may only be called once");
fieldsAlreadyWritten = true;
}
@@ -876,8 +876,6 @@
if (currentPutField != null)
return currentPutField;
- markFieldsWritten();
-
currentPutField = new PutField()
{
private byte[] prim_field_data
@@ -1029,6 +1027,7 @@
if (currentPutField == null)
throw new NotActiveException("writeFields can only be called after
putFields has been called");
+ markFieldsWritten();
currentPutField.write(this);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: java.io.ObjectOutputStream,
Guilhem Lavaux <=