diff options
author | olaola <olaola@google.com> | 2017-06-30 21:52:36 +0200 |
---|---|---|
committer | Marcel Hlopko <hlopko@google.com> | 2017-07-03 09:06:38 +0200 |
commit | a3ce0910e3143f1391fe1f4219bda12ef21d12d1 (patch) | |
tree | d4889f86c63b82387440db480ebb50771158bb85 /src/main/java/com/google/devtools | |
parent | 54ba3b0681d82519f49b749ab37c79d8ec4057c1 (diff) |
Bugfix: improper handling of IOException. This was triggered when we decided to change some other exception types into IOExceptions.
TESTED=unit tests
RELNOTES: n/a
PiperOrigin-RevId: 160677771
Diffstat (limited to 'src/main/java/com/google/devtools')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/remote/GrpcActionCache.java | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/remote/GrpcActionCache.java b/src/main/java/com/google/devtools/build/lib/remote/GrpcActionCache.java index 23899b5549..5d7ab862e2 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/GrpcActionCache.java +++ b/src/main/java/com/google/devtools/build/lib/remote/GrpcActionCache.java @@ -467,15 +467,10 @@ public class GrpcActionCache implements RemoteActionCache { Digest uploadBlob(byte[] blob) throws IOException, InterruptedException { Digest digest = Digests.computeDigest(blob); ImmutableSet<Digest> missing = getMissingDigests(ImmutableList.of(digest)); - try { - if (!missing.isEmpty()) { - uploadChunks(1, new Chunker.Builder().addInput(blob)); - } - return digest; - } catch (IOException e) { - // This will never happen. - throw new RuntimeException(); + if (!missing.isEmpty()) { + uploadChunks(1, new Chunker.Builder().addInput(blob)); } + return digest; } byte[] downloadBlob(Digest digest) |