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

[jira] Updated: (HARMONY-3881) [classlib][sql] deserialization of javax.sql.ConnectionEvent is incompatible with RI

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

Ruth Cao updated HARMONY-3881:
------------------------------

    Attachment: Harmony-3881.zip

May somebody pls try this?

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