-
Bug
-
Resolution: Unresolved
-
P5
-
6
-
Cause Known
-
generic
-
generic
The MXBean specification says how certain parameterized types such as List<String> are handled, but does not say what happens with types that are not in this list. So for example, if I define...
public class Whatsit<T> {
public T getThing() {...}
}
...then following the rules specified in javax.management.MXBean, I would expect "Mappings for other types" to apply, so that an MXBean interface like this...
public interface SomeMXBean {
public Whatsit<String> getA();
}
...would define an attribute called A with the same type as if I had defined this...
public class Whatsit {
public String getThing() {...}
}
public interface SomeMXBean {
public Whatsit getA();
}
But the current implementation rejects this. Either the spec should be changed to rule out this case, or the implementation should be changed to accept it.
public class Whatsit<T> {
public T getThing() {...}
}
...then following the rules specified in javax.management.MXBean, I would expect "Mappings for other types" to apply, so that an MXBean interface like this...
public interface SomeMXBean {
public Whatsit<String> getA();
}
...would define an attribute called A with the same type as if I had defined this...
public class Whatsit {
public String getThing() {...}
}
public interface SomeMXBean {
public Whatsit getA();
}
But the current implementation rejects this. Either the spec should be changed to rule out this case, or the implementation should be changed to accept it.
- relates to
-
JDK-6406447 MXBean framework should support non-generic subclasses of generic classes
-
- Resolved
-