RFR: 6825: JMX defineEventProbes fails when no events in XMLDescriptor

Marcus Hirt hirt at openjdk.java.net
Sat Jun 6 13:29:53 UTC 2020


On Fri, 5 Jun 2020 17:01:28 GMT, Jessye Coleman-Shapiro <jescolem at openjdk.org> wrote:

> This patch makes the agent JMX operation 'defineEventProbes' accept an xmlDecsription with no event tags.  Previously,
> the only way you could clear all current transforms was to supply the operation with an empty or null xmlDescription.
> Now a file with the following structure will also clear all current transforms:
> `<jfragent><events></events></jfragent>`

agent/src/main/java/org/openjdk/jmc/agent/jmx/AgentController.java line 83:

> 82: 	private Class<?>[] revertAllTransforms() {
> 83: 		HashSet<Class<?>> classesToRetransform = new HashSet<Class<?>>();
> 84: 		List<String> classNames = registry.clearAllTransformData();

Style: Set<Class<?>> classesToRetransform = new HashSet<Class<?>>();

agent/src/main/java/org/openjdk/jmc/agent/jmx/AgentController.java line 97:

> 96: 	private Class<?>[] defineSpecificTransforms(List<TransformDescriptor> descriptors) {
> 97: 		HashSet<Class<?>> classesToRetransform = new HashSet<Class<?>>();
> 98: 		for (TransformDescriptor descriptor : descriptors) {

Style: Set<Class<?>> classesToRetransform = new HashSet<Class<?>>();

-------------

PR: https://git.openjdk.java.net/jmc/pull/80


More information about the jmc-dev mailing list