Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8237015

Missing javadoc for jdk.jfr.Recording(Map)

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 15
    • hotspot
    • None
    • jfr
    • minimal
    • Java API
    • JDK

      Summary

      Add javadoc specification to the constructor jdk.jfr.Recording(Map)

      Problem

      Public constructors should have javadoc specification and a constructor in the Recording class in the jdk.jfr module lacks one.

      Solution

      Add javadoc specification to the jdk.jfr.Recording(Map) constructor.

      The Recording class already contains a default constructor and a setter. The behaviour and specification will be equivalent to:

      Recording r = new Recording();
      r.setSettings(map);

      Specification

      +    /**
      +     * Creates a recording with settings from a map of name-value pairs.
      +     * <p>
      +     * A newly created recording is in the {@link RecordingState#NEW} state. To start
      +     * the recording, invoke the {@link Recording#start()} method.
      +     *
      +     * @throws IllegalStateException if Flight Recorder can't be created (for
      +     *         example, if the Java Virtual Machine (JVM) lacks Flight Recorder
      +     *         support, or if the file repository can't be created or accessed)
      +     *
      +     * @throws SecurityException If a security manager is used and
      +     *         FlightRecorderPermission "accessFlightRecorder" is not set.
      +     *
      +     * @see jdk.jfr
      +     */
       public Recording(Map<String, String> settings) {

            egahlin Erik Gahlin
            egahlin Erik Gahlin
            Joe Darcy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: