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.java11
1 files changed, 5 insertions, 6 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 a4dd6208..2ae1499b 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
@@ -42,16 +42,15 @@ abstract class AbstractMatcher {
}
/**
- * Moves {@link #cursor} to next instruction if it is <code>NEW</code> with
- * given operand, otherwise sets it to <code>null</code>.
+ * Moves {@link #cursor} to next instruction if it is {@link TypeInsnNode}
+ * with given opcode and operand, otherwise sets it to <code>null</code>.
*/
- final void nextIsNew(final String desc) {
- nextIs(Opcodes.NEW);
+ final void nextIsType(final int opcode, final String desc) {
+ nextIs(opcode);
if (cursor == null) {
return;
}
- final TypeInsnNode i = (TypeInsnNode) cursor;
- if (desc.equals(i.desc)) {
+ if (((TypeInsnNode) cursor).desc.equals(desc)) {
return;
}
cursor = null;