Re: PGXAConnection ConnectionHandler equals bug - Mailing list pgsql-jdbc

From Kevin Grittner
Subject Re: PGXAConnection ConnectionHandler equals bug
Date
Msg-id 4E9C1F73020000250004205D@gw.wicourts.gov
Whole thread Raw
In response to PGXAConnection ConnectionHandler equals bug  (Florent Guillaume <fg@nuxeo.com>)
Responses Re: PGXAConnection ConnectionHandler equals bug
List pgsql-jdbc
Florent Guillaume <fg@nuxeo.com> wrote:

> When you have a Connection coming from a XAConnection, the
> equals() method doesn't work: conn.equals(conn) returns false.
>
> The reason is that it's a actually a wapper, a
> org.postgresql.xa.PGXAConnection.ConnectionHandler, and its
> invoke() method doesn't take into account the "equals" case to
> unwrap the second argument as well if needed.

Is the hashCode method OK?  (What affects equals usually affects
hashCode, too.)

-Kevin

pgsql-jdbc by date:

Previous
From: Florent Guillaume
Date:
Subject: PGXAConnection ConnectionHandler equals bug
Next
From: Florent Guillaume
Date:
Subject: Re: PGXAConnection ConnectionHandler equals bug