Skip to content

Commit 5f0330f

Browse files
fmeumcopybara-github
authored andcommitted
Address Gemini suggestions for VirtualActionInputBlob
These were missed in 92dad2c. Closes bazelbuild#28280. PiperOrigin-RevId: 856250617 Change-Id: I5b1bf192db605143515d7a2124934294a591d5a8
1 parent 8a3eb60 commit 5f0330f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/main/java/com/google/devtools/build/lib/remote/RemoteExecutionCache.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,9 @@ public InputStream get() {
240240
try (pipedOut) {
241241
virtualActionInput.writeTo(pipedOut);
242242
} catch (IOException e) {
243-
throw new IllegalStateException(
244-
"writeTo is not expected to throw as pipedOut doesn't", e);
243+
// Since VirtualActionInput#writeTo only throws when pipedOut does, this means
244+
// that the reader has closed pipedIn early, perhaps due to interruption. Since
245+
// the reader is gone, there is no way to propagate this exception back.
245246
}
246247
});
247248
return pipedIn;

src/main/java/com/google/devtools/build/lib/remote/common/RemoteCacheClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ ListenableFuture<Void> downloadBlob(
9696
* A supplier for the data comprising a BLOB.
9797
*
9898
* <p>As blobs can be large and may need to be kept in memory, consumers should call {@link #get}
99-
* as late as possible and close the blob as soon as they are done with it.
99+
* as late as possible.
100100
*/
101101
@FunctionalInterface
102102
interface Blob {

0 commit comments

Comments
 (0)