From 66e7df804b21065a5c9e94c2e28be045738615be Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Mon, 4 Dec 2023 15:53:25 -0500 Subject: [PATCH] minor fixup to align with JMC interpretations, add comment --- .../serialization/SerializableRecordingDescriptor.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/io/cryostat/core/serialization/SerializableRecordingDescriptor.java b/src/main/java/io/cryostat/core/serialization/SerializableRecordingDescriptor.java index ec538124..74eabcdc 100644 --- a/src/main/java/io/cryostat/core/serialization/SerializableRecordingDescriptor.java +++ b/src/main/java/io/cryostat/core/serialization/SerializableRecordingDescriptor.java @@ -101,22 +101,23 @@ public SerializableRecordingDescriptor(SerializableRecordingDescriptor o) { this.maxAge = o.getMaxAge(); } + /** + * @see {@link org.openjdk.jmc.rjmx.services.jfr.internal.RecordingDescriptorV2#decideState} + */ private static RecordingState mapRecordingStateState(jdk.jfr.RecordingState s) { switch (s) { case NEW: return RecordingState.CREATED; case DELAYED: - return RecordingState.CREATED; + return RecordingState.RUNNING; case RUNNING: return RecordingState.RUNNING; case STOPPED: return RecordingState.STOPPED; - case CLOSED: - return RecordingState.STOPPED; default: // better not to return null here for NPE safety, but this may not always be // accurate - return RecordingState.CREATED; + return RecordingState.STOPPED; } }