aboutsummaryrefslogtreecommitdiff
path: root/org.jacoco.core.test
diff options
context:
space:
mode:
authorEvgeny Mandrikov <Godin@users.noreply.github.com>2016-09-12 22:32:28 +0200
committerMarc R. Hoffmann <hoffmann@mountainminds.com>2016-09-12 22:32:28 +0200
commit36ee332473db49917939309b3677cc0a6121d491 (patch)
treebc2af169b43733514165812e1765fab943a21b34 /org.jacoco.core.test
parent2a3b75687e8071cc65b942125fc939547e0f8525 (diff)
downloadjacoco-36ee332473db49917939309b3677cc0a6121d491.tar.gz
Update comments about "bad cycles" with interfaces (#448)
Diffstat (limited to 'org.jacoco.core.test')
-rw-r--r--org.jacoco.core.test/src-java8/org/jacoco/core/test/validation/BadCycleInterfaceTest.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/org.jacoco.core.test/src-java8/org/jacoco/core/test/validation/BadCycleInterfaceTest.java b/org.jacoco.core.test/src-java8/org/jacoco/core/test/validation/BadCycleInterfaceTest.java
index 0ea8d1a7..b62db74d 100644
--- a/org.jacoco.core.test/src-java8/org/jacoco/core/test/validation/BadCycleInterfaceTest.java
+++ b/org.jacoco.core.test/src-java8/org/jacoco/core/test/validation/BadCycleInterfaceTest.java
@@ -26,22 +26,23 @@ public class BadCycleInterfaceTest extends ValidationTestBase {
@Test
public void test() throws Exception {
- if (System.getProperty("java.version").startsWith("9-ea")) {
- // JDK-9042842
- assertLine("baseclinit", ICounter.EMPTY);
- assertLine("childdefault", ICounter.NOT_COVERED);
- assertLogEvents("childclinit", "childstaticmethod");
- } else {
+ if (System.getProperty("java.version").startsWith("1.8")) {
+ // Incorrect interpetation of JVMS 5.5 in JDK 8 causes a default
+ // method to be called before the static initializer of an interface
+ // (see JDK-8098557 and JDK-8164302):
assertLine("baseclinit", ICounter.FULLY_COVERED);
assertLine("childdefault", ICounter.FULLY_COVERED);
- // The cycle causes a default method to be called before the static
- // initializer of a interface:
assertLogEvents("baseclinit", "childdefaultmethod", "childclinit",
"childstaticmethod");
+ } else {
+ // This shouldn't happen with JDK 9 (see also JDK-8043275):
+ assertLine("baseclinit", ICounter.EMPTY);
+ assertLine("childdefault", ICounter.NOT_COVERED);
+ assertLogEvents("childclinit", "childstaticmethod");
}
assertLine("childclinit", ICounter.FULLY_COVERED);
assertLine("childstatic", ICounter.FULLY_COVERED);
-
}
+
}