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

JFR: Specification should say long and boolean, not Long or Boolean

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Unresolved
    • Icon: P3 P3
    • 26
    • hotspot
    • None
    • jfr
    • behavioral
    • minimal
    • Java API

      Summary

      Change from Long and Boolean to long or boolean in the packages jdk.jfr and jdk.management.jfr where a string representations is requested.

      Problem

      Event settings in JFR for Threshold, Period and Throttle rate is specified in textual form, for example:

      String representation of a positive {@code Long} value followed by an empty ...

      but null is not alternative.

      Solution

      Change the specification so all use of "Long" and "Boolean" becomes "long" or "boolean".

      Specification

      src/jdk.jfr/share/classes/jdk/jfr/Period.java b/src/jdk.jfr/share/classes/jdk/jfr/Period.java

           /**
            * Returns the default setting value for a periodic setting.
            * <p>
      -     * String representation of a positive {@code Long} value followed by an empty
      +     * String representation of a positive {@code long} value followed by an empty
            * space and one of the following units:<br>
            * <br>
            * {@code "ns"} (nanoseconds)<br>

      src/jdk.jfr/share/classes/jdk/jfr/Threshold.java b/src/jdk.jfr/share/classes/jdk/jfr/Threshold.java

           /**
            * The threshold (for example, {@code "20 ms"}).
            * <p>
      -     * A {@code String} representation of a positive {@code Long} value followed by an
      +     * A {@code String} representation of a positive {@code long} value followed by an
            * empty space and one of the following units:<br>
            * <br>
            * {@code "ns"} (nanoseconds)<br>

      src/jdk.jfr/share/classes/jdk/jfr/internal/Cutoff.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/Cutoff.java

           /**
            * Cutoff, for example {@code "20 ms"}.
            * <p>
      -     * String representation of a positive {@code Long} value followed by an empty
      +     * String representation of a positive {@code long} value followed by an empty
            * space and one of the following units<br>
            * <br>
            * {@code "ns"} (nanoseconds)<br>

      src/jdk.jfr/share/classes/jdk/jfr/package-info.java b/src/jdk.jfr/share/classes/jdk/jfr/package-info.java

        * <th scope="row">{@code enabled}</th>
        * <td>Specifies whether the event is recorded</td>
        * <td>{@code "true"}</td>
      - * <td>String representation of a {@code Boolean} ({@code "true"} or
      + * <td>String representation of a {@code boolean} ({@code "true"} or
        * {@code "false"})</td>
        * <td>{@code "true"}<br>
        * {@code "false"}</td>
      ...
        * <td>Specifies the duration below which an event is not recorded</td>
        * <td>{@code "0"} (no limit)</td>
        * <td>{@code "0"} if no threshold is used, otherwise a string representation of
      - * a positive {@code Long} followed by a space and one of the following units:
      + * a positive {@code long} followed by a space and one of the following units:
        * <ul style="list-style-type:none">
        * <li>{@code "ns"} (nanoseconds)
        * <li>{@code "us"} (microseconds)
      ...
        * periodic</td>
        * <td>{@code "everyChunk"}</td>
        * <td>{@code "everyChunk"}, if a periodic event should be emitted with every
      - * file rotation, otherwise a string representation of a positive {@code Long}
      + * file rotation, otherwise a string representation of a positive {@code long}
        * value followed by an empty space and one of the following units:
        * <ul style="list-style-type:none">
        * <li>{@code "ns"} (nanoseconds)
      ...
        * <td>Specifies whether the stack trace from the {@link Event#commit()} method
        * is recorded</td>
        * <td>{@code "true"}</td>
      - * <td>String representation of a {@code Boolean} ({@code "true"} or
      + * <td>String representation of a {@code boolean} ({@code "true"} or
        * {@code "false"})</td>
        * <td>{@code "true"},<br>
        * {@code "false"}</td>
      ...
        *   <td>Specifies the maximum rate of events per time unit.</td>
        *   <td>{@code "off"} (no throttling)</td>
        *   <td>
      - *     "off", if events should not be throttled, otherwise a string representation of a positive {@code Long} value followed by forward slash ("/") and one of the following units:
      + *     "off", if events should not be throttled, otherwise a string representation of a positive {@code long} value followed by forward slash ("/") and     one of the following units:
        *     <ul style="list-style-type:none">
        *       <li>{@code "ns"} (nanoseconds)
        *       <li>{@code "us"} (microseconds)

      src/jdk.management.jfr/share/classes/jdk/management/jfr/FlightRecorderMXBean.java

        * this parameter is ignored.</td>
        * <td>{@code "0"} (no limit)</td>
        * <td>{@code "0"} if no limit is imposed, otherwise a string
      - * representation of a positive {@code Long} value followed by an empty space
      + * representation of a positive {@code long} value followed by an empty space
        * and one of the following units,<br>
        * <br>
        * {@code "ns"} (nanoseconds)<br>
      ....
        * repository. Only works if
        * {@code disk=true}, otherwise this parameter is ignored.</td>
        * <td>{@code "0"} (no limit)</td>
      - * <td>String representation of a {@code Long} value, must be positive</td>
      + * <td>String representation of a {@code long} value, must be positive</td>
        * <td>{@code "0"}, <br>
        * {@code "1000000000"}</td>
        * </tr>
      ...
        * <th scope="row">{@code dumpOnExit}</th>
        * <td>Dumps recording data to disk on Java Virtual Machine (JVM) exit</td>
        * <td>{@code "false"}</td>
      - * <td>String representation of a {@code Boolean} value, {@code "true"} or
      + * <td>String representation of a {@code boolean} value, {@code "true"} or
        * {@code "false"}</td>
        * <td>{@code "true"},<br>
        * {@code "false"}</td>
      ...
        * <th scope="row">{@code disk}</th>
        * <td>Stores recorded data as it is recorded</td>
        * <td><code>"false"</code></td>
      - * <td>String representation of a {@code Boolean} value, {@code "true"} or
      + * <td>String representation of a {@code boolean} value, {@code "true"} or
        * {@code "false"}</td>
        * <td>{@code "true"},<br>
        * {@code "false"}</td>
      ...
        * <td>Sets how long the recording should be running</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
      + * representation of a positive {@code long} followed by an empty space and one
        * of the following units:<br>
        * <br>
        * {@code "ns"} (nanoseconds)<br>

            egahlin Erik Gahlin
            egahlin Erik Gahlin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: