aboutsummaryrefslogtreecommitdiff
path: root/org.jacoco.core
diff options
context:
space:
mode:
authorEvgeny Mandrikov <Godin@users.noreply.github.com>2016-08-16 21:29:36 +0200
committerMarc R. Hoffmann <hoffmann@mountainminds.com>2016-08-16 21:29:36 +0200
commit54334f20cfd15dbd62929ed77464a7fcf3353ef8 (patch)
tree8cf355a0427ab8574541645b2cc8da59d398cb81 /org.jacoco.core
parent28a112ca6c6f46cd385f00aa932ec0e334e045a7 (diff)
downloadjacoco-54334f20cfd15dbd62929ed77464a7fcf3353ef8.tar.gz
Do not add members into interfaces with only abstract and clinit methods (#441)
Diffstat (limited to 'org.jacoco.core')
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeCounter.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeCounter.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeCounter.java
index d45a8f9d..66adf029 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeCounter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeCounter.java
@@ -13,6 +13,7 @@ package org.jacoco.core.internal.instr;
import org.jacoco.core.internal.flow.ClassProbesVisitor;
import org.jacoco.core.internal.flow.MethodProbesVisitor;
+import org.objectweb.asm.Opcodes;
/**
* Internal class to remember the total number of probes required for a class.
@@ -30,7 +31,8 @@ class ProbeCounter extends ClassProbesVisitor {
@Override
public MethodProbesVisitor visitMethod(final int access, final String name,
final String desc, final String signature, final String[] exceptions) {
- if (!InstrSupport.CLINIT_NAME.equals(name)) {
+ if (!InstrSupport.CLINIT_NAME.equals(name)
+ && (access & Opcodes.ACC_ABSTRACT) == 0) {
methods = true;
}
return null;
@@ -46,8 +48,8 @@ class ProbeCounter extends ClassProbesVisitor {
}
/**
- * @return <code>true</code> if the class has other methods than a static
- * initializer
+ * @return <code>true</code> if the class has non-abstract methods other
+ * than a static initializer
*/
boolean hasMethods() {
return methods;