Class ScopedValuesSecondPreviewNotes

java.lang.Object
net.jrodolfo.java_evolution.java22.ScopedValuesSecondPreviewNotes

public class ScopedValuesSecondPreviewNotes extends Object
Explains scoped values as a Java 22 second preview feature.

Scoped values address the same problem as the Java 21 preview: sharing immutable contextual data through a bounded scope without the cleanup hazards of many ThreadLocal designs.

Java 22 kept the API in preview, so this repository keeps the version entry as notes.

  • Constructor Details

    • ScopedValuesSecondPreviewNotes

      public ScopedValuesSecondPreviewNotes()
  • Method Details

    • purpose

      public String purpose()
      Explains the goal of scoped values.
      Returns:
      a short explanation
    • secondPreviewStatus

      public String secondPreviewStatus()
      Describes the Java 22 maturity level.
      Returns:
      a short status note