8365636: JFR: Minor cleanup

Reviewed-by: shade
This commit is contained in:
Erik Gahlin 2025-08-19 14:45:37 +00:00
parent 999761d0f6
commit 0b2d0817f1
34 changed files with 73 additions and 88 deletions

View File

@ -69,7 +69,7 @@ public final class AnnotationElement {
}
StringJoiner values = new StringJoiner(",", "[", "]");
for (Object object : objects) {
descriptors.add(String.valueOf(object));
values.add(String.valueOf(object));
}
throw new IllegalArgumentException("Annotation " + descriptors + " for " + type.getName() + " doesn't match number of values " + values);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -67,7 +67,7 @@ public final class Configuration {
}
/**
* Returns the settings that specifies how a recording is configured.
* Returns the settings that specify how a recording is configured.
* <p>
* Modifying the returned {@code Map} object doesn't change the
* configuration.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -64,7 +64,7 @@ public @interface Enabled {
/**
* Returns {@code true} if by default the event should be enabled, {@code false} otherwise.
*
* @return {@code true} if by default the event should be enabled by default, {@code false} otherwise
* @return {@code true} if by default the event should be enabled, {@code false} otherwise
*/
boolean value() default true;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -125,7 +125,7 @@ public final class EventType {
*/
public String getLabel() {
if (label == UNKNOWN) {
label = platformEventType.getLabel();;
label = platformEventType.getLabel();
}
return label;
}
@ -226,7 +226,7 @@ public final class EventType {
}
/**
* Returns the list of human-readable names that makes up the categories for
* Returns the list of human-readable names that make up the categories for
* this event type (for example, {@code "Java Application"}, {@code "Statistics"}).
*
* @return an immutable list of category names, or a list with the name

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -36,7 +36,7 @@ public interface FlightRecorderListener {
/**
* Receives notification when Flight Recorder is initialized.
* <p>
* This method is also be invoked when a listener is added to an already
* This method is also invoked when a listener is added to an already
* initialized Flight Recorder.
* <p>
* This method allows clients to implement their own initialization mechanism

View File

@ -44,7 +44,7 @@ import jdk.jfr.internal.WriteablePath;
/**
* Provides means to configure, start, stop and dump recording data to disk.
* <p>
* The following example shows how configure, start, stop and dump recording data to disk.
* The following example shows how to configure, start, stop and dump recording data to disk.
*
* {@snippet class="Snippets" region="RecordingOverview"}
*
@ -138,7 +138,7 @@ public final class Recording implements Closeable {
* The newly created recording is in the {@link RecordingState#NEW} state. To
* start the recording, invoke the {@link Recording#start()} method.
*
* @param configuration configuration that contains the settings to be use, not
* @param configuration configuration that contains the settings to be used, not
* {@code null}
*
* @throws IllegalStateException if Flight Recorder can't be created (for
@ -339,7 +339,7 @@ public final class Recording implements Closeable {
* <p>
* Clones are useful for dumping data without stopping the recording. After
* a clone is created, the amount of data to copy is constrained
* with the {@link #setMaxAge(Duration)} method and the {@link #setMaxSize(long)}method.
* with the {@link #setMaxAge(Duration)} method and the {@link #setMaxSize(long)} method.
*
* @param stop {@code true} if the newly created copy should be stopped
* immediately, {@code false} otherwise
@ -615,9 +615,9 @@ public final class Recording implements Closeable {
/**
* Disables event with the specified name.
* <p>
* If multiple events with same name (for example, the same class is loaded
* If multiple events with the same name (for example, the same class is loaded
* in different class loaders), then all events that match the
* name is disabled. To disable a specific class, use the
* name are disabled. To disable a specific class, use the
* {@link #disable(Class)} method or a {@code String} representation of the event
* type ID.
*
@ -653,7 +653,7 @@ public final class Recording implements Closeable {
/**
* Disables event.
*
* @param eventClass the event to enable, not {@code null}
* @param eventClass the event to disable, not {@code null}
*
* @throws IllegalArgumentException if {@code eventClass} is an abstract
* class or not a subclass of {@link Event}

View File

@ -295,7 +295,7 @@ public interface EventStream extends AutoCloseable {
void setReuse(boolean reuse);
/**
* Specifies that events arrives in chronological order, sorted by the time
* Specifies that events arrive in chronological order, sorted by the time
* they were committed to the stream.
*
* @param ordered if event objects arrive in chronological order to

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -82,7 +82,7 @@ public final class MetadataEvent {
* The delta will be from the last metadata event. If no metadata event has been
* emitted earlier, the list will be empty.
*
* @return an immutable list of added event types, not {@code null}
* @return an immutable list of removed event types, not {@code null}
*/
public final List<EventType> getRemovedEventTypes() {
if (removed == null) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -42,7 +42,7 @@ public final class RecordedMethod extends RecordedObject {
}
/**
* Returns the class this method belongs to, if it belong to a Java frame.
* Returns the class this method belongs to, if it belongs to a Java frame.
* <p>
* To ensure this is a Java frame, use the {@link RecordedFrame#isJavaFrame()}
* method.
@ -99,7 +99,7 @@ public final class RecordedMethod extends RecordedObject {
/**
* Returns whether this method is hidden (for example, wrapper code in a lambda
* expressions).
* expression).
*
* @return {@code true} if method is hidden, {@code false} otherwise
*/

View File

@ -183,7 +183,7 @@ public sealed class RecordedObject
return defaultValue;
}
T object = getValue(name);
if (object == null || object.getClass().isAssignableFrom(clazz)) {
if (object == null || object.getClass() == clazz) {
return object;
} else {
return defaultValue;

View File

@ -51,7 +51,7 @@ import jdk.jfr.internal.consumer.filter.ChunkWriter.RemovedEvents;
/**
* A recording file.
* <p>
* The following example shows how read and print all events in a recording file.
* The following example shows how to read and print all events in a recording file.
*
* {@snippet class="Snippets" region="RecordingFileOverview"}
*

View File

@ -232,8 +232,8 @@ public final class RecordingStream implements AutoCloseable, EventStream {
* that is older than the specified length of time is removed by the Java
* Virtual Machine (JVM).
* <p>
* If neither maximum limit or the maximum age is set, the size of the
* recording may grow indefinitely if events are on
* If neither the maximum limit nor the maximum age is set, the size of the
* recording may grow indefinitely if events are not consumed.
*
* @param maxAge the length of time that data is kept, or {@code null} if
* infinite

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -36,7 +36,7 @@
* Typically this is expressed as {@code "not null"}. If a {@code null}
* parameter is used where it is not allowed, a
* {@code java.lang.NullPointerException} is thrown. If a {@code null}
* parameters is passed to a method that throws other exceptions, such as
* parameter is passed to a method that throws other exceptions, such as
* {@code java.io.IOException}, the {@code java.lang.NullPointerException} takes
* precedence, unless the Javadoc for the method explicitly states how
* {@code null} is handled, i.e. by throwing {@code java.lang.IllegalArgumentException}.

View File

@ -97,7 +97,7 @@ public final class EventControl {
}
if (eventType.hasThrottle()) {
addControl(Throttle.NAME, defineThrottle(eventType));
eventType.setThrottler(new Throttler(eventType));
eventType.setThrottler(new Throttler());
}
if (eventType.hasLevel()) {
addControl(Level.NAME, defineLevel(eventType));

View File

@ -273,7 +273,7 @@ public final class LongMap<T> {
for (int i = 0; i < keys.length; i++) {
T o = objects[i];
if (o != null) {
list.add(o);
list.add(o == NULL_OBJECT ? null : o);
}
}
return list;

View File

@ -30,7 +30,6 @@ import java.util.List;
import java.util.Objects;
import jdk.jfr.SettingDescriptor;
import jdk.jfr.events.ActiveSettingEvent;
import jdk.jfr.internal.periodic.PeriodicEvents;
import jdk.jfr.internal.util.ImplicitFields;
import jdk.jfr.internal.util.TimespanRate;

View File

@ -32,7 +32,6 @@ import jdk.jfr.AnnotationElement;
import jdk.jfr.Configuration;
import jdk.jfr.EventSettings;
import jdk.jfr.EventType;
import jdk.jfr.FlightRecorderPermission;
import jdk.jfr.Recording;
import jdk.jfr.SettingDescriptor;
import jdk.jfr.ValueDescriptor;

View File

@ -24,7 +24,6 @@
*/
package jdk.jfr.internal.management;
import java.nio.file.Paths;
import java.nio.file.Files;
import java.nio.file.Path;
import java.time.LocalDateTime;

View File

@ -25,7 +25,6 @@
package jdk.jfr.internal.periodic;
import jdk.jfr.internal.JVM;
import jdk.jfr.internal.MetadataRepository;
import jdk.jfr.internal.PlatformRecorder;
import jdk.jfr.internal.PrivateAccess;
import jdk.jfr.internal.util.Utils;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -50,7 +50,7 @@ final class Histogram {
private static final class LookupKey {
private Object keys;
@SuppressWarnings({ "unchecked", "rawtypes" })
@SuppressWarnings({ "unchecked"})
public void add(Object o) {
// One key, fast path
if (keys == null) {
@ -58,8 +58,8 @@ final class Histogram {
return;
}
// Three or more keys
if (keys instanceof Set set) {
set.add(o);
if (keys instanceof Set<?> set) {
((Set<Object>) set).add(o);
return;
}
// Two keys

View File

@ -28,7 +28,6 @@ import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import jdk.jfr.internal.query.Configuration.Truncate;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, Datadog, Inc. All rights reserved.
* Copyright (c) 2025 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@ -27,9 +27,6 @@
package jdk.jfr.internal.settings;
import static jdk.jfr.internal.util.TimespanUnit.SECONDS;
import static jdk.jfr.internal.util.TimespanUnit.MILLISECONDS;
import java.util.Objects;
import java.util.Set;
@ -41,7 +38,6 @@ import jdk.jfr.Name;
import jdk.jfr.internal.PlatformEventType;
import jdk.jfr.internal.Type;
import jdk.jfr.internal.util.TimespanRate;
import jdk.jfr.internal.util.Utils;
@MetadataDefinition
@Label("CPUThrottleSetting")

View File

@ -42,7 +42,7 @@ import jdk.jfr.internal.tracing.PlatformTracer;
@Name(Type.SETTINGS_PREFIX + "Filter")
public final class MethodSetting extends FilterSetting {
private final Modification modification;
private volatile static boolean initialized;
private static volatile boolean initialized;
public MethodSetting(PlatformEventType eventType, Modification modification, String defaultValue) {
super(eventType, defaultValue);

View File

@ -55,8 +55,6 @@ public final class Throttler {
private boolean disabled;
private boolean update = true;
public Throttler(PlatformEventType t) {
}
// Not synchronized in fast path, but uses volatile reads.
public boolean sample(long ticks) {
if (disabled) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -91,7 +91,7 @@ public class Filters {
return !types.stream().anyMatch(f);
}
public static <T> Predicate<T> matchAny(List<Predicate<T>> filters) {
public static <T> Predicate<T> matchAll(List<Predicate<T>> filters) {
if (filters.isEmpty()) {
return t -> true;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -203,7 +203,7 @@ final class Metadata extends Command {
try (PrintWriter pw = new PrintWriter(System.out, false, UTF_8)) {
MetadataWriter metadataWriter = new MetadataWriter(pw, showIds);
if (!filters.isEmpty()) {
filter = Filters.matchAny(filters);
filter = Filters.matchAll(filters);
}
List<Type> types = findTypes(file);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -164,7 +164,7 @@ final class Print extends Command {
}
eventWriter.setStackDepth(stackDepth);
if (!eventFilters.isEmpty()) {
eventWriter.setEventFilter(Filters.matchAny(eventFilters));
eventWriter.setEventFilter(Filters.matchAll(eventFilters));
}
try {
eventWriter.print(file);

View File

@ -214,7 +214,7 @@ final class Scrub extends Command {
}
optionCount = options.size();
}
return Filters.matchAny(filters);
return Filters.matchAll(filters);
}
private void ensureUsableOutput(Path input, Path output) throws UserSyntaxException, UserDataException {

View File

@ -35,7 +35,6 @@ import jdk.jfr.internal.LogTag;
import jdk.jfr.internal.Logger;
import jdk.jfr.internal.MetadataRepository;
import jdk.jfr.internal.SecuritySupport;
import jdk.jfr.internal.Type;
import jdk.jfr.internal.util.Bytecode;
import jdk.jfr.tracing.MethodTracer;
@ -264,18 +263,16 @@ public final class PlatformTracer {
// provided a user has specified a non-empty filter for the MethodTrace or
// MethodTiming event.
public static void initialize() {
try {
Logger.log(LogTag.JFR_METHODTRACE, LogLevel.DEBUG, "Method tracer initialization started.");
Thread current = Thread.currentThread();
JVM.exclude(current);
long methodId = 16384126;
long classId = methodId >> 16;
ClassLoader cl = null;
String className = " java/lang/String";
Module m = String.class.getModule();
var is = ClassLoader.getSystemClassLoader().getResourceAsStream("java/lang/String.class");
Logger.log(LogTag.JFR_METHODTRACE, LogLevel.DEBUG, "Method tracer initialization started.");
Thread current = Thread.currentThread();
JVM.exclude(current);
long methodId = 16384126;
long classId = methodId >> 16;
ClassLoader cl = null;
String className = "java/lang/String";
Module m = String.class.getModule();
try (var is = ClassLoader.getSystemClassLoader().getResourceAsStream("java/lang/String.class")) {
byte[] oldBytecode = is.readAllBytes();
is.close();
long[] ids = { methodId };
String[] names = { "<clinit>" };
String[] signatures = { "()V" };

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2025 SAP SE. All rights reserved.
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,8 +25,6 @@
*/
package jdk.jfr.internal.util;
import jdk.jfr.internal.settings.CPUThrottleSetting;
/**
* A rate or fixed period, see {@link jdk.jfr.internal.Rate}
*/

View File

@ -33,7 +33,7 @@
* running application up to the failure or crash.
* <p>
* To define a Flight Recorder event, extend {@link jdk.jfr.Event} and add
* fields that matches the data types of the payload. Metadata about fields,
* fields that match the data types of the payload. Metadata about fields,
* such as labels, descriptions and units, can be added by using the annotations
* available in the {@code jdk.jfr} package, or by using a user-defined
* annotation that has the {@link jdk.jfr.MetadataDefinition} annotation.
@ -232,7 +232,7 @@
* Typically this is expressed as {@code "not null"}. If a {@code null}
* parameter is used where it is not allowed, a
* {@code java.lang.NullPointerException} is thrown. If a {@code null}
* parameters is passed to a method that throws other exceptions, such as
* parameters are passed to a method that throws other exceptions, such as
* {@code java.io.IOException}, the {@code java.lang.NullPointerException} takes
* precedence, unless the Javadoc for the method explicitly states how
* {@code null} is handled, i.e. by throwing

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -163,7 +163,7 @@ public final class EventTypeInfo {
/**
* Returns a short sentence or two describing the event type associated with
* this {@code EventTypeInfo}, for example
* {@code "Garbage collection performed by the JVM""}.
* {@code "Garbage collection performed by the JVM"}.
*
* @return the description, or {@code null} if no description exists
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -27,6 +27,7 @@ package jdk.management.jfr;
import java.io.IOException;
import java.lang.management.PlatformManagedObject;
import java.nio.file.Paths;
import java.time.Instant;
import java.util.List;
import java.util.Map;
@ -47,7 +48,7 @@ import jdk.jfr.Recording;
* Specify how long a recording should last, and where and when data
* should be dumped.</li>
* <li><b>Settings</b><br>
* Specify which events should be enabled and what kind information each
* Specify which events should be enabled and what kind of information each
* event should capture.</li>
* <li><b>Configurations</b><br>
* Predefined sets of settings, typically derived from a settings file,
@ -59,7 +60,7 @@ import jdk.jfr.Recording;
*
* <h2>Recording options</h2>
* <p>
* The following table shows the options names to use with {@link #setRecordingOptions(long, Map)}
* The following table shows the option names to use with {@link #setRecordingOptions(long, Map)}
* and {@link #getRecordingOptions(long)}.
*
* <table class="striped">
@ -67,7 +68,7 @@ import jdk.jfr.Recording;
* <thead>
* <tr>
* <th scope="col">Name</th>
* <th scope="col">Descripion</th>
* <th scope="col">Description</th>
* <th scope="col">Default value</th>
* <th scope="col">Format</th>
* <th scope="col">Example values</th>
@ -107,7 +108,7 @@ import jdk.jfr.Recording;
* </tr>
* <tr>
* <th scope="row">{@code maxSize}</th>
* <td>Specifies the size, measured in bytes, at which data is kept in disk
* <td>Specifies the size, measured in bytes, at which data is kept in the disk
* repository. Only works if
* {@code disk=true}, otherwise this parameter is ignored.</td>
* <td>{@code "0"} (no limit)</td>
@ -131,8 +132,8 @@ import jdk.jfr.Recording;
* <td>See {@code Paths#getPath} for format. <br>
* If this method is invoked from another process, the data is written on the
* machine where the target JVM is running. If destination is a relative path, it
* is relative to the working directory where the target JVM was started.}</td>
* <td>{@code "c:\recording\recotding.jfr"},<br>
* is relative to the working directory where the target JVM was started.</td>
* <td>{@code "c:\recording\recording.jfr"},<br>
* {@code "/recordings/recording.jfr"}, {@code "recording.jfr"}</td>
* </tr>
* <tr>
@ -145,7 +146,7 @@ import jdk.jfr.Recording;
* {@code "false"}</td>
* <tr>
* <th scope="row">{@code duration}</th>
* <td>Sets how long the recording should be running</td>
* <td>Specifies the duration of the recording.</td>
* <td>{@code "0"} (no limit, continuous)</td>
* <td>{@code "0"} if no limit should be imposed, otherwise a string
* representation of a positive {@code Long} followed by an empty space and one
@ -287,7 +288,7 @@ public interface FlightRecorderMXBean extends PlatformManagedObject {
* <thead>
* <tr>
* <th scope="col">Name</th>
* <th scope="col">Descripion</th>
* <th scope="col">Description</th>
* <th scope="col">Default value</th>
* <th scope="col">Format</th>
* <th scope="col">Example values</th>
@ -337,7 +338,7 @@ public interface FlightRecorderMXBean extends PlatformManagedObject {
* <td>{@code "1.0"}</td>
* <td>A version number with a major and minor.<br>
* <br>
* To be able to read from a running recording the value must be set</td>
* To be able to read from a running recording the value must be set to</td>
* <td>{@code "1.0"}
* </tr>
* </tbody>
@ -355,7 +356,7 @@ public interface FlightRecorderMXBean extends PlatformManagedObject {
*
* @return a unique ID for the stream.
*
* @throws IllegalArgumentException if a recording with the iD doesn't
* @throws IllegalArgumentException if a recording with the ID doesn't
* exist, or if {@code options} contains invalid values
*
* @throws IOException if the recording is closed, an I/O error occurs, or
@ -425,7 +426,7 @@ public interface FlightRecorderMXBean extends PlatformManagedObject {
* is a textual representation of the settings value (for example,
* {@code "60 s"}).
*
* @param recordingId the ID of the recordings to get settings for
* @param recordingId the ID of the recording to get settings for
*
* @return a map that describes the recording settings, not {@code null}
*
@ -522,7 +523,7 @@ public interface FlightRecorderMXBean extends PlatformManagedObject {
void setRecordingOptions(long recordingId, Map<String, String> options) throws IllegalArgumentException;
/**
* Returns the list of the available recordings, not necessarily running.
* Returns the list of available recordings, not necessarily running.
* <p>
* <b>MBeanServer access</b>:<br>
* The mapped type of {@code RecordingInfo} is {@code CompositeData} with

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -108,7 +108,7 @@ public final class SettingDescriptorInfo {
/**
* Returns the description of the setting associated this
* {@code SettingDescriptorInfo} (for example,
* {@code "The duration an event must exceed to be be recorded"}).
* {@code "The duration an event must exceed to be recorded"}).
*
* @return the description of this setting, not null
*/