Skip to content
Permalink
Browse files
8252807: The jdk.jfr.Recording.getStream does not work when toDisk is…
… disabled

Reviewed-by: mgronlun
  • Loading branch information
egahlin committed Dec 7, 2020
1 parent 04ce8e3 commit 09707dd4f27b28980bf55030d36b5f3ec4a96831
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/jdk.jfr/share/classes/jdk/jfr/Recording.java
@@ -577,6 +577,9 @@ public void setToDisk(boolean disk) {
* Creates a data stream for a specified interval.
* <p>
* The stream may contain some data outside the specified range.
* <p>
* If the recording is not to disk, a stream can't be created
* and {@code null} is returned.
*
* @param start the start time for the stream, or {@code null} to get data from
* start time of the recording
@@ -585,12 +588,14 @@ public void setToDisk(boolean disk) {
* present time.
*
* @return an input stream, or {@code null} if no data is available in the
* interval.
* interval, or the recording was not recorded to disk
*
* @throws IllegalArgumentException if {@code end} happens before
* {@code start}
*
* @throws IOException if a stream can't be opened
*
* @see #setToDisk(boolean)
*/
public InputStream getStream(Instant start, Instant end) throws IOException {
if (start != null && end != null && end.isBefore(start)) {

1 comment on commit 09707dd

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 09707dd Dec 7, 2020

Please sign in to comment.