diff --git a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/AcceptanceTestRequestScope.java b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/AcceptanceTestRequestScope.java index 6ee7efad32..5f5da47577 100644 --- a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/AcceptanceTestRequestScope.java +++ b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/AcceptanceTestRequestScope.java @@ -15,6 +15,7 @@ package com.google.gerrit.acceptance; import com.google.common.collect.Maps; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.reviewdb.server.ReviewDb; import com.google.gerrit.server.CurrentUser; import com.google.gerrit.server.RequestCleanup; @@ -22,7 +23,6 @@ import com.google.gerrit.server.config.RequestScopedReviewDbProvider; import com.google.gerrit.server.util.RequestContext; import com.google.gerrit.server.util.ThreadLocalRequestContext; import com.google.gerrit.server.util.ThreadLocalRequestScopePropagator; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.SchemaFactory; import com.google.inject.Inject; import com.google.inject.Key; diff --git a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/AccountCreator.java b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/AccountCreator.java index a9a90874ff..016d959fe8 100644 --- a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/AccountCreator.java +++ b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/AccountCreator.java @@ -14,6 +14,7 @@ package com.google.gerrit.acceptance; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.reviewdb.client.Account; import com.google.gerrit.reviewdb.client.AccountExternalId; import com.google.gerrit.reviewdb.client.AccountGroup; @@ -24,7 +25,6 @@ import com.google.gerrit.server.account.AccountByEmailCache; import com.google.gerrit.server.account.AccountCache; import com.google.gerrit.server.account.GroupCache; import com.google.gerrit.server.ssh.SshKeyCache; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import com.google.gwtorm.server.SchemaFactory; diff --git a/gerrit-cache-h2/BUCK b/gerrit-cache-h2/BUCK index d3e8994a2f..c7a2221e23 100644 --- a/gerrit-cache-h2/BUCK +++ b/gerrit-cache-h2/BUCK @@ -2,6 +2,7 @@ java_library( name = 'cache-h2', srcs = glob(['src/main/java/**/*.java']), deps = [ + '//gerrit-common:server', '//gerrit-extension-api:api', '//gerrit-server:server', '//lib:guava', diff --git a/gerrit-cache-h2/src/main/java/com/google/gerrit/server/cache/h2/H2CacheImpl.java b/gerrit-cache-h2/src/main/java/com/google/gerrit/server/cache/h2/H2CacheImpl.java index 55639882f4..d58ac544be 100644 --- a/gerrit-cache-h2/src/main/java/com/google/gerrit/server/cache/h2/H2CacheImpl.java +++ b/gerrit-cache-h2/src/main/java/com/google/gerrit/server/cache/h2/H2CacheImpl.java @@ -11,8 +11,8 @@ import com.google.common.hash.BloomFilter; import com.google.common.hash.Funnel; import com.google.common.hash.Funnels; import com.google.common.hash.PrimitiveSink; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.server.cache.PersistentCache; -import com.google.gerrit.server.util.TimeUtil; import com.google.inject.TypeLiteral; import org.h2.jdbc.JdbcSQLException; diff --git a/gerrit-common/BUCK b/gerrit-common/BUCK index 981018dd2c..a719fef911 100644 --- a/gerrit-common/BUCK +++ b/gerrit-common/BUCK @@ -11,6 +11,7 @@ EXCLUDES = [ SRC + 'common/PluginData.java', SRC + 'common/FileUtil.java', SRC + 'common/IoUtil.java', + SRC + 'common/TimeUtil.java', ] java_library( @@ -49,6 +50,7 @@ java_library( '//lib:gwtorm', '//lib:guava', '//lib/jgit:jgit', + '//lib/joda:joda-time', ], visibility = ['PUBLIC'], ) diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/util/TimeUtil.java b/gerrit-common/src/main/java/com/google/gerrit/common/TimeUtil.java similarity index 96% rename from gerrit-server/src/main/java/com/google/gerrit/server/util/TimeUtil.java rename to gerrit-common/src/main/java/com/google/gerrit/common/TimeUtil.java index 2a68c49193..4274b5aa0b 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/util/TimeUtil.java +++ b/gerrit-common/src/main/java/com/google/gerrit/common/TimeUtil.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package com.google.gerrit.server.util; +package com.google.gerrit.common; import org.joda.time.DateTimeUtils; diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/HttpLogoutServlet.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/HttpLogoutServlet.java index 7e1aa28d7e..bb9bac4ad2 100644 --- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/HttpLogoutServlet.java +++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/HttpLogoutServlet.java @@ -18,12 +18,12 @@ import com.google.common.base.Strings; import com.google.gerrit.audit.AuditEvent; import com.google.gerrit.audit.AuditService; import com.google.gerrit.common.Nullable; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.extensions.registration.DynamicItem; import com.google.gerrit.server.CurrentUser; import com.google.gerrit.server.account.AccountManager; import com.google.gerrit.server.config.AuthConfig; import com.google.gerrit.server.config.CanonicalWebUrl; -import com.google.gerrit.server.util.TimeUtil; import com.google.inject.Inject; import com.google.inject.Provider; import com.google.inject.Singleton; diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/WebSessionManager.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/WebSessionManager.java index 24e2c56c09..5db620c834 100644 --- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/WebSessionManager.java +++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/WebSessionManager.java @@ -14,6 +14,7 @@ package com.google.gerrit.httpd; +import static com.google.gerrit.common.TimeUtil.nowMs; import static com.google.gerrit.httpd.CacheBasedWebSession.MAX_AGE_MINUTES; import static com.google.gerrit.server.ioutil.BasicSerialization.readFixInt64; import static com.google.gerrit.server.ioutil.BasicSerialization.readString; @@ -22,7 +23,6 @@ import static com.google.gerrit.server.ioutil.BasicSerialization.writeBytes; import static com.google.gerrit.server.ioutil.BasicSerialization.writeFixInt64; import static com.google.gerrit.server.ioutil.BasicSerialization.writeString; import static com.google.gerrit.server.ioutil.BasicSerialization.writeVarInt32; -import static com.google.gerrit.server.util.TimeUtil.nowMs; import static java.util.concurrent.TimeUnit.HOURS; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.MINUTES; diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/CatServlet.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/CatServlet.java index 9aec609bdd..ab89d98374 100644 --- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/CatServlet.java +++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/CatServlet.java @@ -14,6 +14,7 @@ package com.google.gerrit.httpd.raw; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.extensions.restapi.Url; import com.google.gerrit.reviewdb.client.Change; import com.google.gerrit.reviewdb.client.Patch; @@ -24,7 +25,6 @@ import com.google.gerrit.server.FileTypeRegistry; import com.google.gerrit.server.git.GitRepositoryManager; import com.google.gerrit.server.project.ChangeControl; import com.google.gerrit.server.project.NoSuchChangeException; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtexpui.server.CacheHeaders; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/restapi/RestApiServlet.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/restapi/RestApiServlet.java index 142194d72d..c41cab421a 100644 --- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/restapi/RestApiServlet.java +++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/restapi/RestApiServlet.java @@ -48,6 +48,7 @@ import com.google.common.net.HttpHeaders; import com.google.gerrit.audit.AuditService; import com.google.gerrit.audit.HttpAuditEvent; import com.google.gerrit.common.Nullable; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.extensions.registration.DynamicItem; import com.google.gerrit.extensions.registration.DynamicMap; import com.google.gerrit.extensions.restapi.AcceptsCreate; @@ -80,7 +81,6 @@ import com.google.gerrit.server.CurrentUser; import com.google.gerrit.server.OptionUtil; import com.google.gerrit.server.OutputFormat; import com.google.gerrit.server.account.CapabilityUtils; -import com.google.gerrit.server.util.TimeUtil; import com.google.gson.ExclusionStrategy; import com.google.gson.FieldAttributes; import com.google.gson.FieldNamingPolicy; diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/GerritJsonServlet.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/GerritJsonServlet.java index 32b4958575..2457fd2472 100644 --- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/GerritJsonServlet.java +++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/GerritJsonServlet.java @@ -18,6 +18,7 @@ import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; import com.google.gerrit.audit.AuditService; import com.google.gerrit.audit.RpcAuditEvent; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.audit.Audit; import com.google.gerrit.common.auth.SignInRequired; import com.google.gerrit.common.errors.NotSignedInException; @@ -25,7 +26,6 @@ import com.google.gerrit.extensions.registration.DynamicItem; import com.google.gerrit.httpd.WebSession; import com.google.gerrit.server.AccessPath; import com.google.gerrit.server.CurrentUser; -import com.google.gerrit.server.util.TimeUtil; import com.google.gson.GsonBuilder; import com.google.gwtjsonrpc.common.RemoteJsonService; import com.google.gwtjsonrpc.server.ActiveCall; diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/account/AccountSecurityImpl.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/account/AccountSecurityImpl.java index dfdfe9ddad..9bcffa851f 100644 --- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/account/AccountSecurityImpl.java +++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/account/AccountSecurityImpl.java @@ -17,6 +17,7 @@ package com.google.gerrit.httpd.rpc.account; import com.google.common.base.Strings; import com.google.gerrit.audit.AuditService; import com.google.gerrit.common.ChangeHooks; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.data.AccountSecurity; import com.google.gerrit.common.data.ContributorAgreement; import com.google.gerrit.common.errors.ContactInformationStoreException; @@ -43,7 +44,6 @@ import com.google.gerrit.server.account.Realm; import com.google.gerrit.server.contact.ContactStore; import com.google.gerrit.server.mail.EmailTokenVerifier; import com.google.gerrit.server.project.ProjectCache; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtjsonrpc.common.AsyncCallback; import com.google.gwtjsonrpc.common.VoidResult; import com.google.gwtorm.server.OrmException; diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/project/ReviewProjectAccess.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/project/ReviewProjectAccess.java index 51aa2c0cce..4180c70722 100644 --- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/project/ReviewProjectAccess.java +++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/project/ReviewProjectAccess.java @@ -16,6 +16,7 @@ package com.google.gerrit.httpd.rpc.project; import com.google.gerrit.common.ChangeHooks; import com.google.gerrit.common.Nullable; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.data.AccessSection; import com.google.gerrit.common.data.GlobalCapability; import com.google.gerrit.common.data.PermissionRule; @@ -46,7 +47,6 @@ import com.google.gerrit.server.patch.PatchSetInfoFactory; import com.google.gerrit.server.project.ProjectCache; import com.google.gerrit.server.project.ProjectControl; import com.google.gerrit.server.project.SetParent; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; import com.google.inject.Provider; diff --git a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/http/jetty/HttpLog.java b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/http/jetty/HttpLog.java index f84abcee5a..a326919b74 100644 --- a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/http/jetty/HttpLog.java +++ b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/http/jetty/HttpLog.java @@ -14,9 +14,9 @@ package com.google.gerrit.pgm.http.jetty; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.httpd.GetUserFilter; import com.google.gerrit.server.util.SystemLog; -import com.google.gerrit.server.util.TimeUtil; import com.google.inject.Inject; import org.apache.log4j.AsyncAppender; diff --git a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/http/jetty/JettyServer.java b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/http/jetty/JettyServer.java index 6cba526d02..a553363c66 100644 --- a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/http/jetty/JettyServer.java +++ b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/http/jetty/JettyServer.java @@ -23,6 +23,7 @@ import com.google.common.base.Strings; import com.google.common.escape.Escaper; import com.google.common.html.HtmlEscapers; import com.google.common.io.ByteStreams; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.extensions.events.LifecycleListener; import com.google.gerrit.launcher.GerritLauncher; import com.google.gerrit.pgm.http.jetty.HttpLog.HttpLogFactory; @@ -30,7 +31,6 @@ import com.google.gerrit.reviewdb.client.AuthType; import com.google.gerrit.server.config.ConfigUtil; import com.google.gerrit.server.config.GerritServerConfig; import com.google.gerrit.server.config.SitePaths; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtexpui.linker.server.UserAgentRule; import com.google.gwtexpui.server.CacheHeaders; import com.google.inject.Inject; diff --git a/gerrit-server/BUCK b/gerrit-server/BUCK index 139d6cfef3..3668dbd71a 100644 --- a/gerrit-server/BUCK +++ b/gerrit-server/BUCK @@ -130,6 +130,7 @@ java_library( srcs = PROLOG_TEST_CASE, deps = [ ':server', + '//gerrit-common:server', '//lib:junit', '//lib/guice:guice', '//lib/prolog:prolog-cafe', diff --git a/gerrit-server/src/main/java/com/google/gerrit/audit/AuditEvent.java b/gerrit-server/src/main/java/com/google/gerrit/audit/AuditEvent.java index 48197e2f76..f3eb0a01b5 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/audit/AuditEvent.java +++ b/gerrit-server/src/main/java/com/google/gerrit/audit/AuditEvent.java @@ -18,8 +18,8 @@ import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.server.CurrentUser; -import com.google.gerrit.server.util.TimeUtil; public class AuditEvent { diff --git a/gerrit-server/src/main/java/com/google/gerrit/rules/PrologCompiler.java b/gerrit-server/src/main/java/com/google/gerrit/rules/PrologCompiler.java index 7f6bff4d57..65c1c20479 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/rules/PrologCompiler.java +++ b/gerrit-server/src/main/java/com/google/gerrit/rules/PrologCompiler.java @@ -14,11 +14,11 @@ package com.google.gerrit.rules; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.Version; import com.google.gerrit.reviewdb.client.RefNames; import com.google.gerrit.server.config.GerritServerConfig; import com.google.gerrit.server.config.SitePaths; -import com.google.gerrit.server.util.TimeUtil; import com.google.inject.Inject; import com.google.inject.assistedinject.Assisted; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/ApprovalsUtil.java b/gerrit-server/src/main/java/com/google/gerrit/server/ApprovalsUtil.java index d50736028a..b4166ca13f 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/ApprovalsUtil.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/ApprovalsUtil.java @@ -30,6 +30,7 @@ import com.google.common.collect.Lists; import com.google.common.collect.Ordering; import com.google.common.collect.SetMultimap; import com.google.common.collect.Sets; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.data.LabelType; import com.google.gerrit.common.data.LabelTypes; import com.google.gerrit.common.data.Permission; @@ -46,7 +47,6 @@ import com.google.gerrit.server.notedb.ChangeUpdate; import com.google.gerrit.server.notedb.NotesMigration; import com.google.gerrit.server.notedb.ReviewerState; import com.google.gerrit.server.project.ChangeControl; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; import com.google.inject.Singleton; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/ChangeUtil.java b/gerrit-server/src/main/java/com/google/gerrit/server/ChangeUtil.java index bf1f869fbd..a5ed1d8761 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/ChangeUtil.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/ChangeUtil.java @@ -22,6 +22,7 @@ import static java.util.concurrent.TimeUnit.SECONDS; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.errors.EmailException; import com.google.gerrit.extensions.restapi.ResourceNotFoundException; import com.google.gerrit.reviewdb.client.Change; @@ -49,7 +50,6 @@ import com.google.gerrit.server.project.RefControl; import com.google.gerrit.server.ssh.SshInfo; import com.google.gerrit.server.util.IdGenerator; import com.google.gerrit.server.util.MagicBranch; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmConcurrencyException; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/account/AccountCacheImpl.java b/gerrit-server/src/main/java/com/google/gerrit/server/account/AccountCacheImpl.java index a521840bfd..c64eba7ced 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/account/AccountCacheImpl.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/account/AccountCacheImpl.java @@ -18,13 +18,13 @@ import com.google.common.base.Optional; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; import com.google.common.collect.ImmutableSet; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.reviewdb.client.Account; import com.google.gerrit.reviewdb.client.AccountExternalId; import com.google.gerrit.reviewdb.client.AccountGroup; import com.google.gerrit.reviewdb.client.AccountGroupMember; import com.google.gerrit.reviewdb.server.ReviewDb; import com.google.gerrit.server.cache.CacheModule; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import com.google.gwtorm.server.SchemaFactory; import com.google.inject.Inject; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/account/AccountManager.java b/gerrit-server/src/main/java/com/google/gerrit/server/account/AccountManager.java index e31e2e6bcb..be85a26fd8 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/account/AccountManager.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/account/AccountManager.java @@ -15,6 +15,7 @@ package com.google.gerrit.server.account; import com.google.gerrit.audit.AuditService; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.data.AccessSection; import com.google.gerrit.common.data.GlobalCapability; import com.google.gerrit.common.data.Permission; @@ -27,7 +28,6 @@ import com.google.gerrit.reviewdb.client.AccountGroupMember; import com.google.gerrit.reviewdb.server.ReviewDb; import com.google.gerrit.server.IdentifiedUser; import com.google.gerrit.server.project.ProjectCache; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import com.google.gwtorm.server.SchemaFactory; import com.google.inject.Inject; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/account/CreateAccount.java b/gerrit-server/src/main/java/com/google/gerrit/server/account/CreateAccount.java index 7537c7090b..53dec1b701 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/account/CreateAccount.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/account/CreateAccount.java @@ -16,6 +16,7 @@ package com.google.gerrit.server.account; import com.google.common.collect.Sets; import com.google.gerrit.audit.AuditService; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.data.GlobalCapability; import com.google.gerrit.common.data.GroupDescriptions; import com.google.gerrit.common.errors.InvalidSshKeyException; @@ -37,7 +38,6 @@ import com.google.gerrit.server.IdentifiedUser; import com.google.gerrit.server.account.CreateAccount.Input; import com.google.gerrit.server.group.GroupsCollection; import com.google.gerrit.server.ssh.SshKeyCache; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmDuplicateKeyException; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/CherryPickChange.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/CherryPickChange.java index 158f569a19..bd1d1bd94a 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/CherryPickChange.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/CherryPickChange.java @@ -14,6 +14,7 @@ package com.google.gerrit.server.change; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.errors.EmailException; import com.google.gerrit.reviewdb.client.Branch; import com.google.gerrit.reviewdb.client.Change; @@ -39,7 +40,6 @@ import com.google.gerrit.server.project.NoSuchChangeException; import com.google.gerrit.server.project.ProjectState; import com.google.gerrit.server.project.RefControl; import com.google.gerrit.server.ssh.NoSshInfo; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; import com.google.inject.Provider; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/CreateChange.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/CreateChange.java index 8772335291..3f527c9213 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/CreateChange.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/CreateChange.java @@ -16,6 +16,7 @@ package com.google.gerrit.server.change; import com.google.common.base.Strings; import com.google.common.collect.Iterables; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.data.Capable; import com.google.gerrit.extensions.common.ChangeInfo; import com.google.gerrit.extensions.common.ChangeStatus; @@ -46,7 +47,6 @@ import com.google.gerrit.server.project.ProjectResource; import com.google.gerrit.server.project.ProjectsCollection; import com.google.gerrit.server.project.RefControl; import com.google.gerrit.server.ssh.NoSshInfo; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; import com.google.inject.Provider; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/CreateDraft.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/CreateDraft.java index b025e65471..1cd39bebbd 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/CreateDraft.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/CreateDraft.java @@ -17,6 +17,7 @@ package com.google.gerrit.server.change; import static com.google.gerrit.server.PatchLineCommentsUtil.setCommentRevId; import com.google.common.base.Strings; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.changes.Side; import com.google.gerrit.extensions.restapi.BadRequestException; import com.google.gerrit.extensions.restapi.Response; @@ -30,7 +31,6 @@ import com.google.gerrit.server.PatchLineCommentsUtil; import com.google.gerrit.server.change.PutDraft.Input; import com.google.gerrit.server.notedb.ChangeUpdate; import com.google.gerrit.server.patch.PatchListCache; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; import com.google.inject.Provider; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/DeleteReviewer.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/DeleteReviewer.java index e64d3f46ea..d9512eb5ab 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/DeleteReviewer.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/DeleteReviewer.java @@ -17,6 +17,7 @@ package com.google.gerrit.server.change; import com.google.common.base.Predicate; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.extensions.restapi.AuthException; import com.google.gerrit.extensions.restapi.ResourceNotFoundException; import com.google.gerrit.extensions.restapi.Response; @@ -34,7 +35,6 @@ import com.google.gerrit.server.change.DeleteReviewer.Input; import com.google.gerrit.server.index.ChangeIndexer; import com.google.gerrit.server.notedb.ChangeUpdate; import com.google.gerrit.server.project.ChangeControl; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; import com.google.inject.Provider; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/EditMessage.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/EditMessage.java index af8162746f..de7669f38d 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/EditMessage.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/EditMessage.java @@ -15,6 +15,7 @@ package com.google.gerrit.server.change; import com.google.common.base.Strings; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.errors.EmailException; import com.google.gerrit.extensions.restapi.BadRequestException; import com.google.gerrit.extensions.restapi.DefaultInput; @@ -30,7 +31,6 @@ import com.google.gerrit.server.change.EditMessage.Input; import com.google.gerrit.server.patch.PatchSetInfoNotAvailableException; import com.google.gerrit.server.project.InvalidChangeOperationException; import com.google.gerrit.server.project.NoSuchChangeException; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; import com.google.inject.Singleton; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/PatchSetInserter.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/PatchSetInserter.java index ab9244c43d..d5d1f26c8d 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/PatchSetInserter.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/PatchSetInserter.java @@ -19,6 +19,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.collect.SetMultimap; import com.google.gerrit.common.ChangeHooks; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.reviewdb.client.Account; import com.google.gerrit.reviewdb.client.Change; import com.google.gerrit.reviewdb.client.ChangeMessage; @@ -45,7 +46,6 @@ import com.google.gerrit.server.project.InvalidChangeOperationException; import com.google.gerrit.server.project.NoSuchChangeException; import com.google.gerrit.server.ssh.NoSshInfo; import com.google.gerrit.server.ssh.SshInfo; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.AtomicUpdate; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java index 2a4d7ca89e..971417432c 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java @@ -25,6 +25,7 @@ import com.google.common.collect.Sets; import com.google.common.util.concurrent.CheckedFuture; import com.google.common.util.concurrent.Futures; import com.google.gerrit.common.ChangeHooks; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.data.LabelType; import com.google.gerrit.common.data.LabelTypes; import com.google.gerrit.common.data.Permission; @@ -58,7 +59,6 @@ import com.google.gerrit.server.patch.PatchListCache; import com.google.gerrit.server.project.ChangeControl; import com.google.gerrit.server.query.change.ChangeData; import com.google.gerrit.server.util.LabelVote; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; import com.google.inject.Provider; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/PutDraft.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/PutDraft.java index a3b0614eab..949c0c6b61 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/PutDraft.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/PutDraft.java @@ -16,6 +16,7 @@ package com.google.gerrit.server.change; import static com.google.gerrit.server.PatchLineCommentsUtil.setCommentRevId; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.changes.Side; import com.google.gerrit.extensions.restapi.BadRequestException; import com.google.gerrit.extensions.restapi.DefaultInput; @@ -30,7 +31,6 @@ import com.google.gerrit.server.PatchLineCommentsUtil; import com.google.gerrit.server.change.PutDraft.Input; import com.google.gerrit.server.notedb.ChangeUpdate; import com.google.gerrit.server.patch.PatchListCache; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; import com.google.inject.Provider; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/PutTopic.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/PutTopic.java index 47bb485dd6..d171785719 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/PutTopic.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/PutTopic.java @@ -16,6 +16,7 @@ package com.google.gerrit.server.change; import com.google.common.base.Strings; import com.google.gerrit.common.ChangeHooks; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.extensions.restapi.AuthException; import com.google.gerrit.extensions.restapi.DefaultInput; import com.google.gerrit.extensions.restapi.Response; @@ -31,7 +32,6 @@ import com.google.gerrit.server.change.PutTopic.Input; import com.google.gerrit.server.index.ChangeIndexer; import com.google.gerrit.server.notedb.ChangeUpdate; import com.google.gerrit.server.project.ChangeControl; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.AtomicUpdate; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/Revert.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/Revert.java index 326c8721d9..75b80e7f14 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/Revert.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/Revert.java @@ -15,6 +15,7 @@ package com.google.gerrit.server.change; import com.google.common.base.Strings; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.errors.EmailException; import com.google.gerrit.extensions.api.changes.RevertInput; import com.google.gerrit.extensions.restapi.AuthException; @@ -32,7 +33,6 @@ import com.google.gerrit.server.project.ChangeControl; import com.google.gerrit.server.project.InvalidChangeOperationException; import com.google.gerrit.server.project.NoSuchChangeException; import com.google.gerrit.server.ssh.NoSshInfo; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; import com.google.inject.Singleton; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/Submit.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/Submit.java index 717c045722..6094bf71d9 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/Submit.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/Submit.java @@ -27,6 +27,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; import com.google.common.collect.Maps; import com.google.common.collect.Table; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.data.ParameterizedString; import com.google.gerrit.common.data.SubmitRecord; import com.google.gerrit.extensions.api.changes.SubmitInput; @@ -59,7 +60,6 @@ import com.google.gerrit.server.git.VersionedMetaData.BatchMetaDataUpdate; import com.google.gerrit.server.index.ChangeIndexer; import com.google.gerrit.server.notedb.ChangeUpdate; import com.google.gerrit.server.project.ChangeControl; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.AtomicUpdate; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/changedetail/RebaseChange.java b/gerrit-server/src/main/java/com/google/gerrit/server/changedetail/RebaseChange.java index 11e59384de..1e9f94a72e 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/changedetail/RebaseChange.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/changedetail/RebaseChange.java @@ -14,6 +14,7 @@ package com.google.gerrit.server.changedetail; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.errors.EmailException; import com.google.gerrit.reviewdb.client.Branch; import com.google.gerrit.reviewdb.client.Change; @@ -34,7 +35,6 @@ import com.google.gerrit.server.git.MergeUtil; import com.google.gerrit.server.project.ChangeControl; import com.google.gerrit.server.project.InvalidChangeOperationException; import com.google.gerrit.server.project.NoSuchChangeException; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; import com.google.inject.Provider; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/contact/EncryptedContactStore.java b/gerrit-server/src/main/java/com/google/gerrit/server/contact/EncryptedContactStore.java index 8c1fdb6b79..aca91ab51d 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/contact/EncryptedContactStore.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/contact/EncryptedContactStore.java @@ -14,13 +14,13 @@ package com.google.gerrit.server.contact; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.errors.ContactInformationStoreException; import com.google.gerrit.reviewdb.client.Account; import com.google.gerrit.reviewdb.client.AccountExternalId; import com.google.gerrit.reviewdb.client.ContactInformation; import com.google.gerrit.reviewdb.server.ReviewDb; import com.google.gerrit.server.UrlEncoded; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import com.google.gwtorm.server.SchemaFactory; import com.google.inject.ProvisionException; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/edit/ChangeEditModifier.java b/gerrit-server/src/main/java/com/google/gerrit/server/edit/ChangeEditModifier.java index 061ac48810..91bf65d9b7 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/edit/ChangeEditModifier.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/edit/ChangeEditModifier.java @@ -17,6 +17,7 @@ package com.google.gerrit.server.edit; import static com.google.gerrit.server.edit.ChangeEditUtil.editRefName; import static com.google.gerrit.server.edit.ChangeEditUtil.editRefPrefix; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.extensions.restapi.AuthException; import com.google.gerrit.extensions.restapi.ResourceConflictException; import com.google.gerrit.reviewdb.client.Change; @@ -27,7 +28,6 @@ import com.google.gerrit.server.GerritPersonIdent; import com.google.gerrit.server.IdentifiedUser; import com.google.gerrit.server.git.GitRepositoryManager; import com.google.gerrit.server.project.InvalidChangeOperationException; -import com.google.gerrit.server.util.TimeUtil; import com.google.inject.Inject; import com.google.inject.Provider; import com.google.inject.Singleton; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/edit/ChangeEditUtil.java b/gerrit-server/src/main/java/com/google/gerrit/server/edit/ChangeEditUtil.java index 3767b3298b..5abb2e235c 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/edit/ChangeEditUtil.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/edit/ChangeEditUtil.java @@ -18,6 +18,7 @@ import static com.google.common.base.Preconditions.checkArgument; import com.google.common.base.Optional; import com.google.common.collect.Iterables; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.extensions.restapi.AuthException; import com.google.gerrit.extensions.restapi.ResourceConflictException; import com.google.gerrit.reviewdb.client.Account; @@ -34,7 +35,6 @@ import com.google.gerrit.server.git.GitRepositoryManager; import com.google.gerrit.server.project.ChangeControl; import com.google.gerrit.server.project.InvalidChangeOperationException; import com.google.gerrit.server.project.NoSuchChangeException; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; import com.google.inject.Provider; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/ChangeMergeQueue.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/ChangeMergeQueue.java index e386bc562e..be3902cf29 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/ChangeMergeQueue.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/ChangeMergeQueue.java @@ -17,6 +17,7 @@ package com.google.gerrit.server.git; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.reviewdb.client.Branch; import com.google.gerrit.reviewdb.client.Project; import com.google.gerrit.reviewdb.server.ReviewDb; @@ -27,7 +28,6 @@ import com.google.gerrit.server.config.RequestScopedReviewDbProvider; import com.google.gerrit.server.ssh.SshInfo; import com.google.gerrit.server.util.RequestContext; import com.google.gerrit.server.util.RequestScopePropagator; -import com.google.gerrit.server.util.TimeUtil; import com.google.inject.AbstractModule; import com.google.inject.Inject; import com.google.inject.Injector; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/MergeOp.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/MergeOp.java index 8eb0bbbd82..6aec50f034 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/MergeOp.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/MergeOp.java @@ -28,6 +28,7 @@ import com.google.common.collect.Lists; import com.google.common.util.concurrent.CheckedFuture; import com.google.gerrit.common.ChangeHooks; import com.google.gerrit.common.Nullable; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.data.Capable; import com.google.gerrit.common.data.SubmitTypeRecord; import com.google.gerrit.extensions.common.SubmitType; @@ -64,7 +65,6 @@ import com.google.gerrit.server.project.NoSuchProjectException; import com.google.gerrit.server.project.ProjectCache; import com.google.gerrit.server.project.ProjectState; import com.google.gerrit.server.util.RequestScopePropagator; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.AtomicUpdate; import com.google.gwtorm.server.OrmException; import com.google.gwtorm.server.SchemaFactory; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java index c805bb8f0d..12800dcc77 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java @@ -52,6 +52,7 @@ import com.google.common.util.concurrent.ListeningExecutorService; import com.google.gerrit.common.ChangeHookRunner.HookResult; import com.google.gerrit.common.ChangeHooks; import com.google.gerrit.common.Nullable; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.data.Capable; import com.google.gerrit.common.data.LabelType; import com.google.gerrit.common.data.LabelTypes; @@ -115,7 +116,6 @@ import com.google.gerrit.server.ssh.SshInfo; import com.google.gerrit.server.util.LabelVote; import com.google.gerrit.server.util.MagicBranch; import com.google.gerrit.server.util.RequestScopePropagator; -import com.google.gerrit.server.util.TimeUtil; import com.google.gerrit.util.cli.CmdLineParser; import com.google.gwtorm.server.AtomicUpdate; import com.google.gwtorm.server.OrmException; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/strategy/CherryPick.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/strategy/CherryPick.java index c1ae440c42..6913f77138 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/strategy/CherryPick.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/strategy/CherryPick.java @@ -15,6 +15,7 @@ package com.google.gerrit.server.git.strategy; import com.google.common.collect.Lists; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.reviewdb.client.Change; import com.google.gerrit.reviewdb.client.PatchSet; import com.google.gerrit.reviewdb.client.PatchSetAncestor; @@ -31,7 +32,6 @@ import com.google.gerrit.server.git.MergeException; import com.google.gerrit.server.git.MergeIdenticalTreeException; import com.google.gerrit.server.patch.PatchSetInfoFactory; import com.google.gerrit.server.project.NoSuchChangeException; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import org.eclipse.jgit.lib.ObjectId; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/group/DbGroupMemberAuditListener.java b/gerrit-server/src/main/java/com/google/gerrit/server/group/DbGroupMemberAuditListener.java index b921224435..afc0d84c98 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/group/DbGroupMemberAuditListener.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/group/DbGroupMemberAuditListener.java @@ -17,6 +17,7 @@ package com.google.gerrit.server.group; import com.google.common.base.Joiner; import com.google.common.collect.Lists; import com.google.gerrit.audit.GroupMemberAuditListener; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.reviewdb.client.Account; import com.google.gerrit.reviewdb.client.AccountGroup; import com.google.gerrit.reviewdb.client.AccountGroupById; @@ -27,7 +28,6 @@ import com.google.gerrit.reviewdb.server.ReviewDb; import com.google.gerrit.server.account.AccountCache; import com.google.gerrit.server.account.GroupCache; import com.google.gerrit.server.account.UniversalGroupBackend; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; import com.google.inject.Provider; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/mail/SmtpEmailSender.java b/gerrit-server/src/main/java/com/google/gerrit/server/mail/SmtpEmailSender.java index b1c5955bd4..c54ca4cc0c 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/mail/SmtpEmailSender.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/mail/SmtpEmailSender.java @@ -15,11 +15,11 @@ package com.google.gerrit.server.mail; import com.google.common.primitives.Ints; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.Version; import com.google.gerrit.common.errors.EmailException; import com.google.gerrit.server.config.ConfigUtil; import com.google.gerrit.server.config.GerritServerConfig; -import com.google.gerrit.server.util.TimeUtil; import com.google.inject.AbstractModule; import com.google.inject.Inject; import com.google.inject.Singleton; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/plugins/PluginCleanerTask.java b/gerrit-server/src/main/java/com/google/gerrit/server/plugins/PluginCleanerTask.java index 606d5daa7e..c13c5337ca 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/plugins/PluginCleanerTask.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/plugins/PluginCleanerTask.java @@ -14,8 +14,8 @@ package com.google.gerrit.server.plugins; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.server.git.WorkQueue; -import com.google.gerrit.server.util.TimeUtil; import com.google.inject.Inject; import com.google.inject.Singleton; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/query/change/AgePredicate.java b/gerrit-server/src/main/java/com/google/gerrit/server/query/change/AgePredicate.java index 1894596afe..cbce335b91 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/query/change/AgePredicate.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/query/change/AgePredicate.java @@ -17,11 +17,11 @@ package com.google.gerrit.server.query.change; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.reviewdb.client.Change; import com.google.gerrit.server.config.ConfigUtil; import com.google.gerrit.server.index.Schema; import com.google.gerrit.server.index.TimestampRangePredicate; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import java.sql.Timestamp; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/query/change/QueryProcessor.java b/gerrit-server/src/main/java/com/google/gerrit/server/query/change/QueryProcessor.java index d32d4b61f9..b2560dead0 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/query/change/QueryProcessor.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/query/change/QueryProcessor.java @@ -17,6 +17,7 @@ package com.google.gerrit.server.query.change; import com.google.common.base.MoreObjects; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.data.GlobalCapability; import com.google.gerrit.common.data.LabelTypes; import com.google.gerrit.common.data.SubmitRecord; @@ -32,7 +33,6 @@ import com.google.gerrit.server.project.ChangeControl; import com.google.gerrit.server.project.NoSuchChangeException; import com.google.gerrit.server.query.Predicate; import com.google.gerrit.server.query.QueryParseException; -import com.google.gerrit.server.util.TimeUtil; import com.google.gson.Gson; import com.google.gwtorm.server.OrmException; import com.google.gwtorm.server.ResultSet; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/schema/Schema_65.java b/gerrit-server/src/main/java/com/google/gerrit/server/schema/Schema_65.java index 636e0c6563..f3f8bfe426 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/schema/Schema_65.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/schema/Schema_65.java @@ -17,6 +17,7 @@ package com.google.gerrit.server.schema; import com.google.common.base.Strings; import com.google.common.collect.Lists; import com.google.common.collect.Maps; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.data.AccessSection; import com.google.gerrit.common.data.ContributorAgreement; import com.google.gerrit.common.data.GlobalCapability; @@ -38,7 +39,6 @@ import com.google.gerrit.server.git.GitRepositoryManager; import com.google.gerrit.server.git.MetaDataUpdate; import com.google.gerrit.server.git.ProjectConfig; import com.google.gerrit.server.git.VersionedMetaData.BatchMetaDataUpdate; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.jdbc.JdbcSchema; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; diff --git a/gerrit-server/src/test/java/com/google/gerrit/rules/GerritCommonTest.java b/gerrit-server/src/test/java/com/google/gerrit/rules/GerritCommonTest.java index 1ed35bed7f..8e1ab8fd10 100644 --- a/gerrit-server/src/test/java/com/google/gerrit/rules/GerritCommonTest.java +++ b/gerrit-server/src/test/java/com/google/gerrit/rules/GerritCommonTest.java @@ -19,6 +19,7 @@ import static com.google.gerrit.server.project.Util.allow; import static com.google.gerrit.server.project.Util.category; import static com.google.gerrit.server.project.Util.value; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.data.LabelType; import com.google.gerrit.reviewdb.client.Account; import com.google.gerrit.reviewdb.client.Branch; @@ -27,7 +28,6 @@ import com.google.gerrit.reviewdb.client.Project; import com.google.gerrit.server.git.ProjectConfig; import com.google.gerrit.server.group.SystemGroupBackend; import com.google.gerrit.server.project.Util; -import com.google.gerrit.server.util.TimeUtil; import com.google.gerrit.testutil.InMemoryRepositoryManager; import com.google.inject.AbstractModule; diff --git a/gerrit-server/src/test/java/com/google/gerrit/rules/PrologTestCase.java b/gerrit-server/src/test/java/com/google/gerrit/rules/PrologTestCase.java index 1c0f8aecde..1bc78f80af 100644 --- a/gerrit-server/src/test/java/com/google/gerrit/rules/PrologTestCase.java +++ b/gerrit-server/src/test/java/com/google/gerrit/rules/PrologTestCase.java @@ -18,7 +18,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import com.google.gerrit.server.util.TimeUtil; +import com.google.gerrit.common.TimeUtil; import com.google.inject.Guice; import com.google.inject.Module; diff --git a/gerrit-server/src/test/java/com/google/gerrit/server/change/CommentsTest.java b/gerrit-server/src/test/java/com/google/gerrit/server/change/CommentsTest.java index 0265d9dc3b..0f0cc971a4 100644 --- a/gerrit-server/src/test/java/com/google/gerrit/server/change/CommentsTest.java +++ b/gerrit-server/src/test/java/com/google/gerrit/server/change/CommentsTest.java @@ -26,6 +26,7 @@ import static org.junit.Assert.fail; import com.google.common.base.MoreObjects; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.changes.Side; import com.google.gerrit.extensions.registration.DynamicMap; import com.google.gerrit.extensions.restapi.IdString; @@ -65,7 +66,6 @@ import com.google.gerrit.server.notedb.ChangeUpdate; import com.google.gerrit.server.notedb.NotesMigration; import com.google.gerrit.server.project.ChangeControl; import com.google.gerrit.server.project.ProjectCache; -import com.google.gerrit.server.util.TimeUtil; import com.google.gerrit.testutil.ConfigSuite; import com.google.gerrit.testutil.FakeAccountCache; import com.google.gerrit.testutil.InMemoryRepositoryManager; diff --git a/gerrit-server/src/test/java/com/google/gerrit/server/git/LabelNormalizerTest.java b/gerrit-server/src/test/java/com/google/gerrit/server/git/LabelNormalizerTest.java index 40088e9506..821ca33100 100644 --- a/gerrit-server/src/test/java/com/google/gerrit/server/git/LabelNormalizerTest.java +++ b/gerrit-server/src/test/java/com/google/gerrit/server/git/LabelNormalizerTest.java @@ -22,6 +22,7 @@ import static com.google.gerrit.server.project.Util.value; import static org.junit.Assert.assertEquals; import com.google.common.collect.ImmutableList; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.data.AccessSection; import com.google.gerrit.common.data.LabelType; import com.google.gerrit.lifecycle.LifecycleManager; @@ -41,7 +42,6 @@ import com.google.gerrit.server.config.AllProjectsName; import com.google.gerrit.server.git.LabelNormalizer.Result; import com.google.gerrit.server.project.ProjectCache; import com.google.gerrit.server.schema.SchemaCreator; -import com.google.gerrit.server.util.TimeUtil; import com.google.gerrit.testutil.InMemoryDatabase; import com.google.gerrit.testutil.InMemoryModule; import com.google.inject.Guice; diff --git a/gerrit-server/src/test/java/com/google/gerrit/server/git/SubmoduleOpTest.java b/gerrit-server/src/test/java/com/google/gerrit/server/git/SubmoduleOpTest.java index 0fe246ee46..5e10e66450 100644 --- a/gerrit-server/src/test/java/com/google/gerrit/server/git/SubmoduleOpTest.java +++ b/gerrit-server/src/test/java/com/google/gerrit/server/git/SubmoduleOpTest.java @@ -24,6 +24,7 @@ import static org.easymock.EasyMock.verify; import static org.junit.Assert.assertEquals; import com.google.gerrit.common.ChangeHooks; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.reviewdb.client.Account; import com.google.gerrit.reviewdb.client.Branch; import com.google.gerrit.reviewdb.client.Change; @@ -32,7 +33,6 @@ import com.google.gerrit.reviewdb.client.SubmoduleSubscription; import com.google.gerrit.reviewdb.server.ReviewDb; import com.google.gerrit.reviewdb.server.SubmoduleSubscriptionAccess; import com.google.gerrit.server.extensions.events.GitReferenceUpdated; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.client.KeyUtil; import com.google.gwtorm.server.ListResultSet; import com.google.gwtorm.server.ResultSet; diff --git a/gerrit-server/src/test/java/com/google/gerrit/server/mail/FromAddressGeneratorProviderTest.java b/gerrit-server/src/test/java/com/google/gerrit/server/mail/FromAddressGeneratorProviderTest.java index 4f20b63f10..f33f720c5c 100644 --- a/gerrit-server/src/test/java/com/google/gerrit/server/mail/FromAddressGeneratorProviderTest.java +++ b/gerrit-server/src/test/java/com/google/gerrit/server/mail/FromAddressGeneratorProviderTest.java @@ -23,12 +23,12 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.reviewdb.client.Account; import com.google.gerrit.reviewdb.client.AccountExternalId; import com.google.gerrit.reviewdb.client.AccountGroup; import com.google.gerrit.server.account.AccountCache; import com.google.gerrit.server.account.AccountState; -import com.google.gerrit.server.util.TimeUtil; import org.eclipse.jgit.lib.Config; import org.eclipse.jgit.lib.PersonIdent; diff --git a/gerrit-server/src/test/java/com/google/gerrit/server/notedb/AbstractChangeNotesTest.java b/gerrit-server/src/test/java/com/google/gerrit/server/notedb/AbstractChangeNotesTest.java index 635ccbd9d0..f73c1c2df8 100644 --- a/gerrit-server/src/test/java/com/google/gerrit/server/notedb/AbstractChangeNotesTest.java +++ b/gerrit-server/src/test/java/com/google/gerrit/server/notedb/AbstractChangeNotesTest.java @@ -19,6 +19,7 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; import com.google.common.collect.ImmutableList; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.data.SubmitRecord; import com.google.gerrit.reviewdb.client.Account; import com.google.gerrit.reviewdb.client.Change; @@ -46,7 +47,6 @@ import com.google.gerrit.server.git.GitModule; import com.google.gerrit.server.git.GitRepositoryManager; import com.google.gerrit.server.group.SystemGroupBackend; import com.google.gerrit.server.project.ProjectCache; -import com.google.gerrit.server.util.TimeUtil; import com.google.gerrit.testutil.FakeAccountCache; import com.google.gerrit.testutil.FakeRealm; import com.google.gerrit.testutil.InMemoryRepositoryManager; diff --git a/gerrit-server/src/test/java/com/google/gerrit/server/notedb/ChangeNotesParserTest.java b/gerrit-server/src/test/java/com/google/gerrit/server/notedb/ChangeNotesParserTest.java index 32f455d31e..53d9fb1c99 100644 --- a/gerrit-server/src/test/java/com/google/gerrit/server/notedb/ChangeNotesParserTest.java +++ b/gerrit-server/src/test/java/com/google/gerrit/server/notedb/ChangeNotesParserTest.java @@ -16,7 +16,7 @@ package com.google.gerrit.server.notedb; import static org.junit.Assert.fail; -import com.google.gerrit.server.util.TimeUtil; +import com.google.gerrit.common.TimeUtil; import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository; diff --git a/gerrit-server/src/test/java/com/google/gerrit/server/notedb/ChangeNotesTest.java b/gerrit-server/src/test/java/com/google/gerrit/server/notedb/ChangeNotesTest.java index d043407dd1..c2a46cec85 100644 --- a/gerrit-server/src/test/java/com/google/gerrit/server/notedb/ChangeNotesTest.java +++ b/gerrit-server/src/test/java/com/google/gerrit/server/notedb/ChangeNotesTest.java @@ -31,6 +31,7 @@ import com.google.common.collect.LinkedListMultimap; import com.google.common.collect.ListMultimap; import com.google.common.collect.Lists; import com.google.common.collect.Multimap; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.data.SubmitRecord; import com.google.gerrit.reviewdb.client.Account; import com.google.gerrit.reviewdb.client.Change; @@ -41,7 +42,6 @@ import com.google.gerrit.reviewdb.client.PatchLineComment.Status; import com.google.gerrit.reviewdb.client.PatchSet; import com.google.gerrit.reviewdb.client.PatchSetApproval; import com.google.gerrit.server.git.VersionedMetaData.BatchMetaDataUpdate; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import org.eclipse.jgit.lib.BatchRefUpdate; diff --git a/gerrit-server/src/test/java/com/google/gerrit/server/notedb/CommitMessageOutputTest.java b/gerrit-server/src/test/java/com/google/gerrit/server/notedb/CommitMessageOutputTest.java index 900084f589..eef6456775 100644 --- a/gerrit-server/src/test/java/com/google/gerrit/server/notedb/CommitMessageOutputTest.java +++ b/gerrit-server/src/test/java/com/google/gerrit/server/notedb/CommitMessageOutputTest.java @@ -19,9 +19,9 @@ import static com.google.gerrit.server.notedb.ReviewerState.REVIEWER; import static org.junit.Assert.assertEquals; import com.google.common.collect.ImmutableList; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.reviewdb.client.Account; import com.google.gerrit.reviewdb.client.Change; -import com.google.gerrit.server.util.TimeUtil; import com.google.gerrit.testutil.TestChanges; import org.eclipse.jgit.lib.ObjectId; diff --git a/gerrit-server/src/test/java/com/google/gerrit/server/query/change/AbstractQueryChangesTest.java b/gerrit-server/src/test/java/com/google/gerrit/server/query/change/AbstractQueryChangesTest.java index a81112235d..4d87471f9c 100644 --- a/gerrit-server/src/test/java/com/google/gerrit/server/query/change/AbstractQueryChangesTest.java +++ b/gerrit-server/src/test/java/com/google/gerrit/server/query/change/AbstractQueryChangesTest.java @@ -30,6 +30,7 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; import com.google.common.hash.Hashing; import com.google.gerrit.common.Nullable; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.extensions.api.GerritApi; import com.google.gerrit.extensions.api.changes.HashtagsInput; import com.google.gerrit.extensions.api.changes.ReviewInput; @@ -58,7 +59,6 @@ import com.google.gerrit.server.project.ProjectControl; import com.google.gerrit.server.schema.SchemaCreator; import com.google.gerrit.server.util.RequestContext; import com.google.gerrit.server.util.ThreadLocalRequestContext; -import com.google.gerrit.server.util.TimeUtil; import com.google.gerrit.testutil.ConfigSuite; import com.google.gerrit.testutil.InMemoryDatabase; import com.google.gerrit.testutil.InMemoryRepositoryManager; diff --git a/gerrit-server/src/test/java/com/google/gerrit/testutil/FakeAccountCache.java b/gerrit-server/src/test/java/com/google/gerrit/testutil/FakeAccountCache.java index db1ed05026..011d69d0be 100644 --- a/gerrit-server/src/test/java/com/google/gerrit/testutil/FakeAccountCache.java +++ b/gerrit-server/src/test/java/com/google/gerrit/testutil/FakeAccountCache.java @@ -16,12 +16,12 @@ package com.google.gerrit.testutil; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.reviewdb.client.Account; import com.google.gerrit.reviewdb.client.AccountExternalId; import com.google.gerrit.reviewdb.client.AccountGroup; import com.google.gerrit.server.account.AccountCache; import com.google.gerrit.server.account.AccountState; -import com.google.gerrit.server.util.TimeUtil; import java.util.Map; diff --git a/gerrit-server/src/test/java/com/google/gerrit/testutil/TestChanges.java b/gerrit-server/src/test/java/com/google/gerrit/testutil/TestChanges.java index 2ddb41e5c3..0e9a681273 100644 --- a/gerrit-server/src/test/java/com/google/gerrit/testutil/TestChanges.java +++ b/gerrit-server/src/test/java/com/google/gerrit/testutil/TestChanges.java @@ -17,6 +17,7 @@ package com.google.gerrit.testutil; import static org.easymock.EasyMock.expect; import com.google.common.collect.Ordering; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.reviewdb.client.Branch; import com.google.gerrit.reviewdb.client.Change; import com.google.gerrit.reviewdb.client.PatchSet; @@ -32,7 +33,6 @@ import com.google.gerrit.server.notedb.ChangeNotes; import com.google.gerrit.server.notedb.ChangeUpdate; import com.google.gerrit.server.notedb.NotesMigration; import com.google.gerrit.server.project.ChangeControl; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.OrmException; import com.google.inject.Injector; diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/BaseCommand.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/BaseCommand.java index 5197b18186..bb431f47bc 100644 --- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/BaseCommand.java +++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/BaseCommand.java @@ -16,6 +16,7 @@ package com.google.gerrit.sshd; import com.google.common.util.concurrent.Atomics; import com.google.gerrit.common.Nullable; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.extensions.annotations.PluginName; import com.google.gerrit.reviewdb.client.Project; import com.google.gerrit.server.CurrentUser; @@ -26,7 +27,6 @@ import com.google.gerrit.server.git.WorkQueue; import com.google.gerrit.server.git.WorkQueue.CancelableRunnable; import com.google.gerrit.server.project.NoSuchChangeException; import com.google.gerrit.server.project.NoSuchProjectException; -import com.google.gerrit.server.util.TimeUtil; import com.google.gerrit.sshd.SshScope.Context; import com.google.gerrit.util.cli.CmdLineParser; import com.google.gerrit.util.cli.EndOfOptionsHandler; diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/SshLog.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/SshLog.java index 7df8db4c4a..61f5fa4003 100644 --- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/SshLog.java +++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/SshLog.java @@ -18,6 +18,7 @@ import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; import com.google.gerrit.audit.AuditService; import com.google.gerrit.audit.SshAuditEvent; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.extensions.events.LifecycleListener; import com.google.gerrit.server.CurrentUser; import com.google.gerrit.server.IdentifiedUser; @@ -25,7 +26,6 @@ import com.google.gerrit.server.PeerDaemonUser; import com.google.gerrit.server.config.GerritServerConfig; import com.google.gerrit.server.util.IdGenerator; import com.google.gerrit.server.util.SystemLog; -import com.google.gerrit.server.util.TimeUtil; import com.google.gerrit.sshd.SshScope.Context; import com.google.inject.Inject; import com.google.inject.Provider; diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/SshScope.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/SshScope.java index f8b5ddb004..8e763dfae8 100644 --- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/SshScope.java +++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/SshScope.java @@ -15,6 +15,7 @@ package com.google.gerrit.sshd; import com.google.common.collect.Maps; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.reviewdb.server.ReviewDb; import com.google.gerrit.server.CurrentUser; import com.google.gerrit.server.IdentifiedUser; @@ -23,7 +24,6 @@ import com.google.gerrit.server.config.RequestScopedReviewDbProvider; import com.google.gerrit.server.util.RequestContext; import com.google.gerrit.server.util.ThreadLocalRequestContext; import com.google.gerrit.server.util.ThreadLocalRequestScopePropagator; -import com.google.gerrit.server.util.TimeUtil; import com.google.gwtorm.server.SchemaFactory; import com.google.inject.Inject; import com.google.inject.Key; diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/QueryShell.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/QueryShell.java index 39ec81f57a..0afdd60ce4 100644 --- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/QueryShell.java +++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/QueryShell.java @@ -14,9 +14,9 @@ package com.google.gerrit.sshd.commands; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.Version; import com.google.gerrit.reviewdb.server.ReviewDb; -import com.google.gerrit.server.util.TimeUtil; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.google.gwtorm.jdbc.JdbcSchema; diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ShowCaches.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ShowCaches.java index 1f3a49a9b5..1c1fb60c7d 100644 --- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ShowCaches.java +++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ShowCaches.java @@ -17,6 +17,7 @@ package com.google.gerrit.sshd.commands; import static com.google.gerrit.sshd.CommandMetaData.Mode.MASTER_OR_SLAVE; import com.google.common.base.Strings; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.Version; import com.google.gerrit.common.data.GlobalCapability; import com.google.gerrit.extensions.annotations.RequiresCapability; @@ -32,7 +33,6 @@ import com.google.gerrit.server.config.GetSummary.ThreadSummaryInfo; import com.google.gerrit.server.config.ListCaches; import com.google.gerrit.server.config.ListCaches.CacheInfo; import com.google.gerrit.server.config.ListCaches.CacheType; -import com.google.gerrit.server.util.TimeUtil; import com.google.gerrit.sshd.CommandMetaData; import com.google.gerrit.sshd.SshCommand; import com.google.gerrit.sshd.SshDaemon; diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ShowConnections.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ShowConnections.java index 3d1ed3f074..108df9630f 100644 --- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ShowConnections.java +++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ShowConnections.java @@ -16,12 +16,12 @@ package com.google.gerrit.sshd.commands; import static com.google.gerrit.sshd.CommandMetaData.Mode.MASTER_OR_SLAVE; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.common.data.GlobalCapability; import com.google.gerrit.extensions.annotations.RequiresCapability; import com.google.gerrit.server.CurrentUser; import com.google.gerrit.server.IdentifiedUser; import com.google.gerrit.server.util.IdGenerator; -import com.google.gerrit.server.util.TimeUtil; import com.google.gerrit.sshd.CommandMetaData; import com.google.gerrit.sshd.SshCommand; import com.google.gerrit.sshd.SshDaemon; diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ShowQueue.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ShowQueue.java index 3b72c7f0c8..b069cd491d 100644 --- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ShowQueue.java +++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ShowQueue.java @@ -17,13 +17,13 @@ package com.google.gerrit.sshd.commands; import static com.google.gerrit.sshd.CommandMetaData.Mode.MASTER_OR_SLAVE; import com.google.common.base.MoreObjects; +import com.google.gerrit.common.TimeUtil; import com.google.gerrit.extensions.restapi.AuthException; import com.google.gerrit.server.IdentifiedUser; import com.google.gerrit.server.config.ConfigResource; import com.google.gerrit.server.config.ListTasks; import com.google.gerrit.server.config.ListTasks.TaskInfo; import com.google.gerrit.server.git.WorkQueue.Task; -import com.google.gerrit.server.util.TimeUtil; import com.google.gerrit.sshd.AdminHighPriorityCommand; import com.google.gerrit.sshd.CommandMetaData; import com.google.gerrit.sshd.SshCommand;