Re: RFR: 8027470: AnnotationSupport uses == rather than .equals to compare Class objects

2013-11-17 Thread Joel Borggren-Franck
Hi all, On 2013-11-16, Remi Forax wrote: On 11/15/2013 04:21 AM, Joseph Darcy wrote: Hello, Catching up on email, the specification of java.lang.Class does not explicitly promise that its notion of equality must be identity for all time. Therefore, while not required for today's

Re: RFR: 8027470: AnnotationSupport uses == rather than .equals to compare Class objects

2013-11-16 Thread Remi Forax
On 11/15/2013 04:21 AM, Joseph Darcy wrote: Hello, Catching up on email, the specification of java.lang.Class does not explicitly promise that its notion of equality must be identity for all time. Therefore, while not required for today's implementations, I would prefer that new code we

Re: RFR: 8027470: AnnotationSupport uses == rather than .equals to compare Class objects

2013-11-16 Thread Remi Forax
On 11/15/2013 10:04 PM, John Rose wrote: On Nov 14, 2013, at 7:21 PM, Joseph Darcy joe.da...@oracle.com wrote: Catching up on email, the specification of java.lang.Class does not explicitly promise that its notion of equality must be identity for all time. Therefore, while not required for

Re: RFR: 8027470: AnnotationSupport uses == rather than .equals to compare Class objects

2013-11-15 Thread Andreas Lundblad
On Thu, Nov 14, 2013 at 07:21:38PM -0800, Joseph Darcy wrote: Hello, Catching up on email, the specification of java.lang.Class does not explicitly promise that its notion of equality must be identity for all time. Therefore, while not required for today's implementations, I would prefer

Re: RFR: 8027470: AnnotationSupport uses == rather than .equals to compare Class objects

2013-11-15 Thread Stephen Colebourne
On 15 November 2013 03:21, Joseph Darcy joe.da...@oracle.com wrote: Catching up on email, the specification of java.lang.Class does not explicitly promise that its notion of equality must be identity for all time. Therefore, while not required for today's implementations, I would prefer that

Re: RFR: 8027470: AnnotationSupport uses == rather than .equals to compare Class objects

2013-11-15 Thread Vitaly Davidovich
+1 The amount of code in the wild that would break (if this were to change) virtually guarantees that such a change won't happen, regardless of what current spec does or does not say. It would probably be easier to just update the spec at this point to match implementation. Vitaly Sent from my

Re: RFR: 8027470: AnnotationSupport uses == rather than .equals to compare Class objects

2013-11-15 Thread David Holmes
On 15/11/2013 11:11 PM, Vitaly Davidovich wrote: +1 The amount of code in the wild that would break (if this were to change) virtually guarantees that such a change won't happen, regardless of what current spec does or does not say. It would probably be easier to just update the spec at this

Re: RFR: 8027470: AnnotationSupport uses == rather than .equals to compare Class objects

2013-11-15 Thread John Rose
On Nov 14, 2013, at 7:21 PM, Joseph Darcy joe.da...@oracle.com wrote: Catching up on email, the specification of java.lang.Class does not explicitly promise that its notion of equality must be identity for all time. Therefore, while not required for today's implementations, I would prefer

Re: RFR: 8027470: AnnotationSupport uses == rather than .equals to compare Class objects

2013-11-15 Thread Vitaly Davidovich
Well using equals() would make byte code slightly larger and probably slow down interpreter for no good reason, so it's not fully harmless (with JIT code, yes, it's harmless). Sent from my phone On Nov 15, 2013 11:34 AM, David Holmes david.hol...@oracle.com wrote: On 15/11/2013 11:11 PM, Vitaly

Re: RFR: 8027470: AnnotationSupport uses == rather than .equals to compare Class objects

2013-11-14 Thread Joseph Darcy
Hello, Catching up on email, the specification of java.lang.Class does not explicitly promise that its notion of equality must be identity for all time. Therefore, while not required for today's implementations, I would prefer that new code we write in the JDK use equals rather than == when

RFR: 8027470: AnnotationSupport uses == rather than .equals to compare Class objects

2013-10-31 Thread Andreas Lundblad
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. Link to web review: http://cr.openjdk.java.net/~alundblad/8027470 Link to bug reports:

Re: RFR: 8027470: AnnotationSupport uses == rather than .equals to compare Class objects

2013-10-31 Thread David Holmes
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