You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Kelvin Ye (JIRA)" <ji...@apache.org> on 2007/05/17 09:08:17 UTC

[jira] Updated: (HARMONY-3884) [classlib][jndi] Class PagedResultsResponseControl is not serialization compatible

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

Kelvin Ye updated HARMONY-3884:
-------------------------------

    Attachment: harmony-3884.zip

Please try the patch harmony-3884.zip. Thanks very much!

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