harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulex Yang (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-3884) [classlib][jndi] Class PagedResultsResponseControl is not serialization compatible
Date Wed, 23 May 2007 07:04:21 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-3884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Paulex Yang resolved HARMONY-3884.
----------------------------------

    Resolution: Fixed

Kelvin, patch applied at r540863, thanks a lot, please verify.

> [classlib][jndi] Class PagedResultsResponseControl is not serialization compatible
> ----------------------------------------------------------------------------------
>
>                 Key: HARMONY-3884
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3884
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Linux and Windows
>            Reporter: Kelvin Ye
>         Assigned To: Paulex Yang
>         Attachments: harmony-3884.zip
>
>
> Class javax.naming.ldap.PagedResultsResponseControl is not serialization compatible.
Please see the following sample test code.
>     public void testSerializationCompatibility() throws Exception{
>         byte[] b={48,5,2,1,0,4,0};
>         PagedResultsResponseControl object=new PagedResultsResponseControl("test", true,
b);
>         SerializationTest.verifyGolden(this, object, PAGEDRESULTSRESPONSECONTROL_COMPARATOR);
>     }
>     
>     // comparator for PagedResultsResponseControl
>     private static final SerializableAssert PAGEDRESULTSRESPONSECONTROL_COMPARATOR =
new SerializableAssert() {
>         public void assertDeserialized(Serializable initial,
>                 Serializable deserialized) {
>             PagedResultsResponseControl initThr = (PagedResultsResponseControl) initial;
>             PagedResultsResponseControl dserThr = (PagedResultsResponseControl) deserialized;
>             // verify ResultSize
>             int initResultSize = initThr.getResultSize();
>             int dserResultSize = dserThr.getResultSize();
>             assertTrue(initResultSize == dserResultSize);
>             
>             // verify Cookie
>             byte[] initCookie = initThr.getCookie();
>             byte[] dserCookie = dserThr.getCookie();
>             assertTrue(Arrays.equals(initCookie, dserCookie));
>         }
>     };
> Harmony will throw Exceptions, but RI will pass.  (Please find the golden.ser file in
the patch)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message