harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r433936 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src: main/java/java/io/ObjectInputStream.java test/java/org/apache/harmony/luni/tests/java/io/ObjectInputStreamTest.java
Date Wed, 23 Aug 2006 06:32:21 GMT
Author: pyang
Date: Tue Aug 22 23:32:20 2006
New Revision: 433936

URL: http://svn.apache.org/viewvc?rev=433936&view=rev
Log:
Patch applied for HARMONY-1256 ([classlib][io] ObjectInputStream.readClassDescriptor() throws
NotActiveException while RI throws NPE)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/io/ObjectInputStreamTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java?rev=433936&r1=433935&r2=433936&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
Tue Aug 22 23:32:20 2006
@@ -1710,9 +1710,6 @@
      */
     protected ObjectStreamClass readClassDescriptor() throws IOException,
             ClassNotFoundException {
-        if (descriptorHandle == null) {
-            throw new NotActiveException();
-        }
 
         ObjectStreamClass newClassDesc = new ObjectStreamClass();
         newClassDesc.setName(input.readUTF());

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/io/ObjectInputStreamTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/io/ObjectInputStreamTest.java?rev=433936&r1=433935&r2=433936&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/io/ObjectInputStreamTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/io/ObjectInputStreamTest.java
Tue Aug 22 23:32:20 2006
@@ -90,6 +90,27 @@
 	    	list.add(this);
 	    }
 	} 	
+    
+    class OIS extends ObjectInputStream {
+        
+        OIS () throws IOException {
+            super();
+         }
+        
+        void test() throws ClassNotFoundException,IOException {
+            readClassDescriptor();
+        }
+        
+    }
+    
+    public void test_readClassDescriptor() throws ClassNotFoundException,IOException {
+        try {
+            new OIS().test();
+        } catch (NullPointerException e) {
+            // expected
+        }
+    }
+    
 }
 
 



Mime
View raw message