Skip to content

Commit

Permalink
minor fixup to align with JMC interpretations, add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Dec 4, 2023
1 parent 3ba0d87 commit d424c7e
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit d424c7e

Please sign in to comment.