From b3f55401faa8c41afab2fecb9bae0f2a1de9500d Mon Sep 17 00:00:00 2001 From: cpovirk Date: Thu, 28 Dec 2023 12:24:45 -0800 Subject: [PATCH] Use fake filesystems to make Guava tests work better [under Windows](https://github.com/google/guava/issues/2130) and Android, and prepare jimfs for some preliminary Android testing. RELNOTES=n/a PiperOrigin-RevId: 594298059 --- .../java/com/google/common/jimfs/SystemFileTimeSource.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jimfs/src/main/java/com/google/common/jimfs/SystemFileTimeSource.java b/jimfs/src/main/java/com/google/common/jimfs/SystemFileTimeSource.java index 05d71f08..4d9a942c 100644 --- a/jimfs/src/main/java/com/google/common/jimfs/SystemFileTimeSource.java +++ b/jimfs/src/main/java/com/google/common/jimfs/SystemFileTimeSource.java @@ -24,6 +24,11 @@ enum SystemFileTimeSource implements FileTimeSource { INSTANCE; @Override + /* + * We don't really support usage from Android, but all configurations we're testing under support + * java.time. + */ + @SuppressWarnings("AndroidJdkLibsChecker") public FileTime now() { return FileTime.from(Instant.now()); }