Coder Social home page Coder Social logo

Comments (6)

alexismeneses avatar alexismeneses commented on June 24, 2024

Hi,

It seems that this has already been fixed into the master (commit 8d74338 PR #125), at least for the equals() part.

Is there a point returning 0 on hashCode() when con is null?

Regards

from pgjdbc.

ctolkmit avatar ctolkmit commented on June 24, 2024

Not sure right now about the 0 if con is null. It's just a safety pattern I am used to type automatically ;)

from pgjdbc.

ctolkmit avatar ctolkmit commented on June 24, 2024

Oh, and yes, I saw the equals()-Part in the Master, however the hashCode() part is also important.
And I don't like branching from an unreleased version, and we are currently using my patched version in production.

from pgjdbc.

alexismeneses avatar alexismeneses commented on June 24, 2024

Unless the zero-if-null thing is useful for a case that might happen and for which we can write a test, I think the issue is fixed.

Letting hashCode() fall into method.invoke(con, args) will do the job as two proxies with the same underlying connection will return the same consistent value.

The only remaining question is: should 8d74338 be backported to older branches?

from pgjdbc.

davecramer avatar davecramer commented on June 24, 2024

Yes, it probably should be backported.

Dave Cramer

On 1 July 2014 06:48, Alexis Meneses [email protected] wrote:

Unless the zero-if-null thing is useful for a case that might happen
and for which we can write a test, I think the issue is fixed.

Letting hashCode() fall into method.invoke(con, args) will do the job as
two proxies with the same underlying connection will return the same
consistent value.

The only remaining question is: should 8d74338
8d74338
be backported to older branches?


Reply to this email directly or view it on GitHub
#162 (comment).

from pgjdbc.

davecramer avatar davecramer commented on June 24, 2024

historic, if this still exists in the latest driver please advise

from pgjdbc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.