Repository: GoogleContainerTools/jib
File: jib-cli/src/main/java/com/google/cloud/tools/jib/cli/Jar.java (Java)

Code before:
      defaultValue = "Docker",
      paramLabel = "<image-format>",
      description =
          "Format of container, candidates: ${COMPLETION-CANDIDATES}, default: ${DEFAULT-VALUE}.")
  @SuppressWarnings("NullAway.Init") // initialized by picocli
  private ImageFormat format;

  @CommandLine.Option(
      names = "--program-args",
      paramLabel = "<program-arguments>",
      split = ",",
      description = "Program arguments for container entrypoint.")
  private List<String> programArguments = Collections.emptyList();

  @CommandLine.Option(
      names = "--entrypoint",
      paramLabel = "<entrypoint>",
      split = "\\s+",
      description =
          "Entrypoint for container. Overrides the default entrypoint, example: --entrypoint='custom entrypoint'")
  private List<String> entrypoint = Collections.emptyList();

  @CommandLine.Option(
      names = "--creation-time",
      paramLabel = "<creation-time>",
      description =
          "The creation time of the container in milliseconds since epoch or iso8601 format")
  @SuppressWarnings("NullAway.Init") // initialized by picocli
  private String creationTime;

  @Override
  public Integer call() {
    try {
      // Temporarily disable the command, but allow to proceed in tests.
      Class.forName("org.junit.Test");
    } catch (ClassNotFoundException ex) {
      throw new UnsupportedOperationException("jar command not implemented");
    }

    commonCliOptions.validate();
    SingleThreadedExecutor executor = new SingleThreadedExecutor();
    try {

      ConsoleLogger logger =
          CliLogger.newLogger(
              commonCliOptions.getVerbosity(),
              commonCliOptions.getConsoleOutput(),
              spec.commandLine().getOut(),
              spec.commandLine().getErr(),
              executor);


Review comment (suggestion):
Another option is to provide the default (e.g., 0?). That way, maybe `creationTime` can never be null?

Either way has pros and cons though.

Code after:
      defaultValue = "Docker",
      paramLabel = "<image-format>",
      description =
          "Format of container, candidates: ${COMPLETION-CANDIDATES}, default: ${DEFAULT-VALUE}.")
  @SuppressWarnings("NullAway.Init") // initialized by picocli
  private ImageFormat format;

  @CommandLine.Option(
      names = "--program-args",
      paramLabel = "<program-arguments>",
      split = ",",
      description = "Program arguments for container entrypoint.")
  private List<String> programArguments = Collections.emptyList();

  @CommandLine.Option(
      names = "--entrypoint",
      paramLabel = "<entrypoint>",
      split = "\\s+",
      description =
          "Entrypoint for container. Overrides the default entrypoint, example: --entrypoint='custom entrypoint'")
  private List<String> entrypoint = Collections.emptyList();

  @CommandLine.Option(
      names = "--creation-time",
      paramLabel = "<creation-time>",
      description =
          "The creation time of the container in milliseconds since epoch or iso8601 format. Overrides the default (1970-01-01T00:00:00Z)")
  @SuppressWarnings("NullAway.Init") // initialized by picocli
  private String creationTime;

  @Override
  public Integer call() {
    try {
      // Temporarily disable the command, but allow to proceed in tests.
      Class.forName("org.junit.Test");
    } catch (ClassNotFoundException ex) {
      throw new UnsupportedOperationException("jar command not implemented");
    }

    commonCliOptions.validate();
    SingleThreadedExecutor executor = new SingleThreadedExecutor();
    try {

      ConsoleLogger logger =
          CliLogger.newLogger(
              commonCliOptions.getVerbosity(),
              commonCliOptions.getConsoleOutput(),
              spec.commandLine().getOut(),
              spec.commandLine().getErr(),
              executor);