Skip site navigation (1) Skip section navigation (2)

Re: XADataSource interface

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Chris Smith <cdsmith(at)twu(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: XADataSource interface
Date: 2005-10-30 20:07:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
On Sun, 30 Oct 2005, Chris Smith wrote:

> Heikki Linnakangas wrote:
>> The failures at testRecover and testRollback were because
>> PGXAConnection.rollback method called Xid.equals with null argument.
>> I added a null-check for that, see attached patch.
> I didn't look too closely at the patch... but the API docs for Object.equals 
> say clearly that this shouldn't be a problem.  For any non-null reference x, 
> x.equals(null) should evaluate to false.  I suspect that the correct solution 
> to this problem is to fix the implementation of equals, and not to add a 
> check against null where you did.

True. However, since the object is supplied by the transaction manager 
implementation, which we have no control over, I'd say it's better to 
not make any assumptions about it that we don't have to.

- Heikki

In response to

pgsql-jdbc by date

Next:From: sandrigo.lezcanoDate: 2005-10-31 02:02:49
Subject: OT-Exibir un "byte[] imgBytes" via JSP
Previous:From: Heikki LinnakangasDate: 2005-10-30 19:21:33
Subject: Re: XADataSource interface

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group