aboutsummaryrefslogtreecommitdiff
path: root/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/AbstractMatcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/AbstractMatcher.java')
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/AbstractMatcher.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/AbstractMatcher.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/AbstractMatcher.java
index e4958bdb..50a295de 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/AbstractMatcher.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/AbstractMatcher.java
@@ -73,11 +73,16 @@ abstract class AbstractMatcher {
if (cursor == null) {
return;
}
- do {
- cursor = cursor.getNext();
- } while (cursor != null && (cursor.getType() == AbstractInsnNode.FRAME
+ cursor = cursor.getNext();
+ skipNonOpcodes();
+ }
+
+ final void skipNonOpcodes() {
+ while (cursor != null && (cursor.getType() == AbstractInsnNode.FRAME
|| cursor.getType() == AbstractInsnNode.LABEL
- || cursor.getType() == AbstractInsnNode.LINE));
+ || cursor.getType() == AbstractInsnNode.LINE)) {
+ cursor = cursor.getNext();
+ }
}
}