RFR: 6875: Add agent MXBean operation to return instrumented xml configuration [v3]
Marcus Hirt
hirt at openjdk.java.net
Wed Aug 19 20:57:38 UTC 2020
On Wed, 19 Aug 2020 19:41:56 GMT, Jessye Coleman-Shapiro <jescolem at openjdk.org> wrote:
>> agent/src/test/java/org/openjdk/jmc/agent/test/TestRetrieveEventProbes.java line 82:
>>
>>> 81: String invalidConfiguration = XML_TEST_DESCRIPTION.concat("</jfragent>");
>>> 82: mbean.defineEventProbes(invalidConfiguration);
>>> 83: Assert.assertEquals(mbean.retrieveEventProbes(), initialConfiguration);
>>
>> This is just a matter of taste, but I would have expected the definition to fail exceptionally with information about
>> the invalid configuration, hopefully giving a hint of what went wrong (in the case of e.g. bad XML where the XML went
>> wrong, simply propagating the exception). And then (just as it is done) let subsequent reads of the configuration
>> return the last valid one.
>
> Yes, I do agree with you - right now how it is handled is an error is logged when the definition fails, but no
> exception is thrown. Since this is more specific to `defineEventProbes` instead of `retrieveEventProbes`, perhaps a
> separate issue should be created to address this?
Ok. I opened up JMC-6890 for this.
-------------
PR: https://git.openjdk.java.net/jmc/pull/99
More information about the jmc-dev
mailing list