Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6717257
Votes 0
Synopsis MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
Category jmx:classes
Reported Against
Release Fixed 7(b34)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs 4679573
Submit Date 20-JUN-2008
Description
The doc comments in MBeanServer were mostly deleted in JDK 6 / JMX 1.4, to inherit the specifications from the parent interface MBeanServerConnection.  Unfortunately, the @throws declarations for unchecked exceptions such as RuntimeOperationsException are not inherited.  This makes sense, though not obviously: if they *were* inherited then there would be no way to remove them in a subclass.  With a checked exception, if it doesn't apply to the subclass then you simply remove it from the throws clause of the method declaration, and javadoc then doesn't inherit the corresponding @throws text.  (This is the case with IOException in MBeanServerConnection and MBeanServer.)  But with an unchecked exception it doesn't have to appear in the throws clause to be throwable, and indeed putting it there is considered bad style.

The upshot for us is that the documentation of MBeanServer is incorrect in that it omits this specification.  Users can figure things out by looking at MBeanServerConnection or JDK 5, but we should obviously fix this.  The specification in JDK 6 is frozen but we can fix this in JDK 7.
Posted Date : 2008-06-20 13:22:18.0
Work Around
N/A
Evaluation
Obvious and necessary fix.
Posted Date : 2008-06-20 13:22:18.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang