diff options
author | Oliver Nguyen <olivernguyen@google.com> | 2020-10-22 12:09:54 -0700 |
---|---|---|
committer | Oliver Nguyen <olivernguyen@google.com> | 2021-03-08 14:59:02 -0800 |
commit | a11c30487b16ace07062dfcb7cd757f096158b21 (patch) | |
tree | e629f0556620ad9fbca5c1dc8b8cce160d568ff5 | |
parent | 66fe1d44ec5694379d3fdaf9b566ab1792d2ee24 (diff) | |
download | jacoco-android11-gsi.tar.gz |
Reland "Handle exceptions instead of passing them on."android11-gsi
Exceptions propagated down the stack are causing instability issues and
random failures. Fall back where possible to normal ExecutionData
instances instead.
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true
CLANG_COVERAGE=true and check boot
Bug: 171333204
Bug: 178735384
Change-Id: I52f6e1ced654669e77e46dd2327500b1733782c0
-rw-r--r-- | org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Offline.java | 2 | ||||
-rw-r--r-- | org.jacoco.core/src/org/jacoco/core/data/ExecutionDataDelegate.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Offline.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Offline.java index 2350ce55..99a054e7 100644 --- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Offline.java +++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Offline.java @@ -94,7 +94,7 @@ public final class Offline { data.convert(CHANNEL); } } catch (IOException e) { - throw new RuntimeException(e); + // TODO(olivernguyen): Add logging to debug issues more easily. } } diff --git a/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataDelegate.java b/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataDelegate.java index cc6b3cc8..7cbe989f 100644 --- a/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataDelegate.java +++ b/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataDelegate.java @@ -18,7 +18,7 @@ public class ExecutionDataDelegate implements IExecutionData { try { delegate = new MappedExecutionData(id, name, probeCount, channel); } catch (IOException e) { - throw new RuntimeException(e); + delegate = new ExecutionData(id, name, probeCount); } } else { delegate = new ExecutionData(id, name, probeCount); |