https://bz.apache.org/bugzilla/show_bug.cgi?id=60845

--- Comment #31 from Mark Murphy <[email protected]> ---
(In reply to dollinger.florian from comment #30)
> For:
> 
> +        if (this == o) 
> +            return true;
> 
> I would say it's a bit faster if the object is identical to o (in terms of
> "same" not just "equal") - since the method returns immediately then. But
> maybe that's not the case too often...
> 
> 
> The other two if's is just what i personally like
> +        if (o == null) 
> +            return false; 
> +        if (o.getClass() != getClass()) 
> +            return false;
> 
> Do you think it's slower in summary? It's not necessary to do it that way...
> I just thought that the Patch is not applied yet and I can modify it however
> I want xD

Well, there is a great debate about which is correct, but in this case,
sticking with instanceof seems correct to me simply because changing to
getClass is an unnecessary breaking change. Unless there is a bug introduced by
the instanceof, I would keep it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to