Method setStartTime doesn't work with RecordingStream JEP-349-branch
authoregahlin
Wed, 23 Oct 2019 17:02:32 +0200
branchJEP-349-branch
changeset 58757 df9b65cc99e8
parent 58755 ac3504a5597c
child 58765 1256af493619
Method setStartTime doesn't work with RecordingStream
src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/AbstractEventStream.java
--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/AbstractEventStream.java	Wed Oct 23 15:01:32 2019 +0200
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/AbstractEventStream.java	Wed Oct 23 17:02:32 2019 +0200
@@ -230,7 +230,7 @@
             if (configuration.started) {
                 throw new IllegalStateException("Event stream can only be started once");
             }
-            if (active) {
+            if (active && configuration.startTime == null) {
                 configuration.setStartNanos(startNanos);
             }
             configuration.setStarted(true);