From Alan.Bateman at Sun.COM Tue Dec 18 06:37:01 2007 From: Alan.Bateman at Sun.COM (Alan Bateman) Date: Tue, 18 Dec 2007 14:37:01 +0000 Subject: jmx-dev [Fwd: Fix compiler problem] Message-ID: <4767DB0D.7010309@sun.com> I don't know if the JMX team or the JavaBeans maintainers are on the core-libs-dev mailing list. -------------- next part -------------- An embedded message was scrubbed... From: Roman Kennke Subject: Fix compiler problem Date: Tue, 18 Dec 2007 15:32:06 +0100 Size: 8249 Url: http://mail.openjdk.java.net/pipermail/jmx-dev/attachments/20071218/7caefa4a/attachment.mht From Eamonn.McManus at Sun.COM Tue Dec 18 10:09:16 2007 From: Eamonn.McManus at Sun.COM (Eamonn McManus) Date: Tue, 18 Dec 2007 19:09:16 +0100 Subject: jmx-dev [Fwd: Fix compiler problem] In-Reply-To: <4767DB0D.7010309@sun.com> References: <4767DB0D.7010309@sun.com> Message-ID: <47680CCC.2030206@sun.com> An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/jmx-dev/attachments/20071218/6df300fc/attachment.html From Sergey.Malenkov at Sun.COM Wed Dec 19 09:34:16 2007 From: Sergey.Malenkov at Sun.COM (Sergey Malenkov) Date: Wed, 19 Dec 2007 20:34:16 +0300 Subject: jmx-dev [Fwd: Fix compiler problem] In-Reply-To: <47680CCC.2030206@sun.com> References: <4767DB0D.7010309@sun.com> <47680CCC.2030206@sun.com> Message-ID: <47695618.9090300@sun.com> Hi, Thank you for explanation. I'll fix it soon. Thanks, SAM Eamonn McManus wrote: > Thanks for bringing this to our attention, Alan. Roman is right - the > code in question should not compile and we should change it as he > suggests so that it is correct. > > (For people interested in the gory details, the method > T getAnnotation > (Class > annotationClass) > returns T only if it is called on a properly generic variable, such as a > Constructor or Constructor or Constructor. If it is > called on a plain Constructor with no type parameter, then that is a > "raw type", and the return type is "erased" to Annotation. So something like > ConstructorProperties annotation = > constructor.getAnnotation(ConstructorProperties.class) > should not compile if constructor is declared as Constructor rather than > Constructor or whatever.) > > ?amonn McManus JMX Spec Lead http://weblogs.java.net/blog/emcmanus/ > > > > Alan Bateman wrote: >> >> I don't know if the JMX team or the JavaBeans maintainers are on the >> core-libs-dev mailing list. >> >> >> ------------------------------------------------------------------------ >> >> Subject: >> Fix compiler problem >> From: >> Roman Kennke >> Date: >> Tue, 18 Dec 2007 15:32:06 +0100 >> To: >> Core-Libs-Dev >> >> To: >> Core-Libs-Dev >> >> >> When trying to compile OpenJDK with the Eclipse compiler, I noticed two >> compiler errors related to generics. It turned out that the code there >> is invalid and only javac (incorrectly) accepts it. See the following >> bug reports for details: >> >> https://bugs.eclipse.org/bugs/show_bug.cgi?id=212147 >> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6400189 >> >> The attached changeset fixes the problem. Could this be included? >> >> /Roman >> >>