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: Pine.OSF.4.61.0510302203590.179385@kosh.hut.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

Browse pgsql-jdbc by date

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