Fix compilation issue by using Instant API
Calling `getLastUpdatedOn()` on a `Change` object now returns an
`Instant` rather than a `JavaUtilDate`.
Using .getTime() on it fails compilation for a `cannot find symbol`
error.
Use instead the `toEpochMilli()` to return the number of milliseconds
elapsed since epoch.
Bug: Issue 15833
Change-Id: I84f53a89e67c295ec13051b3f5e6e4252efa54fd
diff --git a/src/main/java/com/googlesource/gerrit/modules/gitrefsfilter/ChangesTsCache.java b/src/main/java/com/googlesource/gerrit/modules/gitrefsfilter/ChangesTsCache.java
index cfd7a0f..c371985 100644
--- a/src/main/java/com/googlesource/gerrit/modules/gitrefsfilter/ChangesTsCache.java
+++ b/src/main/java/com/googlesource/gerrit/modules/gitrefsfilter/ChangesTsCache.java
@@ -53,7 +53,7 @@
.createChecked(key.repo(), key.project(), key.changeId(), key.changeRevision())
.getChange()
.getLastUpdatedOn()
- .getTime();
+ .toEpochMilli();
} catch (NoSuchChangeException e) {
logger.atFine().withCause(e).log(
"Change %d does not exist: returning zero epoch", key.changeId());