You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Paulex Yang (JIRA)" <ji...@apache.org> on 2006/08/30 14:05:28 UTC

[jira] Closed: (HARMONY-1256) [classlib][io] ObjectInputStream.readClassDescriptor() throws NotActiveException while RI throws NPE

     [ http://issues.apache.org/jira/browse/HARMONY-1256?page=all ]

Paulex Yang closed HARMONY-1256.
--------------------------------


Verified by Denis.

> [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
>         Assigned To: Paulex Yang
>         Attachments: 1256-ObjectInputStream(2).patch, 1256-ObjectInputStream.patch, 1256-ObjectInputStreamTest.patch
>
>
> 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