RFR: 8027470: AnnotationSupport uses == rather than .equals to compare Class objects
David Holmes
david.holmes at oracle.com
Thu Oct 31 10:24:09 UTC 2013
Hi Andreas,
On 31/10/2013 7:49 PM, Andreas Lundblad wrote:
> Hi,
>
> Please review the fix for JDK-8027470 below.
>
> Description:
> AnnotationSupport compared Class-instances using '==' where it should be using '.equals'. Fixed in this patch.
Class is final and does not override Object.equals therefore it is
guaranteed to be based on identity. This change, while harmless, is
unnecessary. Comparison of Class instances with == occurs throughout the
JDK.
David
-----
> Link to web review:
> http://cr.openjdk.java.net/~alundblad/8027470
>
> Link to bug reports:
> http://bugs.openjdk.java.net/browse/JDK-8027470
>
> -- Andreas Lundblad
>
More information about the core-libs-dev
mailing list