Re: XADataSource interface

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: XADataSource interface
Дата
Msg-id Pine.OSF.4.61.0510302203590.179385@kosh.hut.fi
обсуждение исходный текст
Ответ на XADataSource interface  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: XADataSource interface
Следующее
От:
Дата:
Сообщение: OT-Exibir un "byte[] imgBytes" via JSP