diff options
Diffstat (limited to 'java/com/google/gerrit/entities/ChangeMessage.java')
-rw-r--r-- | java/com/google/gerrit/entities/ChangeMessage.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/java/com/google/gerrit/entities/ChangeMessage.java b/java/com/google/gerrit/entities/ChangeMessage.java index cb56c31797..609b54c9ed 100644 --- a/java/com/google/gerrit/entities/ChangeMessage.java +++ b/java/com/google/gerrit/entities/ChangeMessage.java @@ -16,7 +16,7 @@ package com.google.gerrit.entities; import com.google.auto.value.AutoValue; import com.google.gerrit.common.Nullable; -import java.sql.Timestamp; +import java.time.Instant; import java.util.Objects; /** @@ -40,40 +40,40 @@ public final class ChangeMessage { public abstract String uuid(); } - protected Key key; + private Key key; /** Who wrote this comment; null if it was written by the Gerrit system. */ - @Nullable protected Account.Id author; + @Nullable private Account.Id author; /** When this comment was drafted. */ - protected Timestamp writtenOn; + private Instant writtenOn; /** * The text left by the user or Gerrit system in template form, that is free of Gerrit User * Identifiable Information and can be persisted in data storage. */ - @Nullable protected String message; + @Nullable private String message; /** Which patchset (if any) was this message generated from? */ - @Nullable protected PatchSet.Id patchset; + @Nullable private PatchSet.Id patchset; /** Tag associated with change message */ - @Nullable protected String tag; + @Nullable private String tag; /** Real user that added this message on behalf of the user recorded in {@link #author}. */ - @Nullable protected Account.Id realAuthor; + @Nullable private Account.Id realAuthor; - protected ChangeMessage() {} + private ChangeMessage() {} public static ChangeMessage create( - final ChangeMessage.Key k, @Nullable Account.Id a, Timestamp wo, @Nullable PatchSet.Id psid) { + final ChangeMessage.Key k, @Nullable Account.Id a, Instant wo, @Nullable PatchSet.Id psid) { return create(k, a, wo, psid, /*messageTemplate=*/ null, /*realAuthor=*/ null, /*tag=*/ null); } public static ChangeMessage create( final ChangeMessage.Key k, @Nullable Account.Id a, - Timestamp wo, + Instant wo, @Nullable PatchSet.Id psid, @Nullable String messageTemplate, @Nullable Account.Id realAuthor, @@ -103,7 +103,7 @@ public final class ChangeMessage { return realAuthor != null ? realAuthor : getAuthor(); } - public Timestamp getWrittenOn() { + public Instant getWrittenOn() { return writtenOn; } |