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

Stepan Mishura updated HARMONY-91:
----------------------------------

    Attachment: fixHarmony91.txt

The patch contains a fix and a minimized test case: all serialization tests 
from security2 passed.
Also I removed 2 tests from Harmony exclude list and, if Tim don't mind (I 
don't smoke at all :-)), I added CLASSPATH onto the bootclasspath for luni 
-need bcprov there to run the test. 

> Serialization: fails to deserialize stream in case of added class to hierarchy
> ------------------------------------------------------------------------------
>
>          Key: HARMONY-91
>          URL: http://issues.apache.org/jira/browse/HARMONY-91
>      Project: Harmony
>         Type: Bug
>   Components: Classlib
>     Reporter: Stepan Mishura
>     Priority: Minor
>  Attachments: fixHarmony91.txt
>
> According to the serialization spec. adding classes is compatible change and 
> shouldn't affect serialization. The current implementation of 
> java.io.ObjectInputStream class fails to deserialize stream (reconstitute an 
> object) in this case. Particularly, it fails when super class for added class 
> contains serialized fields.
> The following tests from security2 fail because of this bug:
> 1) 
> javax/security/auth/login/serialization/SerAccountExpiredExceptionTest.java 
> (added javax.security.auth.login.AccountException in Java Spec 5.0 as super 
> class)   
> 2) 
> javax/security/auth/login/serialization/SerCredentialExpiredExceptionTest.java
>  (added javax.security.auth.login.CredentialException in Java Spec 5.0 as 
> super class)   
> I've create serial form by hands to provide minimized test case with dynamic 
> generation of required serialization byte array (i.e. serialization form now 
> is immune for test class rename) but it is still quite long. So I'll add a 
> test case to reproduce the failure as a patch for this JIRA bug.

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

Reply via email to