I think I posted some of this a while ago already, but it seems like
this kind of problems sneaks in every now and then. The JMX code has
some generics code that is not valid Java code but is accepted by javac
anyway (which is a bug in javac, which should be fixed IMO). Other (Java
compatible) compilers (like the Eclipse compiler) reject this code,
which is the correct thing to do. The attached patch fixes the (current)
problems in JMX.

/Roman

-- 
Dipl.-Inform. (FH) Roman Kennke, Software Engineer, http://kennke.org
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-48
USt-Id: DE216375633, Handelsregister HRB 109481, AG Karlsruhe
Geschäftsführer: Dr. James J. Hunt
diff -r 213263e6dec4 -r 20f1a33a7460 src/share/classes/com/sun/jmx/mbeanserver/DefaultMXBeanMappingFactory.java
--- a/src/share/classes/com/sun/jmx/mbeanserver/DefaultMXBeanMappingFactory.java	Thu Jul 31 16:49:31 2008 +0200
+++ b/src/share/classes/com/sun/jmx/mbeanserver/DefaultMXBeanMappingFactory.java	Fri Aug 01 14:34:36 2008 +0200
@@ -1206,7 +1206,7 @@
             // Also remember the set of properties in that constructor
             // so we can test unambiguity.
             Set<BitSet> getterIndexSets = newSet();
-            for (Constructor constr : annotatedConstrList) {
+            for (Constructor<?> constr : annotatedConstrList) {
                 String[] propertyNames =
                     constr.getAnnotation(propertyNamesClass).value();
 
diff -r 00a6f1f4a0e2 src/share/classes/com/sun/jmx/mbeanserver/MBeanIntrospector.java
--- a/src/share/classes/com/sun/jmx/mbeanserver/MBeanIntrospector.java	Fri Sep 05 16:16:59 2008 +0200
+++ b/src/share/classes/com/sun/jmx/mbeanserver/MBeanIntrospector.java	Tue Sep 09 13:15:32 2008 +0200
@@ -623,7 +623,7 @@
     }
 
     private static MBeanConstructorInfo[] findConstructors(Class<?> c) {
-        Constructor[] cons = c.getConstructors();
+        Constructor<?>[] cons = c.getConstructors();
         MBeanConstructorInfo[] mbc = new MBeanConstructorInfo[cons.length];
         for (int i = 0; i < cons.length; i++) {
             String descr = "Public constructor of the MBean";

Reply via email to