Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6268347

Missing throw in CompositeDataMXBeanType constructor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 5.0
    • core-svc

      Note that the catch clause below constructs an OpenDataException but
      does not throw it:

          static class CompositeDataMXBeanType extends MappedMXBeanType {
              final Class javaClass;
              final boolean isCompositeData;
              Method fromMethod = null;

              CompositeDataMXBeanType(Class c) throws OpenDataException {
                  this.javaClass = c;
                  this.mappedTypeClass = COMPOSITE_DATA_CLASS;

                  // check if a static from method exists
                  try {
                      fromMethod = (Method)
                          AccessController.doPrivileged(new PrivilegedExceptionAction() {
                              public Object run() throws NoSuchMethodException {
                                  return javaClass.getMethod("from", COMPOSITE_DATA_CLASS);
                              }
                          });
                  } catch (PrivilegedActionException e) {
                      // NoSuchMethodException is wrapped
                      final OpenDataException ode =
                          new OpenDataException("from(CompositeData) method "
                              + "doesn't exist in " + c.getName());
                  }
      ###@###.### 2005-05-11 00:35:36 GMT

            mchung Mandy Chung (Inactive)
            mmma Marvin Ma (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: