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

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

[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

        

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

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1256?page=all ]

Paulex Yang reassigned HARMONY-1256:
------------------------------------

    Assignee: Paulex Yang

> [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

        

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

Posted by "Denis Kishenko (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1256?page=all ]

Denis Kishenko updated HARMONY-1256:
------------------------------------

    Attachment: 1256-ObjectInputStream(2).patch

I removed some comments

> [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
>         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

        

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

Posted by "Denis Kishenko (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1256?page=all ]

Denis Kishenko updated HARMONY-1256:
------------------------------------

    Attachment: 1256-ObjectInputStream.patch

patch+test

> [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
>         Attachments: 1256-ObjectInputStream.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

        

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

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ 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

        

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

Posted by "Denis Kishenko (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1256?page=comments#action_12429924 ] 
            
Denis Kishenko commented on HARMONY-1256:
-----------------------------------------

Verified

> [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

        

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

Posted by "Denis Kishenko (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1256?page=all ]

Denis Kishenko updated HARMONY-1256:
------------------------------------

    Attachment: 1256-ObjectInputStreamTest.patch

> [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
>         Attachments: 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

        

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

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1256?page=all ]

Paulex Yang resolved HARMONY-1256.
----------------------------------

    Resolution: Fixed

Denis, patch applied at revision r433936, thanks a lot for this enhancement, please verify that the problem is fully fixed as you expected.


> [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