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

Address post-integration comments for Stable Values

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Unresolved
    • Icon: P4 P4
    • 25
    • core-libs
    • None
    • source
    • minimal
    • None. This is only a documentation update with no behavioral changes. The Stable Value feature has never been present before.
    • Java API
    • SE

      Summary

      This CSR covers a missing @throws in the StableValue docs.

      Problem

      A @throws was missing in the StableValue docs.

      Solution

      Update the specifications to include the @throws

      Specification

      diff --git a/src/java.base/share/classes/java/lang/StableValue.java b/src/java.base/share/classes/java/lang/StableValue.java
      index b12d6f5e92128..4abcafd13b493 100644
      --- a/src/java.base/share/classes/java/lang/StableValue.java
      +++ b/src/java.base/share/classes/java/lang/StableValue.java
      @@ -519,6 +515,9 @@ public sealed interface StableValue
            *
            * @param contents to set
            * @throws IllegalStateException if the contents was already set
      +     * @throws IllegalStateException if a supplier invoked by {@link #orElseSet(Supplier)}
      +     *         recursively attempts to set this stable value by calling this method
      +     *         directly or indirectly.
            */
           void setOrThrow(T contents);
      

            pminborg Per-Ake Minborg
            pminborg Per-Ake Minborg
            Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: