RFR: 7455: Add support for jolokia JMX service connection [v16]
Martin Skarsaune
duke at openjdk.org
Sun Jun 9 17:44:20 UTC 2024
On Fri, 7 Jun 2024 14:57:27 GMT, Alex Macdonald <aptmac at openjdk.org> wrote:
>> Martin Skarsaune has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Revert "JMC-7455: Actually measure coverage of jolokia"
>>
>> This reverts commit 17a7eaf8e3e8c4da828633d2d0e1484a47cb4ad3.
>> - Revert "JMC-7455: Attempt to use late property resolution for surefireArgLine"
>>
>> This reverts commit 13210f66dcf56f7790d26397ca00ae86acfb58ed.
>
> application/org.openjdk.jmc.jolokia/src/main/java/org/openjdk/jmc/jolokia/JmcJolokiaJmxConnection.java line 110:
>
>> 108: try {
>> 109: localInfo = ManagementFactory.getPlatformMBeanServer().getMBeanInfo(name);
>> 110: } catch (Exception | NoClassDefFoundError ignore) {
>
> Does this throw a `NoClassDefFoundError`? Took a look at https://docs.oracle.com/en/java/javase/17/docs/api/java.management/javax/management/MBeanServer.html#getMBeanInfo(javax.management.ObjectName) and it wasn't in their list of throws. If we're catching Exception anyways and not doing anything specific for the `NoClassDefFoundError` then this could probably just catch Exception instead.
Errors are not neccesarily declared. This is due to an underlying problem in Jolokia that I found while testing JMC manually: https://github.com/jolokia/jolokia/issues/666 . I believe it is safest to build in tolerance, and then we can consider removing it again later.
-------------
PR Review Comment: https://git.openjdk.org/jmc/pull/548#discussion_r1632358611
More information about the jmc-dev
mailing list