MXBean spec does not forbid parameterized types but implementation does

XMLWordPrintable

    • 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.

            Assignee:
            Unassigned
            Reporter:
            Eamonn McManus
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: