< prev index next >

src/java.base/share/classes/java/lang/Boolean.java

Print this page
*** 23,21 ***
   * questions.
   */
  
  package java.lang;
  
  import jdk.internal.vm.annotation.IntrinsicCandidate;
  
  import java.lang.constant.Constable;
- import java.lang.constant.ConstantDesc;
  import java.lang.constant.ConstantDescs;
  import java.lang.constant.DynamicConstantDesc;
  import java.util.Optional;
  
- import static java.lang.constant.ConstantDescs.BSM_GET_STATIC_FINAL;
- import static java.lang.constant.ConstantDescs.CD_Boolean;
- 
  /**
   * The {@code Boolean} class is the {@linkplain
   * java.lang##wrapperClass wrapper class} for values of the primitive
   * type {@code boolean}. An object of type {@code Boolean} contains a
   * single field whose type is {@code boolean}.
--- 23,18 ---
   * questions.
   */
  
  package java.lang;
  
+ import jdk.internal.value.DeserializeConstructor;
  import jdk.internal.vm.annotation.IntrinsicCandidate;
  
  import java.lang.constant.Constable;
  import java.lang.constant.ConstantDescs;
  import java.lang.constant.DynamicConstantDesc;
  import java.util.Optional;
  
  /**
   * The {@code Boolean} class is the {@linkplain
   * java.lang##wrapperClass wrapper class} for values of the primitive
   * type {@code boolean}. An object of type {@code Boolean} contains a
   * single field whose type is {@code boolean}.

*** 55,10 ***
--- 52,11 ---
   * occur. For example, in a future release, synchronization may fail.
   *
   * @author  Arthur van Hoff
   * @since   1.0
   */
+ @jdk.internal.MigratedValueClass
  @jdk.internal.ValueBased
  public final class Boolean implements java.io.Serializable,
                                        Comparable<Boolean>, Constable
  {
      /**

*** 173,10 ***
--- 171,11 ---
       * @param  b a boolean value.
       * @return a {@code Boolean} instance representing {@code b}.
       * @since  1.4
       */
      @IntrinsicCandidate
+     @DeserializeConstructor
      public static Boolean valueOf(boolean b) {
          return (b ? TRUE : FALSE);
      }
  
      /**
< prev index next >