aboutsummaryrefslogtreecommitdiff
path: root/org.jacoco.core/src/org
diff options
context:
space:
mode:
authorMarc R. Hoffmann <hoffmann@mountainminds.com>2014-10-29 11:35:55 +0100
committerMarc R. Hoffmann <hoffmann@mountainminds.com>2014-10-29 11:35:55 +0100
commita14720ca73363d1d79da2f23e9914f6ad8caf6ad (patch)
tree29bc7e6fd3b6f79d7f7e561759229dc1a0bda06a /org.jacoco.core/src/org
parent27b5c3382007ee428340f77893755c24da305522 (diff)
parent3ceb0a9087cdb0f07c0e9d074345a278ed8a5d3c (diff)
downloadjacoco-a14720ca73363d1d79da2f23e9914f6ad8caf6ad.tar.gz
Merge pull request #249 from C-Otto/docu-fixes
Implementation documentation fixes.
Diffstat (limited to 'org.jacoco.core/src/org')
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/flow/LabelFlowAnalyzer.java7
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/flow/LabelInfo.java2
2 files changed, 7 insertions, 2 deletions
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/flow/LabelFlowAnalyzer.java b/org.jacoco.core/src/org/jacoco/core/internal/flow/LabelFlowAnalyzer.java
index 36caa44a..dd32a5f9 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/flow/LabelFlowAnalyzer.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/flow/LabelFlowAnalyzer.java
@@ -63,8 +63,13 @@ public final class LabelFlowAnalyzer extends MethodVisitor {
@Override
public void visitTryCatchBlock(final Label start, final Label end,
final Label handler, final String type) {
- // Enforce probes at the beginning and end of the block:
+ // Enforce probe at the beginning of the block. Assuming the start of
+ // the block already is successor of some other code, adding a target
+ // makes the start a multitarget. However, if the start of the block
+ // also is the start of the method, no probe will be added.
LabelInfo.setTarget(start);
+
+ // Mark exception handler as possible target of the block
LabelInfo.setTarget(handler);
}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/flow/LabelInfo.java b/org.jacoco.core/src/org/jacoco/core/internal/flow/LabelInfo.java
index 21c5d31a..6edb2382 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/flow/LabelInfo.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/flow/LabelInfo.java
@@ -76,7 +76,7 @@ public final class LabelInfo {
/**
* Checks whether multiple control paths lead to a label. Control flow path
* to a certain label are: jump targets, exception handlers and normal
- * control flow from its predecessor instruction (unless this a
+ * control flow from its predecessor instruction (unless this is an
* unconditional jump or method exit).
*
* @param label