RFR: 8044135 Add API to start JMX agent from attach framework

Staffan Larsen staffan.larsen at oracle.com
Wed Jun 11 08:08:48 UTC 2014


On 11 jun 2014, at 08:58, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> On 10/06/2014 08:46, Staffan Larsen wrote:
>> 
>> Changed: http://cr.openjdk.java.net/~sla/8044135/webrev.02/
>> 
>> 
> I took another pass over this (webrev.03, latest I think).
> 
> Now that the NPE issue is resolved then I think it means that VirtualMachine#startManagementAgent needs to @throws IllegalArgumentException in its javadoc to make it clear that this is throw when non-String or other validation fails. It probably doesn't have to specify that the properties have to start with com.sun.management as that might change over time.

I added:

+     * @throws  IllegalArgumentException
+     *          If keys or values in agentProperties are invalid.
+     *

> It otherwise looks okay to me, I guess I would leave out the Eclipse specific @SuppressWarnings("unused") as we don't usually use this in the JDK code base for non-javac warnings.

I would prefer to leave them in as they do no harm for non-Eclipse users and are only present in the tests.

updated webrev: http://cr.openjdk.java.net/~sla/8044135/webrev.04/

Thanks,
/Staffan


More information about the serviceability-dev mailing list