Re: PGXAConnection ConnectionHandler equals bug

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Florent Guillaume" <fg(at)nuxeo(dot)com>,<pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: PGXAConnection ConnectionHandler equals bug
Date: 2011-10-17 17:28:35
Message-ID: 4E9C1F73020000250004205D@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Florent Guillaume <fg(at)nuxeo(dot)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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Florent Guillaume 2011-10-17 17:34:38 Re: PGXAConnection ConnectionHandler equals bug
Previous Message Florent Guillaume 2011-10-17 17:01:04 PGXAConnection ConnectionHandler equals bug