No, you don't need to add it back in. But if you are doing reference
equality then overriding hashCode will degrade performance of your object
in a map key, because you are unnecessarily hashing different objects to
the same bucket.


On Mon, Mar 3, 2014 at 10:40 AM, traiansf <notifications@github.com> wrote:

> In
> src/javasources/KTool/src/org/kframework/backend/pdmc/pda/graph/TarjanSCC.java:
>
> > @@ -35,11 +38,6 @@ public TarjanSCC() {
> >          }
> >
> >          @Override
> > -        public boolean equals(Object o) {
>
> I did implement equals as == but got a (soft) warning that I should check
> for the class first. As that seemed silly and anyway equals does == by
> default, I said I don't really need it. I can add it back if you think it
> makes code more clear, though. 2014-03-03 20:30 GMT+02:00 dwightguth <
> notifications@github.com>:
> ... <#144893fb951faf2c_>
>  In
> src/javasources/KTool/src/org/kframework/backend/pdmc/pda/graph/TarjanSCC.java:
> > @@ -35,11 +38,6 @@ public TarjanSCC() { > } > > @Override<https://github.com/Override>> - public boolean equals(Object o) { Is there a particular reason you
> implemented hashCode but not equals? It looks safe according to the
> contract, I'm just curious. -- Reply to this email directly or view it on
> GitHub<https://github.com/kframework/k/pull/254/files#r10221911> .
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/kframework/k/pull/254/files#r10222380>
> .
>