From 47cc11f91276ba8d1a7d35463bf3390891a403b0 Mon Sep 17 00:00:00 2001 From: Googler Date: Wed, 7 Dec 2022 07:31:36 -0800 Subject: [PATCH] [Pass a `UsingReaddirplusSyscallCacheEvent` over the `EventBus`.] Replace unnecessary access to `SyscallCache` delegates, unbreaking encapsulation. PiperOrigin-RevId: 493598920 Change-Id: I4232d184e16d8da6bd876125f63bcb8ec25f4a2f --- .../devtools/build/lib/vfs/DelegatingSyscallCache.java | 5 ----- .../build/lib/vfs/SingleFileSystemSyscallCache.java | 6 ------ 2 files changed, 11 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/vfs/DelegatingSyscallCache.java b/src/main/java/com/google/devtools/build/lib/vfs/DelegatingSyscallCache.java index 5690e85d79ae74..4db720268477f4 100644 --- a/src/main/java/com/google/devtools/build/lib/vfs/DelegatingSyscallCache.java +++ b/src/main/java/com/google/devtools/build/lib/vfs/DelegatingSyscallCache.java @@ -67,9 +67,4 @@ public void noteAnalysisPhaseEnded() { public void clear() { delegate.clear(); } - - /** Returns the delegate {@link SyscallCache}. */ - public SyscallCache getDelegate() { - return delegate; - } } diff --git a/src/main/java/com/google/devtools/build/lib/vfs/SingleFileSystemSyscallCache.java b/src/main/java/com/google/devtools/build/lib/vfs/SingleFileSystemSyscallCache.java index 9befa7f1e9741f..fcb86e45efc639 100644 --- a/src/main/java/com/google/devtools/build/lib/vfs/SingleFileSystemSyscallCache.java +++ b/src/main/java/com/google/devtools/build/lib/vfs/SingleFileSystemSyscallCache.java @@ -89,12 +89,6 @@ public void clear() { delegate.clear(); } - /** Returns the underlying {@link SyscallCache} used for eligible paths. */ - // TODO(b/245929310): This shouldn't be exposed. - public SyscallCache getUnderlyingCache() { - return delegate; - } - private SyscallCache delegateFor(Path path) { return path.getFileSystem().equals(fs) ? delegate : SyscallCache.NO_CACHE; }