Description
Running the following test:
import java.io.*;
import java.io.ObjectOutputStream.PutField;
class Test2 {
public static void main(String[] args) throws Exception
static class OutputObject implements Serializable {
private void writeObject(ObjectOutputStream oos) throws IOException
}
}
on the RI produces:
Exception in thread "main" java.lang.IllegalArgumentException: wrong stream
at java.io.ObjectOutputStream$PutFieldImpl.write(ObjectOutputStream.java:1670)
at Test2$OutputObject.writeObject(Test2.java:14)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:63)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:624)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:973)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1494)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1425)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1183)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:359)
at Test2.main(Test2.java:7)
whereas on Harmony it completes without exception.