harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kelvin Ye (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-3884) [classlib][jndi] Class PagedResultsResponseControl is not serialization compatible
Date Thu, 17 May 2007 07:08:17 GMT
[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

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

View raw message