Repository: GoogleContainerTools/jib
File: jib-core/src/main/java/com/google/cloud/tools/jib/image/ImageTarball.java (Java)

Code before:
import com.google.cloud.tools.jib.json.JsonTemplate;
import com.google.cloud.tools.jib.json.JsonTemplateMapper;
import com.google.cloud.tools.jib.tar.TarStreamBuilder;
import com.google.common.collect.ImmutableSet;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.time.Instant;
import java.util.Collections;

/** Translates an {@link Image} to a tarball that can be loaded into Docker. */
public class ImageTarball {

  /** File name for the container configuration in the tarball. */
  private static final String CONTAINER_CONFIGURATION_JSON_FILE_NAME = "config.json";

  /** File name for the manifest in the tarball. */
  private static final String MANIFEST_JSON_FILE_NAME = "manifest.json";

  /** File name extension for the layer content files. */
  private static final String LAYER_FILE_EXTENSION = ".tar.gz";

  private final Image image;
  private final ImageReference imageReference;
  private final ImmutableSet<String> allTargetImageTags;
  private final Instant creationTime = Instant.EPOCH;

  /**
   * Instantiate with an {@link Image}.
   *
   * @param image the image to convert into a tarball
   * @param imageReference image reference to set in the manifest (note that the tag portion of the
   *     image reference is ignored)
   * @param allTargetImageTags the tags to tag the image with
   */
  public ImageTarball(
      Image image, ImageReference imageReference, ImmutableSet<String> allTargetImageTags) {
    this.image = image;
    this.imageReference = imageReference;
    this.allTargetImageTags = allTargetImageTags;
  }

  /**
   * Writes image tar bar in configured {@link Image#getImageFormat()} of OCI or Docker to output
   * stream.
   *
   * @param out the target output stream
   * @throws IOException if an error occurs writing out the image to stream
   */
  public void writeTo(OutputStream out) throws IOException {
    if (image.getImageFormat() == OciManifestTemplate.class) {

Review comment (suggestion):
```suggestion
  private static final Instant TAR_ENTRY_MODIFICATION_TIME = Instant.EPOCH;
```
and move the field up.

Code after:
import com.google.cloud.tools.jib.json.JsonTemplate;
import com.google.cloud.tools.jib.json.JsonTemplateMapper;
import com.google.cloud.tools.jib.tar.TarStreamBuilder;
import com.google.common.collect.ImmutableSet;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.time.Instant;
import java.util.Collections;

/** Translates an {@link Image} to a tarball that can be loaded into Docker. */
public class ImageTarball {

  /** File name for the container configuration in the tarball. */
  private static final String CONTAINER_CONFIGURATION_JSON_FILE_NAME = "config.json";

  /** File name for the manifest in the tarball. */
  private static final String MANIFEST_JSON_FILE_NAME = "manifest.json";

  /** File name extension for the layer content files. */
  private static final String LAYER_FILE_EXTENSION = ".tar.gz";

  /** Time that entry is set in the tar. */
  private static final Instant TAR_ENTRY_MODIFICATION_TIME = Instant.EPOCH;

  private final Image image;
  private final ImageReference imageReference;
  private final ImmutableSet<String> allTargetImageTags;

  /**
   * Instantiate with an {@link Image}.
   *
   * @param image the image to convert into a tarball
   * @param imageReference image reference to set in the manifest (note that the tag portion of the
   *     image reference is ignored)
   * @param allTargetImageTags the tags to tag the image with
   */
  public ImageTarball(
      Image image, ImageReference imageReference, ImmutableSet<String> allTargetImageTags) {
    this.image = image;
    this.imageReference = imageReference;
    this.allTargetImageTags = allTargetImageTags;
  }

  /**
   * Writes image tar bar in configured {@link Image#getImageFormat()} of OCI or Docker to output
   * stream.
   *
   * @param out the target output stream
   * @throws IOException if an error occurs writing out the image to stream
   */