harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Wu (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-3881) [classlib][sql] deserialization of javax.sql.ConnectionEvent is incompatible with RI
Date Tue, 19 Jun 2007 01:24:26 GMT

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

Tony Wu resolved HARMONY-3881.
------------------------------

    Resolution: Fixed

Patch applied at r548543 , please verify. Thanks.

> [classlib][sql] deserialization of javax.sql.ConnectionEvent is incompatible with RI
> ------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3881
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3881
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ruth Cao
>            Assignee: Tony Wu
>         Attachments: Harmony-3881.zip
>
>
> Harmony cannot read RI's serialization file of ConnectionEvent, thus the following test
case fails:
> public void testSerializationCompatibility() throws Exception {
>     	Impl_PooledConnection ipc = new Impl_PooledConnection();
>     	SQLException nextSQLException = new SQLException("nextReason",
>                 "nextSQLState", 33);
>         int vendorCode = 10;
>         SQLException sqlException = new SQLException("reason", "SQLState", vendorCode);
>         sqlException.setNextException(nextSQLException);
>         
>         ConnectionEvent ce = new ConnectionEvent(ipc, sqlException);
>         
>         SerializationTest.verifyGolden(this, ce, CONNECTIONEVENT_COMPARATOR);
>     }
>     
>     private static final SerializableAssert CONNECTIONEVENT_COMPARATOR = new SerializableAssert()
{
> 		public void assertDeserialized(Serializable initial, Serializable deserialized) {
> 			ConnectionEvent ceInitial = (ConnectionEvent) initial; 
> 			ConnectionEvent ceDeser = (ConnectionEvent) deserialized;
> 			
> 			SQLException initThr = ceInitial.getSQLException();
>                         SQLException dserThr = ceDeser.getSQLException();
>                        // verify SQLState
>                        assertEquals(initThr.getSQLState(), dserThr.getSQLState());
>                      // verify vendorCode
>                      assertEquals(initThr.getErrorCode(), dserThr.getErrorCode());
>                    // verify next
>                   if (initThr.getNextException() == null) {
>                          assertNull(dserThr.getNextException());
>                   }   
>         }
>     };

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