Conversation
|
If MBean registered by default, then what to do with an existing output mode "mbean" ? Possible options - fully drop it, or it will behave as "none". |
|
Also should be noted that as mentioned in #61 package "javax.management" not available on Android. And I don't know how to suppress those messages without removal of classes. |
|
I don't think mbean output is widely used, so we can drop this and clearly document this in the change log. On the other hand if enable it by default this might cause issues in some scenarios. So maybe the default should be no JMX. Regarding missing APIs on Android the only solution is probably a different JaCoCo runtime packaging without JMX and Java agent support. As the error log is not a show stopper I wouldn't try to solve this right now. |
|
@Godin Hi Evgeny, can you please verify that this version also works on Android? I'm asking because the current implementation has direct javax.management references from the Agent class. If this causes problems I we need to pull JMX operations into a separate class (like MBeanController was before). |
There was a problem hiding this comment.
Typo: "exposes" should be replaced by "expose".
|
@Godin Thanks for reviewing, I fixed the typos. Good to merge? |
|
@marchof I'll test on Android tomorrow morning and will come back to you about merge. |
|
@marchof It works fine on Android, since the code to create MBean (i.e. which uses non-existent package) not executed by default. So we can safely merge this! |
Separate Agent MBean from Output
The JaCoCo agent should register an MBean separately to the output mode. This allows to use the MBean in combination with an output mode (e.g. trigger dump to file via MBean). The MBean will then have the same API as the runtime API defined in #61:
The MBean is registered by default. This behavior can be modified with the new boolean agent option mbean (e.g. mbean=false).