<commit_before>package org.ray.runtime.object;

import java.io.Serializable;
import org.ray.api.Ray;
import org.ray.api.RayObject;
import org.ray.api.id.ObjectId;

/**
 * Implementation of {@link RayObject}.
 */
public final class RayObjectImpl<T> implements RayObject<T>, Serializable {

  private final ObjectId id;

  /**
   * Cache the result of `Ray.get()`.
   *
   * Note, this is necessary for direct calls, in which case, it's not allowed to call `Ray.get` on
   * the same object twice.
   */
  private T object;

  /**
   * Whether the object is already gotten from the object store.
   */
  private boolean objectGotten;

  public RayObjectImpl(ObjectId id) {
    this.id = id;<commit_msg>[Java] Fix the issue that the cached value in `RayObject` is serialized (#7613)<commit_after>package org.ray.runtime.object;

import java.io.Serializable;
import org.ray.api.Ray;
import org.ray.api.RayObject;
import org.ray.api.id.ObjectId;

/**
 * Implementation of {@link RayObject}.
 */
public final class RayObjectImpl<T> implements RayObject<T>, Serializable {

  private final ObjectId id;

  /**
   * Cache the result of `Ray.get()`.
   *
   * Note, this is necessary for direct calls, in which case, it's not allowed to call `Ray.get` on
   * the same object twice.
   */
  private transient T object;

  /**
   * Whether the object is already gotten from the object store.
   */
  private transient boolean objectGotten;

  public RayObjectImpl(ObjectId id) {
    this.id = id;
{'fraction_non_alphanumeric': 0.10969044414535666, 'fraction_numerical': 0.0026917900403768506, 'mean_word_length': 3.4654654654654653, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5147205', 'n_tokens_mistral': 470, 'n_tokens_neox': 447, 'n_words': 157}