< prev index next >

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

Print this page
*** 24,20 ***
   */
  
  package java.lang;
  
  import jdk.internal.misc.CDS;
  import jdk.internal.vm.annotation.IntrinsicCandidate;
  import jdk.internal.vm.annotation.Stable;
  
  import java.lang.constant.Constable;
  import java.lang.constant.DynamicConstantDesc;
  import java.util.Optional;
  
  import static java.lang.constant.ConstantDescs.BSM_EXPLICIT_CAST;
  import static java.lang.constant.ConstantDescs.CD_byte;
- import static java.lang.constant.ConstantDescs.CD_int;
  import static java.lang.constant.ConstantDescs.DEFAULT_NAME;
  
  /**
   * The {@code Byte} class is the {@linkplain
   * java.lang##wrapperClass wrapper class} for values of the primitive
--- 24,20 ---
   */
  
  package java.lang;
  
  import jdk.internal.misc.CDS;
+ import jdk.internal.value.DeserializeConstructor;
  import jdk.internal.vm.annotation.IntrinsicCandidate;
  import jdk.internal.vm.annotation.Stable;
  
  import java.lang.constant.Constable;
  import java.lang.constant.DynamicConstantDesc;
  import java.util.Optional;
  
  import static java.lang.constant.ConstantDescs.BSM_EXPLICIT_CAST;
  import static java.lang.constant.ConstantDescs.CD_byte;
  import static java.lang.constant.ConstantDescs.DEFAULT_NAME;
  
  /**
   * The {@code Byte} class is the {@linkplain
   * java.lang##wrapperClass wrapper class} for values of the primitive

*** 58,10 ***
--- 58,11 ---
   * @author  Nakul Saraiya
   * @author  Joseph D. Darcy
   * @see     java.lang.Number
   * @since   1.1
   */
+ @jdk.internal.MigratedValueClass
  @jdk.internal.ValueBased
  public final class Byte extends Number implements Comparable<Byte>, Constable {
  
      /**
       * A constant holding the minimum value a {@code byte} can

*** 142,10 ***
--- 143,11 ---
       * @param  b a byte value.
       * @return a {@code Byte} instance representing {@code b}.
       * @since  1.5
       */
      @IntrinsicCandidate
+     @DeserializeConstructor
      public static Byte valueOf(byte b) {
          final int offset = 128;
          return ByteCache.cache[(int)b + offset];
      }
  
< prev index next >