[classlib][io] ObjectInputStream.readClassDescriptor() throws NotActiveException while RI throws
NPE
----------------------------------------------------------------------------------------------------
Key: HARMONY-1256
URL: http://issues.apache.org/jira/browse/HARMONY-1256
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Denis Kishenko
Harmony implementation of ObjectInputStream.readClassDescriptor() throws NotActiveException
while RI throws NPE.
Spec mentions neither NPE nor NotActiveException for this method. According spec methods defaultReadObject,
readFields and registerValidation can throw NotActiveException, but readClassDescriptor doesn't.
================ Test ==================
import java.io.IOException;
import java.io.ObjectStreamClass;
import java.io.ObjectInputStream;
public class bug9408 {
public static void main(String args[]) throws Exception {
new OIS().testt();
}
}
class OIS extends ObjectInputStream {
OIS () throws IOException {
super();
}
void testt() throws ClassNotFoundException,IOException {
readClassDescriptor();
}
}
============== Output =======================
RI
java.lang.NullPointerException
at java.io.ObjectInputStream.readUTF()Ljava.lang.String;(Unknown Source)
at java.io.ObjectStreamClass.readNonProxy(Ljava.io.ObjectInputStream;)V(Unknown Source)
at java.io.ObjectInputStream.readClassDescriptor()Ljava.io.ObjectStreamClass;(Unknown
Source)
at OIS.testt(bug9408.java:19)
at bug9408.main(bug9408.java:8)
Harmony
java.io.NotActiveException
at java.io.ObjectInputStream.readClassDescriptor(ObjectInputStream.java:1714)
at OIS.testt(bug9408.java:19)
at bug9408.main(bug9408.java:8)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|