---
.../agent/rt/internal/AgentModuleTest.java | 77 +++++++++
.../jacoco/agent/rt/internal/AgentModule.java | 154 ++++++++++++++++++
.../org/jacoco/agent/rt/internal/PreMain.java | 58 +------
.../src/org/jacoco/ant/CoverageTaskTest.xml | 8 +
.../ant/IllegalReflectiveAccessTarget.java | 42 +++++
.../src/org/jacoco/ant/InstrumentTaskTest.xml | 10 +-
org.jacoco.doc/docroot/doc/changes.html | 7 +
7 files changed, 300 insertions(+), 56 deletions(-)
create mode 100644 org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/AgentModuleTest.java
create mode 100644 org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/AgentModule.java
create mode 100644 org.jacoco.ant.test/src/org/jacoco/ant/IllegalReflectiveAccessTarget.java
diff --git a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/AgentModuleTest.java b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/AgentModuleTest.java
new file mode 100644
index 0000000000..88d26aee38
--- /dev/null
+++ b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/AgentModuleTest.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.agent.rt.internal;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertSame;
+
+import org.jacoco.core.test.validation.JavaVersion;
+import org.junit.Test;
+
+/**
+ * Unit tests for {@link AgentModule}.
+ */
+public class AgentModuleTest {
+
+ @Test
+ public void isSupported_should_return_false_before_Java9() {
+ Boolean expected = Boolean
+ .valueOf(!JavaVersion.current().isBefore("9"));
+ Boolean supported = Boolean.valueOf(AgentModule.isSupported());
+ assertEquals(expected, supported);
+ }
+
+ @Test
+ public void should_only_load_classes_in_scope() throws Exception {
+ AgentModule am = new AgentModule();
+ Class extends Target> targetclass = am
+ .loadClassInModule(TargetImpl.class);
+ Target t = targetclass.getDeclaredConstructor().newInstance();
+
+ assertNotSame(this.getClass().getClassLoader(),
+ t.getClass().getClassLoader());
+ assertSame(t.getClass().getClassLoader(),
+ t.getInnerClassInstance().getClass().getClassLoader());
+ assertNotSame(this.getClass().getClassLoader(),
+ t.getInnerClassInstance().getClass().getClassLoader());
+ assertSame(this.getClass().getClassLoader(),
+ t.getOtherClassInstance().getClass().getClassLoader());
+ }
+
+ public interface Target {
+
+ Object getInnerClassInstance();
+
+ Object getOtherClassInstance();
+
+ }
+
+ public static class TargetImpl implements Target {
+
+ static class Inner {
+ }
+
+ public Object getInnerClassInstance() {
+ return new Inner();
+ }
+
+ public Object getOtherClassInstance() {
+ return new Other();
+ }
+ }
+
+ public static class Other {
+ }
+
+}
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/AgentModule.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/AgentModule.java
new file mode 100644
index 0000000000..88a2e02c50
--- /dev/null
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/AgentModule.java
@@ -0,0 +1,154 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ * Marc R. Hoffmann - move to separate class
+ *
+ *******************************************************************************/
+package org.jacoco.agent.rt.internal;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.instrument.Instrumentation;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.jacoco.core.internal.InputStreams;
+
+/**
+ * An isolated class loader and distinct module to encapsulate JaCoCo runtime
+ * classes. This isolated environment allows to specifically open JDK packages
+ * to the agent runtime without changing package accessibility for the
+ * application under test.
+ *
+ * The implementation uses the property that the
+ * unnamed module is distinct from all run-time modules (including unnamed
+ * modules) bound to other class loaders.
+ */
+public class AgentModule {
+
+ /**
+ * Checks whether Java modules are supported by the current Java runtime.
+ *
+ * @return true is modules are supported
+ */
+ public static boolean isSupported() {
+ try {
+ getModuleClass();
+ } catch (final ClassNotFoundException e) {
+ return false;
+ }
+ return true;
+ }
+
+ private final Set scope = new HashSet();
+ private final ClassLoader classLoader;
+
+ /**
+ * Creates a new isolated module.
+ *
+ * @throws Exception
+ * if it cannot be created
+ */
+ public AgentModule() throws Exception {
+ classLoader = new ClassLoader() {
+ @Override
+ protected Class> loadClass(final String name,
+ final boolean resolve) throws ClassNotFoundException {
+ if (!scope.contains(name)) {
+ return super.loadClass(name, resolve);
+ }
+ final InputStream resourceAsStream = getResourceAsStream(
+ name.replace('.', '/') + ".class");
+ final byte[] bytes;
+ try {
+ bytes = InputStreams.readFully(resourceAsStream);
+ } catch (final IOException e) {
+ throw new RuntimeException(e);
+ }
+ return defineClass(name, bytes, 0, bytes.length);
+ }
+ };
+ }
+
+ /**
+ * Opens the package of the provided class to the module created in this
+ * {@link #AgentModule()} instance.
+ *
+ * @param instrumentation
+ * service provided to the agent by the Java runtime
+ * @param classInPackage
+ * example class of the package to open
+ * @throws Exception
+ * if package cannot be opened
+ */
+ public void openPackage(final Instrumentation instrumentation,
+ final Class> classInPackage) throws Exception {
+
+ // module of the package to open
+ final Object module = Class.class.getMethod("getModule")
+ .invoke(classInPackage);
+
+ // unnamed module of our classloader
+ final Object unnamedModule = ClassLoader.class
+ .getMethod("getUnnamedModule").invoke(classLoader);
+
+ // Open package java.lang to the unnamed module of our class loader
+ Instrumentation.class.getMethod("redefineModule", //
+ getModuleClass(), //
+ Set.class, //
+ Map.class, //
+ Map.class, //
+ Set.class, //
+ Map.class //
+ ).invoke(instrumentation, // instance
+ module, // module
+ Collections.emptySet(), // extraReads
+ Collections.emptyMap(), // extraExports
+ Collections.singletonMap(classInPackage.getPackage().getName(),
+ Collections.singleton(unnamedModule)), // extraOpens
+ Collections.emptySet(), // extraUses
+ Collections.emptyMap() // extraProvides
+ );
+ }
+
+ /**
+ * Loads a copy of the given class in the isolated classloader. Also any
+ * inner classes are loader from the isolated classloader.
+ *
+ * @param
+ * type of the class to load
+ * @param original
+ * original class definition which is used as source
+ * @return class object from the isolated class loader
+ * @throws Exception
+ * if the class cannot be loaded
+ */
+ @SuppressWarnings("unchecked")
+ public Class loadClassInModule(final Class original)
+ throws Exception {
+ addToScopeWithInnerClasses(original);
+ return (Class) classLoader.loadClass(original.getName());
+ }
+
+ private void addToScopeWithInnerClasses(final Class> c) {
+ scope.add(c.getName());
+ for (final Class> i : c.getDeclaredClasses()) {
+ addToScopeWithInnerClasses(i);
+ }
+ }
+
+ private static Class> getModuleClass() throws ClassNotFoundException {
+ return Class.forName("java.lang.Module");
+ }
+
+}
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/PreMain.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/PreMain.java
index 3775c54196..845267ca32 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/PreMain.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/PreMain.java
@@ -13,9 +13,6 @@
package org.jacoco.agent.rt.internal;
import java.lang.instrument.Instrumentation;
-import java.util.Collections;
-import java.util.Map;
-import java.util.Set;
import org.jacoco.core.runtime.AgentOptions;
import org.jacoco.core.runtime.IRuntime;
@@ -58,58 +55,17 @@ public static void premain(final String options, final Instrumentation inst)
private static IRuntime createRuntime(final Instrumentation inst)
throws Exception {
- if (redefineJavaBaseModule(inst)) {
- return new InjectedClassRuntime(Object.class, "$JaCoCo");
+ if (AgentModule.isSupported()) {
+ final AgentModule module = new AgentModule();
+ module.openPackage(inst, Object.class);
+ final Class clazz = module
+ .loadClassInModule(InjectedClassRuntime.class);
+ return clazz.getConstructor(Class.class, String.class)
+ .newInstance(Object.class, "$JaCoCo");
}
return ModifiedSystemClassRuntime.createFor(inst,
"java/lang/UnknownError");
}
- /**
- * Opens {@code java.base} module for {@link InjectedClassRuntime} when
- * executed on Java 9 JREs or higher.
- *
- * @return true when running on Java 9 or higher,
- * false otherwise
- * @throws Exception
- * if unable to open
- */
- private static boolean redefineJavaBaseModule(
- final Instrumentation instrumentation) throws Exception {
- try {
- Class.forName("java.lang.Module");
- } catch (final ClassNotFoundException e) {
- return false;
- }
-
- Instrumentation.class.getMethod("redefineModule", //
- Class.forName("java.lang.Module"), //
- Set.class, //
- Map.class, //
- Map.class, //
- Set.class, //
- Map.class //
- ).invoke(instrumentation, // instance
- getModule(Object.class), // module
- Collections.emptySet(), // extraReads
- Collections.emptyMap(), // extraExports
- Collections.singletonMap("java.lang",
- Collections.singleton(
- getModule(InjectedClassRuntime.class))), // extraOpens
- Collections.emptySet(), // extraUses
- Collections.emptyMap() // extraProvides
- );
- return true;
- }
-
- /**
- * @return {@code cls.getModule()}
- */
- private static Object getModule(final Class> cls) throws Exception {
- return Class.class //
- .getMethod("getModule") //
- .invoke(cls);
- }
-
}
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.xml b/org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.xml
index 6d6ea580e3..4cd7da89bd 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.xml
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.xml
@@ -158,4 +158,12 @@
+
+
+
+
+
+
+
+
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/IllegalReflectiveAccessTarget.java b/org.jacoco.ant.test/src/org/jacoco/ant/IllegalReflectiveAccessTarget.java
new file mode 100644
index 0000000000..f2391cbbaa
--- /dev/null
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/IllegalReflectiveAccessTarget.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+
+package org.jacoco.ant;
+
+import java.lang.reflect.Constructor;
+
+public class IllegalReflectiveAccessTarget {
+
+ public static void main(String[] args) throws Exception {
+ try {
+ Class.forName("java.net.UnixDomainSocketAddress");
+ } catch (ClassNotFoundException e) {
+ // Java < 16
+ return;
+ }
+
+ final Constructor> c = Class.forName("java.lang.Module")
+ .getDeclaredConstructors()[0];
+ try {
+ c.setAccessible(true);
+ throw new AssertionError("Exception expected");
+ } catch (RuntimeException e) {
+ if (!e.getClass().getName()
+ .equals("java.lang.reflect.InaccessibleObjectException")) {
+ throw new AssertionError(
+ "InaccessibleObjectException expected");
+ }
+ }
+ }
+
+}
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/InstrumentTaskTest.xml b/org.jacoco.ant.test/src/org/jacoco/ant/InstrumentTaskTest.xml
index 69dbbf2b80..1c78d2830d 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/InstrumentTaskTest.xml
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/InstrumentTaskTest.xml
@@ -63,7 +63,7 @@
-
+
@@ -84,7 +84,7 @@
-
+
@@ -95,7 +95,7 @@
-
+
destfile=test.exec
@@ -112,7 +112,7 @@
-
+
@@ -129,7 +129,7 @@
-
+
diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html
index e79693102b..5b18f9cd6e 100644
--- a/org.jacoco.doc/docroot/doc/changes.html
+++ b/org.jacoco.doc/docroot/doc/changes.html
@@ -35,6 +35,13 @@ New Features
(GitHub #1393).
+Fixed bugs
+
+ - Agent should not open
java.lang package to unnamed module of the
+ application class loader
+ (GitHub #1334).
+
+
Non-functional Changes
From 461ebf312620799a3815807e09cb84e4e43a39aa Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Mon, 27 Mar 2023 09:36:59 +0200
Subject: [PATCH 19/66] Add validation test for JEP 432: Record Patterns
(#1415)
---
.../validation/java20/RecordPatternsTest.java | 27 +++++++++
.../java20/targets/RecordPatternsTarget.java | 55 +++++++++++++++++++
2 files changed, 82 insertions(+)
create mode 100644 org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/RecordPatternsTest.java
create mode 100644 org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/RecordPatternsTarget.java
diff --git a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/RecordPatternsTest.java b/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/RecordPatternsTest.java
new file mode 100644
index 0000000000..d609872f2d
--- /dev/null
+++ b/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/RecordPatternsTest.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.java20;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.java20.targets.RecordPatternsTarget;
+
+/**
+ * Test of code coverage in {@link RecordPatterns}.
+ */
+public class RecordPatternsTest extends ValidationTestBase {
+
+ public RecordPatternsTest() {
+ super(RecordPatternsTarget.class);
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/RecordPatternsTarget.java b/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/RecordPatternsTarget.java
new file mode 100644
index 0000000000..9542e70da9
--- /dev/null
+++ b/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/RecordPatternsTarget.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.java20.targets;
+
+import static org.jacoco.core.test.validation.targets.Stubs.nop;
+
+/**
+ * This target exercises Record Patterns
+ * (JEP 432).
+ */
+public class RecordPatternsTarget {
+
+ private record Point(int x, int y) {
+ }
+
+ private static void instanceofOperator(Object o) {
+ if (o instanceof Point(int x,int y)) { // assertPartlyCovered(0, 2)
+ nop(x + y); // assertFullyCovered()
+ } // assertEmpty()
+ }
+
+ private static void switchStatement(Object p) {
+ switch (p) { // assertFullyCovered(0, 2)
+ case Point(int x, int y) -> nop(x + y); // assertFullyCovered()
+ default -> nop(); // assertPartlyCovered()
+ } // assertEmpty()
+ }
+
+ private static void enhancedForStatement(Point[] p) {
+ for (Point(int x, int y) : p) { // assertPartlyCovered(2, 3)
+ nop(x + y); // assertFullyCovered()
+ } // assertEmpty()
+ }
+
+ public static void main(String[] args) {
+ instanceofOperator(new Point(1, 2));
+ instanceofOperator(new Object());
+
+ switchStatement(new Point(1, 2));
+ switchStatement(new Object());
+
+ enhancedForStatement(new Point[] { new Point(1, 2) });
+ }
+
+}
From c561c13f07a544a3a8cd4430c2bb8eae7deea229 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Fri, 31 Mar 2023 17:31:30 +0200
Subject: [PATCH 20/66] Fix validation test for Java 21 (#1422)
---
.../validation/java20/RecordPatternsTest.java | 20 +++++++++++++++++++
.../java20/targets/RecordPatternsTarget.java | 4 ++--
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/RecordPatternsTest.java b/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/RecordPatternsTest.java
index d609872f2d..998920b660 100644
--- a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/RecordPatternsTest.java
+++ b/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/RecordPatternsTest.java
@@ -12,6 +12,8 @@
*******************************************************************************/
package org.jacoco.core.test.validation.java20;
+import org.jacoco.core.test.validation.JavaVersion;
+import org.jacoco.core.test.validation.Source.Line;
import org.jacoco.core.test.validation.ValidationTestBase;
import org.jacoco.core.test.validation.java20.targets.RecordPatternsTarget;
@@ -24,4 +26,22 @@ public RecordPatternsTest() {
super(RecordPatternsTarget.class);
}
+ public void assertSwitchStatementCase(Line line) {
+ if (JavaVersion.current().isBefore("21")) {
+ assertFullyCovered(line);
+ } else {
+ // https://github.com/openjdk/jdk/commit/138cdc9283ae8f3367e51f0fe7e27833118dd7cb
+ assertPartlyCovered(line);
+ }
+ }
+
+ public void assertSwitchStatementDefault(Line line) {
+ if (JavaVersion.current().isBefore("21")) {
+ assertPartlyCovered(line);
+ } else {
+ // https://github.com/openjdk/jdk/commit/138cdc9283ae8f3367e51f0fe7e27833118dd7cb
+ assertFullyCovered(line);
+ }
+ }
+
}
diff --git a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/RecordPatternsTarget.java b/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/RecordPatternsTarget.java
index 9542e70da9..4cd14df8f2 100644
--- a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/RecordPatternsTarget.java
+++ b/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/RecordPatternsTarget.java
@@ -31,8 +31,8 @@ private static void instanceofOperator(Object o) {
private static void switchStatement(Object p) {
switch (p) { // assertFullyCovered(0, 2)
- case Point(int x, int y) -> nop(x + y); // assertFullyCovered()
- default -> nop(); // assertPartlyCovered()
+ case Point(int x, int y) -> nop(x + y); // assertSwitchStatementCase()
+ default -> nop(); // assertSwitchStatementDefault()
} // assertEmpty()
}
From c0ad7810555f4c19ab8da68e94d4bf9344481564 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov
Date: Fri, 31 Mar 2023 23:39:44 +0200
Subject: [PATCH 21/66] Prepare release 0.8.9
---
jacoco-maven-plugin.test/pom.xml | 2 +-
jacoco-maven-plugin/pom.xml | 2 +-
jacoco/pom.xml | 2 +-
org.jacoco.agent.rt.test/pom.xml | 2 +-
org.jacoco.agent.rt/pom.xml | 2 +-
org.jacoco.agent.test/pom.xml | 2 +-
org.jacoco.agent/pom.xml | 2 +-
org.jacoco.ant.test/pom.xml | 2 +-
org.jacoco.ant/pom.xml | 2 +-
org.jacoco.build/pom.xml | 2 +-
org.jacoco.cli.test/pom.xml | 2 +-
org.jacoco.cli/pom.xml | 2 +-
org.jacoco.core.test.validation.groovy/pom.xml | 2 +-
org.jacoco.core.test.validation.java14/pom.xml | 2 +-
org.jacoco.core.test.validation.java16/pom.xml | 2 +-
org.jacoco.core.test.validation.java20/pom.xml | 2 +-
org.jacoco.core.test.validation.java5/pom.xml | 2 +-
org.jacoco.core.test.validation.java7/pom.xml | 2 +-
org.jacoco.core.test.validation.java8/pom.xml | 2 +-
org.jacoco.core.test.validation.kotlin/pom.xml | 2 +-
org.jacoco.core.test.validation.scala/pom.xml | 2 +-
org.jacoco.core.test.validation/pom.xml | 2 +-
org.jacoco.core.test/pom.xml | 2 +-
org.jacoco.core/pom.xml | 2 +-
org.jacoco.doc/docroot/doc/changes.html | 2 +-
org.jacoco.doc/pom.xml | 2 +-
org.jacoco.examples.test/pom.xml | 2 +-
org.jacoco.examples/pom.xml | 2 +-
org.jacoco.report.test/pom.xml | 2 +-
org.jacoco.report/pom.xml | 2 +-
org.jacoco.tests/pom.xml | 2 +-
pom.xml | 2 +-
32 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/jacoco-maven-plugin.test/pom.xml b/jacoco-maven-plugin.test/pom.xml
index 471a952ddd..947d0956e2 100644
--- a/jacoco-maven-plugin.test/pom.xml
+++ b/jacoco-maven-plugin.test/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.tests
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.tests
diff --git a/jacoco-maven-plugin/pom.xml b/jacoco-maven-plugin/pom.xml
index 897f18d20c..6d88886108 100644
--- a/jacoco-maven-plugin/pom.xml
+++ b/jacoco-maven-plugin/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.build
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.build
diff --git a/jacoco/pom.xml b/jacoco/pom.xml
index 58ebfd0e52..5e41b7f11a 100644
--- a/jacoco/pom.xml
+++ b/jacoco/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.build
diff --git a/org.jacoco.agent.rt.test/pom.xml b/org.jacoco.agent.rt.test/pom.xml
index 0714cbb232..2ea4ffbaf1 100644
--- a/org.jacoco.agent.rt.test/pom.xml
+++ b/org.jacoco.agent.rt.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.tests
diff --git a/org.jacoco.agent.rt/pom.xml b/org.jacoco.agent.rt/pom.xml
index f2894e640a..39e959e435 100644
--- a/org.jacoco.agent.rt/pom.xml
+++ b/org.jacoco.agent.rt/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.build
diff --git a/org.jacoco.agent.test/pom.xml b/org.jacoco.agent.test/pom.xml
index 67b2e9d61c..2156ff69a6 100644
--- a/org.jacoco.agent.test/pom.xml
+++ b/org.jacoco.agent.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.tests
diff --git a/org.jacoco.agent/pom.xml b/org.jacoco.agent/pom.xml
index 3f50e1d971..b02db06d00 100644
--- a/org.jacoco.agent/pom.xml
+++ b/org.jacoco.agent/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.build
diff --git a/org.jacoco.ant.test/pom.xml b/org.jacoco.ant.test/pom.xml
index c3658a6024..34e3334655 100644
--- a/org.jacoco.ant.test/pom.xml
+++ b/org.jacoco.ant.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.tests
diff --git a/org.jacoco.ant/pom.xml b/org.jacoco.ant/pom.xml
index 92a9ff3fc5..f7257e7ba5 100644
--- a/org.jacoco.ant/pom.xml
+++ b/org.jacoco.ant/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.build
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 87edf49e71..3721013ac8 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -15,7 +15,7 @@
org.jacoco
org.jacoco.build
- 0.8.9-SNAPSHOT
+ 0.8.9
pom
JaCoCo
diff --git a/org.jacoco.cli.test/pom.xml b/org.jacoco.cli.test/pom.xml
index 97f0f704a6..e39f977b58 100644
--- a/org.jacoco.cli.test/pom.xml
+++ b/org.jacoco.cli.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.tests
diff --git a/org.jacoco.cli/pom.xml b/org.jacoco.cli/pom.xml
index 68c3401d9a..cf8326936b 100644
--- a/org.jacoco.cli/pom.xml
+++ b/org.jacoco.cli/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.build
diff --git a/org.jacoco.core.test.validation.groovy/pom.xml b/org.jacoco.core.test.validation.groovy/pom.xml
index f80a1b9508..1945d3e380 100644
--- a/org.jacoco.core.test.validation.groovy/pom.xml
+++ b/org.jacoco.core.test.validation.groovy/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java14/pom.xml b/org.jacoco.core.test.validation.java14/pom.xml
index 6737048759..643db62b25 100644
--- a/org.jacoco.core.test.validation.java14/pom.xml
+++ b/org.jacoco.core.test.validation.java14/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java16/pom.xml b/org.jacoco.core.test.validation.java16/pom.xml
index 6a25930cde..43d2913079 100644
--- a/org.jacoco.core.test.validation.java16/pom.xml
+++ b/org.jacoco.core.test.validation.java16/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java20/pom.xml b/org.jacoco.core.test.validation.java20/pom.xml
index e91df6065c..1d6acf0a53 100644
--- a/org.jacoco.core.test.validation.java20/pom.xml
+++ b/org.jacoco.core.test.validation.java20/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java5/pom.xml b/org.jacoco.core.test.validation.java5/pom.xml
index da18dca1bb..080d75c6ad 100644
--- a/org.jacoco.core.test.validation.java5/pom.xml
+++ b/org.jacoco.core.test.validation.java5/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java7/pom.xml b/org.jacoco.core.test.validation.java7/pom.xml
index 6d36a9d45c..f4a05ba4e2 100644
--- a/org.jacoco.core.test.validation.java7/pom.xml
+++ b/org.jacoco.core.test.validation.java7/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java8/pom.xml b/org.jacoco.core.test.validation.java8/pom.xml
index a7cb3e4cee..f7d7971eef 100644
--- a/org.jacoco.core.test.validation.java8/pom.xml
+++ b/org.jacoco.core.test.validation.java8/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.kotlin/pom.xml b/org.jacoco.core.test.validation.kotlin/pom.xml
index a677f500f9..a7f1e4e0bd 100644
--- a/org.jacoco.core.test.validation.kotlin/pom.xml
+++ b/org.jacoco.core.test.validation.kotlin/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.scala/pom.xml b/org.jacoco.core.test.validation.scala/pom.xml
index 9ec57412cb..11db990b1a 100644
--- a/org.jacoco.core.test.validation.scala/pom.xml
+++ b/org.jacoco.core.test.validation.scala/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation/pom.xml b/org.jacoco.core.test.validation/pom.xml
index 450fb7df88..1101301df2 100644
--- a/org.jacoco.core.test.validation/pom.xml
+++ b/org.jacoco.core.test.validation/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.tests
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.tests
diff --git a/org.jacoco.core.test/pom.xml b/org.jacoco.core.test/pom.xml
index 8dd7075ac3..769e20df21 100644
--- a/org.jacoco.core.test/pom.xml
+++ b/org.jacoco.core.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.tests
diff --git a/org.jacoco.core/pom.xml b/org.jacoco.core/pom.xml
index b0bff07f6b..d6c8e74692 100644
--- a/org.jacoco.core/pom.xml
+++ b/org.jacoco.core/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.build
diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html
index 031df68f68..4ec2a2479e 100644
--- a/org.jacoco.doc/docroot/doc/changes.html
+++ b/org.jacoco.doc/docroot/doc/changes.html
@@ -18,7 +18,7 @@
Change History
-Snapshot Build @qualified.bundle.version@ (@build.date@)
+Release 0.8.9 (2023/03/31)
New Features
diff --git a/org.jacoco.doc/pom.xml b/org.jacoco.doc/pom.xml
index 2b155696ea..398d826854 100644
--- a/org.jacoco.doc/pom.xml
+++ b/org.jacoco.doc/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.build
diff --git a/org.jacoco.examples.test/pom.xml b/org.jacoco.examples.test/pom.xml
index 41290b1121..08db8bc7b2 100644
--- a/org.jacoco.examples.test/pom.xml
+++ b/org.jacoco.examples.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.tests
diff --git a/org.jacoco.examples/pom.xml b/org.jacoco.examples/pom.xml
index a142dac5ef..6592acc885 100644
--- a/org.jacoco.examples/pom.xml
+++ b/org.jacoco.examples/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.build
diff --git a/org.jacoco.report.test/pom.xml b/org.jacoco.report.test/pom.xml
index 21b6172719..287c7924a4 100644
--- a/org.jacoco.report.test/pom.xml
+++ b/org.jacoco.report.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.tests
diff --git a/org.jacoco.report/pom.xml b/org.jacoco.report/pom.xml
index 38de0ac5c7..8b85e1517a 100644
--- a/org.jacoco.report/pom.xml
+++ b/org.jacoco.report/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.build
diff --git a/org.jacoco.tests/pom.xml b/org.jacoco.tests/pom.xml
index a4d9586a1a..b1de8e6931 100644
--- a/org.jacoco.tests/pom.xml
+++ b/org.jacoco.tests/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.build
- 0.8.9-SNAPSHOT
+ 0.8.9
../org.jacoco.build
diff --git a/pom.xml b/pom.xml
index d44ba75a33..a7418e0c20 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
org.jacoco
root
- 0.8.9-SNAPSHOT
+ 0.8.9
pom
From 3d58c42e6b80be9765a385afb44065f91ef48951 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov
Date: Mon, 3 Apr 2023 07:48:32 +0200
Subject: [PATCH 22/66] Prepare for next development iteration
---
jacoco-maven-plugin.test/pom.xml | 2 +-
jacoco-maven-plugin/pom.xml | 2 +-
jacoco/pom.xml | 2 +-
org.jacoco.agent.rt.test/pom.xml | 2 +-
org.jacoco.agent.rt/pom.xml | 2 +-
org.jacoco.agent.test/pom.xml | 2 +-
org.jacoco.agent/pom.xml | 2 +-
org.jacoco.ant.test/pom.xml | 2 +-
org.jacoco.ant/pom.xml | 2 +-
org.jacoco.build/pom.xml | 2 +-
org.jacoco.cli.test/pom.xml | 2 +-
org.jacoco.cli/pom.xml | 2 +-
org.jacoco.core.test.validation.groovy/pom.xml | 2 +-
org.jacoco.core.test.validation.java14/pom.xml | 2 +-
org.jacoco.core.test.validation.java16/pom.xml | 2 +-
org.jacoco.core.test.validation.java20/pom.xml | 2 +-
org.jacoco.core.test.validation.java5/pom.xml | 2 +-
org.jacoco.core.test.validation.java7/pom.xml | 2 +-
org.jacoco.core.test.validation.java8/pom.xml | 2 +-
org.jacoco.core.test.validation.kotlin/pom.xml | 2 +-
org.jacoco.core.test.validation.scala/pom.xml | 2 +-
org.jacoco.core.test.validation/pom.xml | 2 +-
org.jacoco.core.test/pom.xml | 2 +-
org.jacoco.core/pom.xml | 2 +-
org.jacoco.doc/docroot/doc/changes.html | 2 ++
org.jacoco.doc/pom.xml | 2 +-
org.jacoco.examples.test/pom.xml | 2 +-
org.jacoco.examples/pom.xml | 2 +-
org.jacoco.report.test/pom.xml | 2 +-
org.jacoco.report/pom.xml | 2 +-
org.jacoco.tests/pom.xml | 2 +-
pom.xml | 2 +-
32 files changed, 33 insertions(+), 31 deletions(-)
diff --git a/jacoco-maven-plugin.test/pom.xml b/jacoco-maven-plugin.test/pom.xml
index 947d0956e2..2b5562228c 100644
--- a/jacoco-maven-plugin.test/pom.xml
+++ b/jacoco-maven-plugin.test/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.tests
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.tests
diff --git a/jacoco-maven-plugin/pom.xml b/jacoco-maven-plugin/pom.xml
index 6d88886108..4425d5eb23 100644
--- a/jacoco-maven-plugin/pom.xml
+++ b/jacoco-maven-plugin/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.build
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.build
diff --git a/jacoco/pom.xml b/jacoco/pom.xml
index 5e41b7f11a..1152fc8611 100644
--- a/jacoco/pom.xml
+++ b/jacoco/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.build
diff --git a/org.jacoco.agent.rt.test/pom.xml b/org.jacoco.agent.rt.test/pom.xml
index 2ea4ffbaf1..0e099cf69a 100644
--- a/org.jacoco.agent.rt.test/pom.xml
+++ b/org.jacoco.agent.rt.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.tests
diff --git a/org.jacoco.agent.rt/pom.xml b/org.jacoco.agent.rt/pom.xml
index 39e959e435..d7bab4c0e4 100644
--- a/org.jacoco.agent.rt/pom.xml
+++ b/org.jacoco.agent.rt/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.build
diff --git a/org.jacoco.agent.test/pom.xml b/org.jacoco.agent.test/pom.xml
index 2156ff69a6..47a3b74bd8 100644
--- a/org.jacoco.agent.test/pom.xml
+++ b/org.jacoco.agent.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.tests
diff --git a/org.jacoco.agent/pom.xml b/org.jacoco.agent/pom.xml
index b02db06d00..1ff0c39879 100644
--- a/org.jacoco.agent/pom.xml
+++ b/org.jacoco.agent/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.build
diff --git a/org.jacoco.ant.test/pom.xml b/org.jacoco.ant.test/pom.xml
index 34e3334655..4041d98f89 100644
--- a/org.jacoco.ant.test/pom.xml
+++ b/org.jacoco.ant.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.tests
diff --git a/org.jacoco.ant/pom.xml b/org.jacoco.ant/pom.xml
index f7257e7ba5..e23084bcfc 100644
--- a/org.jacoco.ant/pom.xml
+++ b/org.jacoco.ant/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.build
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 3721013ac8..14a5f2545e 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -15,7 +15,7 @@
org.jacoco
org.jacoco.build
- 0.8.9
+ 0.8.10-SNAPSHOT
pom
JaCoCo
diff --git a/org.jacoco.cli.test/pom.xml b/org.jacoco.cli.test/pom.xml
index e39f977b58..fd1c2ec49d 100644
--- a/org.jacoco.cli.test/pom.xml
+++ b/org.jacoco.cli.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.tests
diff --git a/org.jacoco.cli/pom.xml b/org.jacoco.cli/pom.xml
index cf8326936b..edf5c4dbfb 100644
--- a/org.jacoco.cli/pom.xml
+++ b/org.jacoco.cli/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.build
diff --git a/org.jacoco.core.test.validation.groovy/pom.xml b/org.jacoco.core.test.validation.groovy/pom.xml
index 1945d3e380..c726fe79d1 100644
--- a/org.jacoco.core.test.validation.groovy/pom.xml
+++ b/org.jacoco.core.test.validation.groovy/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java14/pom.xml b/org.jacoco.core.test.validation.java14/pom.xml
index 643db62b25..4aa073750f 100644
--- a/org.jacoco.core.test.validation.java14/pom.xml
+++ b/org.jacoco.core.test.validation.java14/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java16/pom.xml b/org.jacoco.core.test.validation.java16/pom.xml
index 43d2913079..6297a949a7 100644
--- a/org.jacoco.core.test.validation.java16/pom.xml
+++ b/org.jacoco.core.test.validation.java16/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java20/pom.xml b/org.jacoco.core.test.validation.java20/pom.xml
index 1d6acf0a53..1720f824ef 100644
--- a/org.jacoco.core.test.validation.java20/pom.xml
+++ b/org.jacoco.core.test.validation.java20/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java5/pom.xml b/org.jacoco.core.test.validation.java5/pom.xml
index 080d75c6ad..10bc318827 100644
--- a/org.jacoco.core.test.validation.java5/pom.xml
+++ b/org.jacoco.core.test.validation.java5/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java7/pom.xml b/org.jacoco.core.test.validation.java7/pom.xml
index f4a05ba4e2..76036fbc91 100644
--- a/org.jacoco.core.test.validation.java7/pom.xml
+++ b/org.jacoco.core.test.validation.java7/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java8/pom.xml b/org.jacoco.core.test.validation.java8/pom.xml
index f7d7971eef..878672302f 100644
--- a/org.jacoco.core.test.validation.java8/pom.xml
+++ b/org.jacoco.core.test.validation.java8/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.kotlin/pom.xml b/org.jacoco.core.test.validation.kotlin/pom.xml
index a7f1e4e0bd..78988c60d7 100644
--- a/org.jacoco.core.test.validation.kotlin/pom.xml
+++ b/org.jacoco.core.test.validation.kotlin/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.scala/pom.xml b/org.jacoco.core.test.validation.scala/pom.xml
index 11db990b1a..b3e9bc54ba 100644
--- a/org.jacoco.core.test.validation.scala/pom.xml
+++ b/org.jacoco.core.test.validation.scala/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation/pom.xml b/org.jacoco.core.test.validation/pom.xml
index 1101301df2..149d5c29b8 100644
--- a/org.jacoco.core.test.validation/pom.xml
+++ b/org.jacoco.core.test.validation/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.tests
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.tests
diff --git a/org.jacoco.core.test/pom.xml b/org.jacoco.core.test/pom.xml
index 769e20df21..53db753958 100644
--- a/org.jacoco.core.test/pom.xml
+++ b/org.jacoco.core.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.tests
diff --git a/org.jacoco.core/pom.xml b/org.jacoco.core/pom.xml
index d6c8e74692..2c3296c88f 100644
--- a/org.jacoco.core/pom.xml
+++ b/org.jacoco.core/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.build
diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html
index 4ec2a2479e..c764d8d937 100644
--- a/org.jacoco.doc/docroot/doc/changes.html
+++ b/org.jacoco.doc/docroot/doc/changes.html
@@ -18,6 +18,8 @@
Change History
+Snapshot Build @qualified.bundle.version@ (@build.date@)
+
Release 0.8.9 (2023/03/31)
New Features
diff --git a/org.jacoco.doc/pom.xml b/org.jacoco.doc/pom.xml
index 398d826854..088bdf77a3 100644
--- a/org.jacoco.doc/pom.xml
+++ b/org.jacoco.doc/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.build
diff --git a/org.jacoco.examples.test/pom.xml b/org.jacoco.examples.test/pom.xml
index 08db8bc7b2..11fded55ec 100644
--- a/org.jacoco.examples.test/pom.xml
+++ b/org.jacoco.examples.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.tests
diff --git a/org.jacoco.examples/pom.xml b/org.jacoco.examples/pom.xml
index 6592acc885..5c5a97e428 100644
--- a/org.jacoco.examples/pom.xml
+++ b/org.jacoco.examples/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.build
diff --git a/org.jacoco.report.test/pom.xml b/org.jacoco.report.test/pom.xml
index 287c7924a4..485089c212 100644
--- a/org.jacoco.report.test/pom.xml
+++ b/org.jacoco.report.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.tests
diff --git a/org.jacoco.report/pom.xml b/org.jacoco.report/pom.xml
index 8b85e1517a..6f4570e872 100644
--- a/org.jacoco.report/pom.xml
+++ b/org.jacoco.report/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.build
diff --git a/org.jacoco.tests/pom.xml b/org.jacoco.tests/pom.xml
index b1de8e6931..b04e3f086b 100644
--- a/org.jacoco.tests/pom.xml
+++ b/org.jacoco.tests/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.build
- 0.8.9
+ 0.8.10-SNAPSHOT
../org.jacoco.build
diff --git a/pom.xml b/pom.xml
index a7418e0c20..7626c90086 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
org.jacoco
root
- 0.8.9
+ 0.8.10-SNAPSHOT
pom
From 31f16d834819526cf1e8ffbafed4b7e3fe5ed502 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Mon, 3 Apr 2023 11:06:41 +0200
Subject: [PATCH 23/66] Upgrade ECJ to 3.33.0 (#1423)
---
org.jacoco.build/pom.xml | 2 +-
.../core/test/validation/java16/InstanceofTest.java | 11 -----------
.../validation/java16/targets/InstanceofTarget.java | 2 +-
3 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 14a5f2545e..ae60db1649 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -939,7 +939,7 @@
org.eclipse.jdt
ecj
- 3.32.0
+ 3.33.0
org.codehaus.plexus
diff --git a/org.jacoco.core.test.validation.java16/src/org/jacoco/core/test/validation/java16/InstanceofTest.java b/org.jacoco.core.test.validation.java16/src/org/jacoco/core/test/validation/java16/InstanceofTest.java
index 3628c31c04..7c70e139b8 100644
--- a/org.jacoco.core.test.validation.java16/src/org/jacoco/core/test/validation/java16/InstanceofTest.java
+++ b/org.jacoco.core.test.validation.java16/src/org/jacoco/core/test/validation/java16/InstanceofTest.java
@@ -25,15 +25,4 @@ public InstanceofTest() {
super(InstanceofTarget.class);
}
- public void assertInstanceof(Line line) {
- if (isJDKCompiler) {
- assertFullyCovered(line, 0, 2);
- } else {
- // Upgrade to ECJ version with
- // https://github.com/eclipse-jdt/eclipse.jdt.core/commit/3b4c932227240d090904e141a485ba9181a79b67
- // will lead to the absence of missed branches
- assertFullyCovered(line, 1, 3);
- }
- }
-
}
diff --git a/org.jacoco.core.test.validation.java16/src/org/jacoco/core/test/validation/java16/targets/InstanceofTarget.java b/org.jacoco.core.test.validation.java16/src/org/jacoco/core/test/validation/java16/targets/InstanceofTarget.java
index 327ec5c8d0..1dd2a91fa3 100644
--- a/org.jacoco.core.test.validation.java16/src/org/jacoco/core/test/validation/java16/targets/InstanceofTarget.java
+++ b/org.jacoco.core.test.validation.java16/src/org/jacoco/core/test/validation/java16/targets/InstanceofTarget.java
@@ -21,7 +21,7 @@
public class InstanceofTarget {
private static void ifInstanceof(Object e) {
- if (e instanceof String s) { // assertInstanceof()
+ if (e instanceof String s) { // assertFullyCovered(0, 2)
nop(s);
}
}
From 8f1daf972bc193ce0e10ef57000d112ccaaa4c7a Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Fri, 21 Apr 2023 15:46:33 +0200
Subject: [PATCH 24/66] AgentModule should set ProtectionDomain when defining
classes (#1425)
---
.../agent/rt/internal/AgentModuleTest.java | 2 ++
.../jacoco/agent/rt/internal/AgentModule.java | 3 ++-
.../src/org/jacoco/ant/CoverageTaskTest.xml | 16 ++++++++++++++++
.../src/org/jacoco/ant/data/policy.txt | 9 +++++++++
org.jacoco.doc/docroot/doc/changes.html | 7 +++++++
5 files changed, 36 insertions(+), 1 deletion(-)
create mode 100644 org.jacoco.ant.test/src/org/jacoco/ant/data/policy.txt
diff --git a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/AgentModuleTest.java b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/AgentModuleTest.java
index 88d26aee38..7a990d6619 100644
--- a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/AgentModuleTest.java
+++ b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/AgentModuleTest.java
@@ -41,6 +41,8 @@ public void should_only_load_classes_in_scope() throws Exception {
assertNotSame(this.getClass().getClassLoader(),
t.getClass().getClassLoader());
+ assertSame(AgentModule.class.getProtectionDomain(),
+ t.getClass().getProtectionDomain());
assertSame(t.getClass().getClassLoader(),
t.getInnerClassInstance().getClass().getClassLoader());
assertNotSame(this.getClass().getClassLoader(),
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/AgentModule.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/AgentModule.java
index 88a2e02c50..9b7da400a7 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/AgentModule.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/AgentModule.java
@@ -75,7 +75,8 @@ protected Class> loadClass(final String name,
} catch (final IOException e) {
throw new RuntimeException(e);
}
- return defineClass(name, bytes, 0, bytes.length);
+ return defineClass(name, bytes, 0, bytes.length,
+ AgentModule.class.getProtectionDomain());
}
};
}
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.xml b/org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.xml
index 4cd7da89bd..a7fdf205e7 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.xml
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.xml
@@ -166,4 +166,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/data/policy.txt b/org.jacoco.ant.test/src/org/jacoco/ant/data/policy.txt
new file mode 100644
index 0000000000..83b6109a53
--- /dev/null
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/data/policy.txt
@@ -0,0 +1,9 @@
+grant codeBase "file:${jacoco.agent}" {
+ permission java.io.FilePermission "${jacoco.exec}/..", "read";
+ permission java.io.FilePermission "${jacoco.exec}", "write";
+ permission java.lang.RuntimePermission "shutdownHooks";
+ permission java.lang.RuntimePermission "createClassLoader";
+ permission java.lang.RuntimePermission "getProtectionDomain";
+ permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
+ permission java.lang.RuntimePermission "defineClass";
+};
diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html
index c764d8d937..6f52f9c312 100644
--- a/org.jacoco.doc/docroot/doc/changes.html
+++ b/org.jacoco.doc/docroot/doc/changes.html
@@ -20,6 +20,13 @@ Change History
Snapshot Build @qualified.bundle.version@ (@build.date@)
+Fixed bugs
+
+ - Agent should not require configuration of permissions for
+
SecurityManager outside of its codeBase
+ (GitHub #1425).
+
+
Release 0.8.9 (2023/03/31)
New Features
From 8ea9668fa0272a6649e031f580c04ede04a7f17c Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov
Date: Mon, 24 Apr 2023 11:44:06 +0200
Subject: [PATCH 25/66] Prepare release 0.8.10
---
jacoco-maven-plugin.test/pom.xml | 2 +-
jacoco-maven-plugin/pom.xml | 2 +-
jacoco/pom.xml | 2 +-
org.jacoco.agent.rt.test/pom.xml | 2 +-
org.jacoco.agent.rt/pom.xml | 2 +-
org.jacoco.agent.test/pom.xml | 2 +-
org.jacoco.agent/pom.xml | 2 +-
org.jacoco.ant.test/pom.xml | 2 +-
org.jacoco.ant/pom.xml | 2 +-
org.jacoco.build/pom.xml | 2 +-
org.jacoco.cli.test/pom.xml | 2 +-
org.jacoco.cli/pom.xml | 2 +-
org.jacoco.core.test.validation.groovy/pom.xml | 2 +-
org.jacoco.core.test.validation.java14/pom.xml | 2 +-
org.jacoco.core.test.validation.java16/pom.xml | 2 +-
org.jacoco.core.test.validation.java20/pom.xml | 2 +-
org.jacoco.core.test.validation.java5/pom.xml | 2 +-
org.jacoco.core.test.validation.java7/pom.xml | 2 +-
org.jacoco.core.test.validation.java8/pom.xml | 2 +-
org.jacoco.core.test.validation.kotlin/pom.xml | 2 +-
org.jacoco.core.test.validation.scala/pom.xml | 2 +-
org.jacoco.core.test.validation/pom.xml | 2 +-
org.jacoco.core.test/pom.xml | 2 +-
org.jacoco.core/pom.xml | 2 +-
org.jacoco.doc/docroot/doc/changes.html | 2 +-
org.jacoco.doc/pom.xml | 2 +-
org.jacoco.examples.test/pom.xml | 2 +-
org.jacoco.examples/pom.xml | 2 +-
org.jacoco.report.test/pom.xml | 2 +-
org.jacoco.report/pom.xml | 2 +-
org.jacoco.tests/pom.xml | 2 +-
pom.xml | 2 +-
32 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/jacoco-maven-plugin.test/pom.xml b/jacoco-maven-plugin.test/pom.xml
index 2b5562228c..3771f8a833 100644
--- a/jacoco-maven-plugin.test/pom.xml
+++ b/jacoco-maven-plugin.test/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.tests
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.tests
diff --git a/jacoco-maven-plugin/pom.xml b/jacoco-maven-plugin/pom.xml
index 4425d5eb23..784a975cec 100644
--- a/jacoco-maven-plugin/pom.xml
+++ b/jacoco-maven-plugin/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.build
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.build
diff --git a/jacoco/pom.xml b/jacoco/pom.xml
index 1152fc8611..729a380926 100644
--- a/jacoco/pom.xml
+++ b/jacoco/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.build
diff --git a/org.jacoco.agent.rt.test/pom.xml b/org.jacoco.agent.rt.test/pom.xml
index 0e099cf69a..5d916a8908 100644
--- a/org.jacoco.agent.rt.test/pom.xml
+++ b/org.jacoco.agent.rt.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.tests
diff --git a/org.jacoco.agent.rt/pom.xml b/org.jacoco.agent.rt/pom.xml
index d7bab4c0e4..9b58bdecbe 100644
--- a/org.jacoco.agent.rt/pom.xml
+++ b/org.jacoco.agent.rt/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.build
diff --git a/org.jacoco.agent.test/pom.xml b/org.jacoco.agent.test/pom.xml
index 47a3b74bd8..a1a6ad1407 100644
--- a/org.jacoco.agent.test/pom.xml
+++ b/org.jacoco.agent.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.tests
diff --git a/org.jacoco.agent/pom.xml b/org.jacoco.agent/pom.xml
index 1ff0c39879..155eea108e 100644
--- a/org.jacoco.agent/pom.xml
+++ b/org.jacoco.agent/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.build
diff --git a/org.jacoco.ant.test/pom.xml b/org.jacoco.ant.test/pom.xml
index 4041d98f89..8399b1ee75 100644
--- a/org.jacoco.ant.test/pom.xml
+++ b/org.jacoco.ant.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.tests
diff --git a/org.jacoco.ant/pom.xml b/org.jacoco.ant/pom.xml
index e23084bcfc..20b9f49ee7 100644
--- a/org.jacoco.ant/pom.xml
+++ b/org.jacoco.ant/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.build
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index ae60db1649..402ee62985 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -15,7 +15,7 @@
org.jacoco
org.jacoco.build
- 0.8.10-SNAPSHOT
+ 0.8.10
pom
JaCoCo
diff --git a/org.jacoco.cli.test/pom.xml b/org.jacoco.cli.test/pom.xml
index fd1c2ec49d..df5e545f68 100644
--- a/org.jacoco.cli.test/pom.xml
+++ b/org.jacoco.cli.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.tests
diff --git a/org.jacoco.cli/pom.xml b/org.jacoco.cli/pom.xml
index edf5c4dbfb..b224455349 100644
--- a/org.jacoco.cli/pom.xml
+++ b/org.jacoco.cli/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.build
diff --git a/org.jacoco.core.test.validation.groovy/pom.xml b/org.jacoco.core.test.validation.groovy/pom.xml
index c726fe79d1..96ec14e480 100644
--- a/org.jacoco.core.test.validation.groovy/pom.xml
+++ b/org.jacoco.core.test.validation.groovy/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java14/pom.xml b/org.jacoco.core.test.validation.java14/pom.xml
index 4aa073750f..6ca1b3c794 100644
--- a/org.jacoco.core.test.validation.java14/pom.xml
+++ b/org.jacoco.core.test.validation.java14/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java16/pom.xml b/org.jacoco.core.test.validation.java16/pom.xml
index 6297a949a7..53b2d9f1d9 100644
--- a/org.jacoco.core.test.validation.java16/pom.xml
+++ b/org.jacoco.core.test.validation.java16/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java20/pom.xml b/org.jacoco.core.test.validation.java20/pom.xml
index 1720f824ef..99304eafb6 100644
--- a/org.jacoco.core.test.validation.java20/pom.xml
+++ b/org.jacoco.core.test.validation.java20/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java5/pom.xml b/org.jacoco.core.test.validation.java5/pom.xml
index 10bc318827..0a42c56f1f 100644
--- a/org.jacoco.core.test.validation.java5/pom.xml
+++ b/org.jacoco.core.test.validation.java5/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java7/pom.xml b/org.jacoco.core.test.validation.java7/pom.xml
index 76036fbc91..32fb474261 100644
--- a/org.jacoco.core.test.validation.java7/pom.xml
+++ b/org.jacoco.core.test.validation.java7/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java8/pom.xml b/org.jacoco.core.test.validation.java8/pom.xml
index 878672302f..2592f8d49e 100644
--- a/org.jacoco.core.test.validation.java8/pom.xml
+++ b/org.jacoco.core.test.validation.java8/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.kotlin/pom.xml b/org.jacoco.core.test.validation.kotlin/pom.xml
index 78988c60d7..ab721eee5b 100644
--- a/org.jacoco.core.test.validation.kotlin/pom.xml
+++ b/org.jacoco.core.test.validation.kotlin/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.scala/pom.xml b/org.jacoco.core.test.validation.scala/pom.xml
index b3e9bc54ba..5f99c28112 100644
--- a/org.jacoco.core.test.validation.scala/pom.xml
+++ b/org.jacoco.core.test.validation.scala/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation/pom.xml b/org.jacoco.core.test.validation/pom.xml
index 149d5c29b8..157377f6b1 100644
--- a/org.jacoco.core.test.validation/pom.xml
+++ b/org.jacoco.core.test.validation/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.tests
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.tests
diff --git a/org.jacoco.core.test/pom.xml b/org.jacoco.core.test/pom.xml
index 53db753958..7e969b66e6 100644
--- a/org.jacoco.core.test/pom.xml
+++ b/org.jacoco.core.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.tests
diff --git a/org.jacoco.core/pom.xml b/org.jacoco.core/pom.xml
index 2c3296c88f..88a76b2943 100644
--- a/org.jacoco.core/pom.xml
+++ b/org.jacoco.core/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.build
diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html
index 6f52f9c312..03f6e3f41d 100644
--- a/org.jacoco.doc/docroot/doc/changes.html
+++ b/org.jacoco.doc/docroot/doc/changes.html
@@ -18,7 +18,7 @@
Change History
-Snapshot Build @qualified.bundle.version@ (@build.date@)
+Release 0.8.10 (2023/04/24)
Fixed bugs
diff --git a/org.jacoco.doc/pom.xml b/org.jacoco.doc/pom.xml
index 088bdf77a3..f405fb4cb0 100644
--- a/org.jacoco.doc/pom.xml
+++ b/org.jacoco.doc/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.build
diff --git a/org.jacoco.examples.test/pom.xml b/org.jacoco.examples.test/pom.xml
index 11fded55ec..cf57b8a5ea 100644
--- a/org.jacoco.examples.test/pom.xml
+++ b/org.jacoco.examples.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.tests
diff --git a/org.jacoco.examples/pom.xml b/org.jacoco.examples/pom.xml
index 5c5a97e428..2acdd48ec6 100644
--- a/org.jacoco.examples/pom.xml
+++ b/org.jacoco.examples/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.build
diff --git a/org.jacoco.report.test/pom.xml b/org.jacoco.report.test/pom.xml
index 485089c212..6016963c72 100644
--- a/org.jacoco.report.test/pom.xml
+++ b/org.jacoco.report.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.tests
diff --git a/org.jacoco.report/pom.xml b/org.jacoco.report/pom.xml
index 6f4570e872..38cfcd7c71 100644
--- a/org.jacoco.report/pom.xml
+++ b/org.jacoco.report/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.build
diff --git a/org.jacoco.tests/pom.xml b/org.jacoco.tests/pom.xml
index b04e3f086b..1695f572e5 100644
--- a/org.jacoco.tests/pom.xml
+++ b/org.jacoco.tests/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.build
- 0.8.10-SNAPSHOT
+ 0.8.10
../org.jacoco.build
diff --git a/pom.xml b/pom.xml
index 7626c90086..30e2b6e40f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
org.jacoco
root
- 0.8.10-SNAPSHOT
+ 0.8.10
pom
From 82f3087a708c7ddc523ed27b9081dc6f546091c9 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov
Date: Mon, 24 Apr 2023 12:06:46 +0200
Subject: [PATCH 26/66] Prepare for next development iteration
---
jacoco-maven-plugin.test/pom.xml | 2 +-
jacoco-maven-plugin/pom.xml | 2 +-
jacoco/pom.xml | 2 +-
org.jacoco.agent.rt.test/pom.xml | 2 +-
org.jacoco.agent.rt/pom.xml | 2 +-
org.jacoco.agent.test/pom.xml | 2 +-
org.jacoco.agent/pom.xml | 2 +-
org.jacoco.ant.test/pom.xml | 2 +-
org.jacoco.ant/pom.xml | 2 +-
org.jacoco.build/pom.xml | 2 +-
org.jacoco.cli.test/pom.xml | 2 +-
org.jacoco.cli/pom.xml | 2 +-
org.jacoco.core.test.validation.groovy/pom.xml | 2 +-
org.jacoco.core.test.validation.java14/pom.xml | 2 +-
org.jacoco.core.test.validation.java16/pom.xml | 2 +-
org.jacoco.core.test.validation.java20/pom.xml | 2 +-
org.jacoco.core.test.validation.java5/pom.xml | 2 +-
org.jacoco.core.test.validation.java7/pom.xml | 2 +-
org.jacoco.core.test.validation.java8/pom.xml | 2 +-
org.jacoco.core.test.validation.kotlin/pom.xml | 2 +-
org.jacoco.core.test.validation.scala/pom.xml | 2 +-
org.jacoco.core.test.validation/pom.xml | 2 +-
org.jacoco.core.test/pom.xml | 2 +-
org.jacoco.core/pom.xml | 2 +-
org.jacoco.doc/docroot/doc/changes.html | 2 ++
org.jacoco.doc/pom.xml | 2 +-
org.jacoco.examples.test/pom.xml | 2 +-
org.jacoco.examples/pom.xml | 2 +-
org.jacoco.report.test/pom.xml | 2 +-
org.jacoco.report/pom.xml | 2 +-
org.jacoco.tests/pom.xml | 2 +-
pom.xml | 2 +-
32 files changed, 33 insertions(+), 31 deletions(-)
diff --git a/jacoco-maven-plugin.test/pom.xml b/jacoco-maven-plugin.test/pom.xml
index 3771f8a833..809fea1429 100644
--- a/jacoco-maven-plugin.test/pom.xml
+++ b/jacoco-maven-plugin.test/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.tests
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.tests
diff --git a/jacoco-maven-plugin/pom.xml b/jacoco-maven-plugin/pom.xml
index 784a975cec..205fe09aed 100644
--- a/jacoco-maven-plugin/pom.xml
+++ b/jacoco-maven-plugin/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.build
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.build
diff --git a/jacoco/pom.xml b/jacoco/pom.xml
index 729a380926..82956db3a0 100644
--- a/jacoco/pom.xml
+++ b/jacoco/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.build
diff --git a/org.jacoco.agent.rt.test/pom.xml b/org.jacoco.agent.rt.test/pom.xml
index 5d916a8908..f6f1675f2d 100644
--- a/org.jacoco.agent.rt.test/pom.xml
+++ b/org.jacoco.agent.rt.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.tests
diff --git a/org.jacoco.agent.rt/pom.xml b/org.jacoco.agent.rt/pom.xml
index 9b58bdecbe..9a7e19c5a8 100644
--- a/org.jacoco.agent.rt/pom.xml
+++ b/org.jacoco.agent.rt/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.build
diff --git a/org.jacoco.agent.test/pom.xml b/org.jacoco.agent.test/pom.xml
index a1a6ad1407..c0094a3e93 100644
--- a/org.jacoco.agent.test/pom.xml
+++ b/org.jacoco.agent.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.tests
diff --git a/org.jacoco.agent/pom.xml b/org.jacoco.agent/pom.xml
index 155eea108e..31e5acfe0a 100644
--- a/org.jacoco.agent/pom.xml
+++ b/org.jacoco.agent/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.build
diff --git a/org.jacoco.ant.test/pom.xml b/org.jacoco.ant.test/pom.xml
index 8399b1ee75..0d5b66ece9 100644
--- a/org.jacoco.ant.test/pom.xml
+++ b/org.jacoco.ant.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.tests
diff --git a/org.jacoco.ant/pom.xml b/org.jacoco.ant/pom.xml
index 20b9f49ee7..2964c4942c 100644
--- a/org.jacoco.ant/pom.xml
+++ b/org.jacoco.ant/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.build
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 402ee62985..2ee683232b 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -15,7 +15,7 @@
org.jacoco
org.jacoco.build
- 0.8.10
+ 0.8.11-SNAPSHOT
pom
JaCoCo
diff --git a/org.jacoco.cli.test/pom.xml b/org.jacoco.cli.test/pom.xml
index df5e545f68..0627e314de 100644
--- a/org.jacoco.cli.test/pom.xml
+++ b/org.jacoco.cli.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.tests
diff --git a/org.jacoco.cli/pom.xml b/org.jacoco.cli/pom.xml
index b224455349..8cdca0a519 100644
--- a/org.jacoco.cli/pom.xml
+++ b/org.jacoco.cli/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.build
diff --git a/org.jacoco.core.test.validation.groovy/pom.xml b/org.jacoco.core.test.validation.groovy/pom.xml
index 96ec14e480..6e8fe29ebb 100644
--- a/org.jacoco.core.test.validation.groovy/pom.xml
+++ b/org.jacoco.core.test.validation.groovy/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java14/pom.xml b/org.jacoco.core.test.validation.java14/pom.xml
index 6ca1b3c794..762fba03ec 100644
--- a/org.jacoco.core.test.validation.java14/pom.xml
+++ b/org.jacoco.core.test.validation.java14/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java16/pom.xml b/org.jacoco.core.test.validation.java16/pom.xml
index 53b2d9f1d9..6bf638caaf 100644
--- a/org.jacoco.core.test.validation.java16/pom.xml
+++ b/org.jacoco.core.test.validation.java16/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java20/pom.xml b/org.jacoco.core.test.validation.java20/pom.xml
index 99304eafb6..9f3b5fcf4a 100644
--- a/org.jacoco.core.test.validation.java20/pom.xml
+++ b/org.jacoco.core.test.validation.java20/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java5/pom.xml b/org.jacoco.core.test.validation.java5/pom.xml
index 0a42c56f1f..87b27eee39 100644
--- a/org.jacoco.core.test.validation.java5/pom.xml
+++ b/org.jacoco.core.test.validation.java5/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java7/pom.xml b/org.jacoco.core.test.validation.java7/pom.xml
index 32fb474261..5c113c7ba9 100644
--- a/org.jacoco.core.test.validation.java7/pom.xml
+++ b/org.jacoco.core.test.validation.java7/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.java8/pom.xml b/org.jacoco.core.test.validation.java8/pom.xml
index 2592f8d49e..a10fdb915f 100644
--- a/org.jacoco.core.test.validation.java8/pom.xml
+++ b/org.jacoco.core.test.validation.java8/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.kotlin/pom.xml b/org.jacoco.core.test.validation.kotlin/pom.xml
index ab721eee5b..3e3789e20a 100644
--- a/org.jacoco.core.test.validation.kotlin/pom.xml
+++ b/org.jacoco.core.test.validation.kotlin/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation.scala/pom.xml b/org.jacoco.core.test.validation.scala/pom.xml
index 5f99c28112..57d812cce9 100644
--- a/org.jacoco.core.test.validation.scala/pom.xml
+++ b/org.jacoco.core.test.validation.scala/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.core.test.validation
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.core.test.validation
diff --git a/org.jacoco.core.test.validation/pom.xml b/org.jacoco.core.test.validation/pom.xml
index 157377f6b1..beefa4526a 100644
--- a/org.jacoco.core.test.validation/pom.xml
+++ b/org.jacoco.core.test.validation/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.tests
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.tests
diff --git a/org.jacoco.core.test/pom.xml b/org.jacoco.core.test/pom.xml
index 7e969b66e6..6009c16392 100644
--- a/org.jacoco.core.test/pom.xml
+++ b/org.jacoco.core.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.tests
diff --git a/org.jacoco.core/pom.xml b/org.jacoco.core/pom.xml
index 88a76b2943..cdf0864ebd 100644
--- a/org.jacoco.core/pom.xml
+++ b/org.jacoco.core/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.build
diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html
index 03f6e3f41d..2a6e53476f 100644
--- a/org.jacoco.doc/docroot/doc/changes.html
+++ b/org.jacoco.doc/docroot/doc/changes.html
@@ -18,6 +18,8 @@
Change History
+Snapshot Build @qualified.bundle.version@ (@build.date@)
+
Release 0.8.10 (2023/04/24)
Fixed bugs
diff --git a/org.jacoco.doc/pom.xml b/org.jacoco.doc/pom.xml
index f405fb4cb0..6d5fcff22d 100644
--- a/org.jacoco.doc/pom.xml
+++ b/org.jacoco.doc/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.build
diff --git a/org.jacoco.examples.test/pom.xml b/org.jacoco.examples.test/pom.xml
index cf57b8a5ea..a08ed8eed7 100644
--- a/org.jacoco.examples.test/pom.xml
+++ b/org.jacoco.examples.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.tests
diff --git a/org.jacoco.examples/pom.xml b/org.jacoco.examples/pom.xml
index 2acdd48ec6..4349545bb6 100644
--- a/org.jacoco.examples/pom.xml
+++ b/org.jacoco.examples/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.build
diff --git a/org.jacoco.report.test/pom.xml b/org.jacoco.report.test/pom.xml
index 6016963c72..2802ae44da 100644
--- a/org.jacoco.report.test/pom.xml
+++ b/org.jacoco.report.test/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.tests
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.tests
diff --git a/org.jacoco.report/pom.xml b/org.jacoco.report/pom.xml
index 38cfcd7c71..476dd0c2f4 100644
--- a/org.jacoco.report/pom.xml
+++ b/org.jacoco.report/pom.xml
@@ -16,7 +16,7 @@
org.jacoco
org.jacoco.build
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.build
diff --git a/org.jacoco.tests/pom.xml b/org.jacoco.tests/pom.xml
index 1695f572e5..6f94cb4e80 100644
--- a/org.jacoco.tests/pom.xml
+++ b/org.jacoco.tests/pom.xml
@@ -17,7 +17,7 @@
org.jacoco
org.jacoco.build
- 0.8.10
+ 0.8.11-SNAPSHOT
../org.jacoco.build
diff --git a/pom.xml b/pom.xml
index 30e2b6e40f..705ad019f7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
org.jacoco
root
- 0.8.10
+ 0.8.11-SNAPSHOT
pom
From 8eefbb75b9e52a704d49ded21ed235eaa9b1003c Mon Sep 17 00:00:00 2001
From: Stefan Arnold
Date: Thu, 4 May 2023 14:17:51 +0200
Subject: [PATCH 27/66] Updated licenses to 2023
---
.../core/internal/analysis/filter/KotlinComposeFilterTest.java | 2 +-
.../core/internal/analysis/filter/KotlinComposeFilter.java | 2 +-
.../core/internal/analysis/filter/KotlinFilterCommons.java | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinComposeFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinComposeFilterTest.java
index c0899df7d7..c26d6ecf78 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinComposeFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinComposeFilterTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2022 Mountainminds GmbH & Co. KG and Contributors
+ * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinComposeFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinComposeFilter.java
index 1df4f64b92..5628cbf41c 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinComposeFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinComposeFilter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2022 Mountainminds GmbH & Co. KG and Contributors
+ * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinFilterCommons.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinFilterCommons.java
index 5eb12538d6..2bb1f8599b 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinFilterCommons.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinFilterCommons.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2022 Mountainminds GmbH & Co. KG and Contributors
+ * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
From 3a018f602972f9db839258d04a16d0c1b49037be Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Tue, 9 May 2023 13:07:00 +0200
Subject: [PATCH 28/66] Fix build for JDK 21 EA b21 (#1433)
---
org.jacoco.core.test.validation/pom.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/org.jacoco.core.test.validation/pom.xml b/org.jacoco.core.test.validation/pom.xml
index beefa4526a..a296332766 100644
--- a/org.jacoco.core.test.validation/pom.xml
+++ b/org.jacoco.core.test.validation/pom.xml
@@ -452,7 +452,9 @@
+
From 908c855c6b1409806bfc93fd97e7949a125290d8 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Wed, 10 May 2023 13:52:22 +0200
Subject: [PATCH 29/66] Remove unused script (#1434)
---
org.jacoco.build/publish.sh | 11 -----------
1 file changed, 11 deletions(-)
delete mode 100755 org.jacoco.build/publish.sh
diff --git a/org.jacoco.build/publish.sh b/org.jacoco.build/publish.sh
deleted file mode 100755
index c2c069fe86..0000000000
--- a/org.jacoco.build/publish.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh -e
-
-if [ "$1" = "" ]; then
- echo "Usage: $0 "
- exit 1
-fi
-
-USERNAME=$1
-
-ssh $USERNAME,eclemma@shell.sourceforge.net create
-ssh $USERNAME,eclemma@shell.sourceforge.net '/home/project-web/eclemma/scripts/publish-jacoco-snapshot.sh'
From 4dc8b3855c82c868d7756944519c90d4326913da Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Fri, 12 May 2023 07:00:06 +0200
Subject: [PATCH 30/66] Fix execution of tests in IntelliJ IDEA (#1437)
Prior to this change execution of some tests in IntelliJ IDEA 2022.3.3
fails with `ExceptionInInitializerError`
```
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 7
at java.lang.String.substring(String.java:1963)
at org.jacoco.core.JaCoCo.(JaCoCo.java:44)
```
because build of the project in IntelliJ IDEA produces following
`org.jacoco.core/target/classes/org/jacoco/core/jacoco.properties`
```
VERSION=${qualified.bundle.version}
COMMITID=
HOMEURL=http://www.jacoco.org/jacoco
RUNTIMEPACKAGE=${jacoco.runtime.package.name}
```
after this change produces
```
VERSION=${qualified.bundle.version}
COMMITID=0000000
HOMEURL=http://www.jacoco.org/jacoco
RUNTIMEPACKAGE=${jacoco.runtime.package.name}
```
and tests pass.
---
org.jacoco.build/pom.xml | 10 ++++++----
org.jacoco.core/src/org/jacoco/core/jacoco.properties | 2 +-
org.jacoco.doc/docroot/index.html | 2 +-
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 2ee683232b..9d6995be94 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -128,6 +128,7 @@
https://oss.sonatype.org/content/repositories/snapshots/
yyyyMMddhhmm
+ 0000000
http://www.jacoco.org/jacoco
${project.inceptionYear}, 2023
@@ -668,6 +669,7 @@
false
true
0000000
+ build.commitId
@@ -699,8 +701,8 @@
buildDate = qualifier.substring(0, 4) + "/" + qualifier.substring(4, 6) + "/" + qualifier.substring(6, 8);
project.getProperties().setProperty("build.date", buildDate);
- buildNumber = project.getProperties().get("buildNumber");
- pkgName = buildNumber.substring(buildNumber.length() - 7, buildNumber.length());
+ commitId = project.getProperties().get("build.commitId");
+ pkgName = commitId.substring(commitId.length() - 7, commitId.length());
project.getProperties().setProperty("jacoco.runtime.package.name", "org.jacoco.agent.rt.internal_" + pkgName);
void loadLicense(String libraryId) {
@@ -737,7 +739,7 @@
org.objectweb.asm.*;version="${range;[===,=+);${asm.version}}"
J2SE-1.5
- scm:git:git://github.com/jacoco/jacoco.git;path="${project.artifactId}";commitId=${buildNumber}
+ scm:git:git://github.com/jacoco/jacoco.git;path="${project.artifactId}";commitId=${build.commitId}
@@ -1108,7 +1110,7 @@
- buildNumber
+ build.commitId
[0-9a-f]{40}
diff --git a/org.jacoco.core/src/org/jacoco/core/jacoco.properties b/org.jacoco.core/src/org/jacoco/core/jacoco.properties
index 035ed90d56..8325c1b433 100644
--- a/org.jacoco.core/src/org/jacoco/core/jacoco.properties
+++ b/org.jacoco.core/src/org/jacoco/core/jacoco.properties
@@ -1,4 +1,4 @@
VERSION=${qualified.bundle.version}
-COMMITID=${buildNumber}
+COMMITID=${build.commitId}
HOMEURL=${jacoco.home.url}
RUNTIMEPACKAGE=${jacoco.runtime.package.name}
diff --git a/org.jacoco.doc/docroot/index.html b/org.jacoco.doc/docroot/index.html
index e7a6cbe7b0..320d4cca4c 100644
--- a/org.jacoco.doc/docroot/index.html
+++ b/org.jacoco.doc/docroot/index.html
@@ -25,7 +25,7 @@ JaCoCo - Java Code Coverage Library
This is the distribution of version ${qualified.bundle.version} created on
${build.date} based on commit
- ${buildNumber}.
+ ${build.commitId}.
Contents
From 1a1db3bc1e51d6320ed8eb7da086ad401aef1ff7 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Mon, 15 May 2023 18:29:19 +0200
Subject: [PATCH 31/66] Add safety slot before variable for probe array (#893)
---
.../internal/instr/ProbeInserterTest.java | 138 ++++++++++++------
.../core/internal/instr/SafetySlotTest.java | 129 ++++++++++++++++
.../core/internal/instr/ProbeInserter.java | 56 +++----
org.jacoco.doc/docroot/doc/changes.html | 8 +
4 files changed, 263 insertions(+), 68 deletions(-)
create mode 100644 org.jacoco.core.test/src/org/jacoco/core/internal/instr/SafetySlotTest.java
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeInserterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeInserterTest.java
index 39d0e510bf..382efd1b83 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeInserterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeInserterTest.java
@@ -59,48 +59,48 @@ public void verify() {
}
@Test
- public void probevar_should_be_at_position_0_for_static_method_without_parameters() {
+ public void probevar_should_be_at_position_1_for_static_method_without_parameters() {
ProbeInserter pi = new ProbeInserter(Opcodes.ACC_STATIC, "m", "()V",
actualVisitor, arrayStrategy);
pi.insertProbe(0);
- expectedVisitor.visitVarInsn(Opcodes.ALOAD, 0);
+ expectedVisitor.visitVarInsn(Opcodes.ALOAD, 1);
expectedVisitor.visitInsn(Opcodes.ICONST_0);
expectedVisitor.visitInsn(Opcodes.ICONST_1);
expectedVisitor.visitInsn(Opcodes.BASTORE);
}
@Test
- public void probevar_should_be_at_position_1_for_instance_method_without_parameters() {
+ public void probevar_should_be_at_position_2_for_instance_method_without_parameters() {
ProbeInserter pi = new ProbeInserter(0, "m", "()V", actualVisitor,
arrayStrategy);
pi.insertProbe(0);
- expectedVisitor.visitVarInsn(Opcodes.ALOAD, 1);
+ expectedVisitor.visitVarInsn(Opcodes.ALOAD, 2);
expectedVisitor.visitInsn(Opcodes.ICONST_0);
expectedVisitor.visitInsn(Opcodes.ICONST_1);
expectedVisitor.visitInsn(Opcodes.BASTORE);
}
@Test
- public void probevar_should_be_at_position_4_for_instance_method_with_3_parameters() {
+ public void probevar_should_be_at_position_5_for_instance_method_with_3_parameters() {
ProbeInserter pi = new ProbeInserter(0, "m", "(IZLjava/lang/Object;)V",
actualVisitor, arrayStrategy);
pi.insertProbe(0);
- expectedVisitor.visitVarInsn(Opcodes.ALOAD, 4);
+ expectedVisitor.visitVarInsn(Opcodes.ALOAD, 5);
expectedVisitor.visitInsn(Opcodes.ICONST_0);
expectedVisitor.visitInsn(Opcodes.ICONST_1);
expectedVisitor.visitInsn(Opcodes.BASTORE);
}
@Test
- public void probevar_should_be_at_position_5_for_instance_method_with_2_wide_parameters() {
+ public void probevar_should_be_at_position_6_for_instance_method_with_2_wide_parameters() {
ProbeInserter pi = new ProbeInserter(0, "m", "(JD)V", actualVisitor,
arrayStrategy);
pi.insertProbe(0);
- expectedVisitor.visitVarInsn(Opcodes.ALOAD, 5);
+ expectedVisitor.visitVarInsn(Opcodes.ALOAD, 6);
expectedVisitor.visitInsn(Opcodes.ICONST_0);
expectedVisitor.visitInsn(Opcodes.ICONST_1);
expectedVisitor.visitInsn(Opcodes.BASTORE);
@@ -142,9 +142,9 @@ public void visitVarInsn_should_be_called_with_adjusted_variable_positions() {
expectedVisitor.visitVarInsn(Opcodes.ILOAD, 1);
expectedVisitor.visitVarInsn(Opcodes.ILOAD, 2);
- // Local variables are shifted by one:
- expectedVisitor.visitVarInsn(Opcodes.ISTORE, 4);
- expectedVisitor.visitVarInsn(Opcodes.FSTORE, 5);
+ // Local variables are shifted by two:
+ expectedVisitor.visitVarInsn(Opcodes.ISTORE, 5);
+ expectedVisitor.visitVarInsn(Opcodes.FSTORE, 6);
}
@Test
@@ -162,9 +162,9 @@ public void visitIincInsn_should_be_called_with_adjusted_variable_positions() {
expectedVisitor.visitIincInsn(1, 101);
expectedVisitor.visitIincInsn(2, 102);
- // Local variables are shifted by one:
- expectedVisitor.visitIincInsn(4, 103);
- expectedVisitor.visitIincInsn(5, 104);
+ // Local variables are shifted by two:
+ expectedVisitor.visitIincInsn(5, 103);
+ expectedVisitor.visitIincInsn(6, 104);
}
@Test
@@ -185,9 +185,9 @@ public void visitLocalVariable_should_be_called_with_adjusted_variable_positions
expectedVisitor.visitLocalVariable(null, null, null, begin, null, 1);
expectedVisitor.visitLocalVariable(null, null, null, begin, null, 2);
- // Local variables are shifted by one:
- expectedVisitor.visitLocalVariable(null, null, null, null, null, 4);
+ // Local variables are shifted by two:
expectedVisitor.visitLocalVariable(null, null, null, null, null, 5);
+ expectedVisitor.visitLocalVariable(null, null, null, null, null, 6);
}
@Test
@@ -206,10 +206,10 @@ public void should_remap_LocalVariableAnnotation() {
expectedVisitor.visitLabel(start);
expectedVisitor.visitLabel(end);
- // Local variables are shifted by one:
+ // Local variables are shifted by two:
expectedVisitor.visitLocalVariableAnnotation(
TypeReference.LOCAL_VARIABLE, null, new Label[] { start },
- new Label[] { end }, new int[] { 3 }, "LNonNull;", false);
+ new Label[] { end }, new int[] { 4 }, "LNonNull;", false);
}
@Test
@@ -221,7 +221,7 @@ public void new_stack_size_should_be_big_enought_to_store_probe_array() {
expectedVisitor.visitLabel(new Label());
expectedVisitor.visitLdcInsn("init");
- expectedVisitor.visitMaxs(5, 9);
+ expectedVisitor.visitMaxs(5, 10);
}
@Test
@@ -233,11 +233,11 @@ public void new_stack_size_should_be_increased_for_probes() {
expectedVisitor.visitLabel(new Label());
expectedVisitor.visitLdcInsn("init");
- expectedVisitor.visitMaxs(13, 9);
+ expectedVisitor.visitMaxs(13, 10);
}
@Test
- public void visitFrame_should_insert_probe_variable_between_arguments_and_local_variables() {
+ public void visitFrame_should_insert_safety_slot_and_probe_variable_between_arguments_and_local_variables() {
ProbeInserter pi = new ProbeInserter(0, "m", "(J)V", actualVisitor,
arrayStrategy);
@@ -245,61 +245,77 @@ public void visitFrame_should_insert_probe_variable_between_arguments_and_local_
new Object[] { "Foo", Opcodes.LONG, "java/lang/String" }, 0,
new Object[0]);
- expectedVisitor.visitFrame(Opcodes.F_NEW, 4,
- new Object[] { "Foo", Opcodes.LONG, "[Z", "java/lang/String" },
- 0, new Object[0]);
+ expectedVisitor.visitFrame(Opcodes.F_NEW, 5, new Object[] { //
+ "Foo", //
+ Opcodes.LONG, //
+ Opcodes.TOP, // safety slot
+ "[Z", // probe array
+ "java/lang/String" //
+ }, 0, new Object[0]);
}
@Test
- public void visitFrame_should_only_insert_probe_variable_when_no_other_local_variables_exist() {
+ public void visitFrame_should_only_insert_safety_slot_and_probe_variable_when_no_other_local_variables_exist() {
ProbeInserter pi = new ProbeInserter(Opcodes.ACC_STATIC, "m", "()V",
actualVisitor, arrayStrategy);
pi.visitFrame(Opcodes.F_NEW, 0, new Object[] {}, 0, new Object[0]);
- expectedVisitor.visitFrame(Opcodes.F_NEW, 1, new Object[] { "[Z" }, 0,
- new Object[0]);
+ expectedVisitor.visitFrame(Opcodes.F_NEW, 2, new Object[] { //
+ Opcodes.TOP, // safety slot
+ "[Z", // probe array
+ }, 0, new Object[0]);
}
@Test
- public void visitFrame_should_insert_probe_variable_first_when_no_parameters_exist() {
+ public void visitFrame_should_insert_safety_slot_and_probe_variable_first_when_no_parameters_exist() {
ProbeInserter pi = new ProbeInserter(Opcodes.ACC_STATIC, "m", "()V",
actualVisitor, arrayStrategy);
pi.visitFrame(Opcodes.F_NEW, 2, new Object[] { Opcodes.DOUBLE, "Foo" },
0, new Object[0]);
- expectedVisitor.visitFrame(Opcodes.F_NEW, 3,
- new Object[] { "[Z", Opcodes.DOUBLE, "Foo" }, 0, new Object[0]);
+ expectedVisitor.visitFrame(Opcodes.F_NEW, 4, new Object[] { //
+ Opcodes.TOP, // safety slot
+ "[Z", // probe array
+ Opcodes.DOUBLE, //
+ "Foo" //
+ }, 0, new Object[0]);
}
@Test
- public void visitFrame_should_fill_one_unused_slots_before_probe_variable_with_TOP() {
+ public void visitFrame_should_fill_2_unused_slots_before_probe_variable_with_TOP_TOP() {
ProbeInserter pi = new ProbeInserter(Opcodes.ACC_STATIC, "m", "(I)V",
actualVisitor, arrayStrategy);
pi.visitFrame(Opcodes.F_NEW, 0, new Object[] {}, 0, new Object[] {});
// The locals in this frame are filled with TOP up to the probe variable
- expectedVisitor.visitFrame(Opcodes.F_NEW, 2,
- new Object[] { Opcodes.TOP, "[Z", }, 0, new Object[] {});
+ expectedVisitor.visitFrame(Opcodes.F_NEW, 3, new Object[] { //
+ Opcodes.TOP, //
+ Opcodes.TOP, // safety slot
+ "[Z", // probe array
+ }, 0, new Object[] {});
}
@Test
- public void visitFrame_should_fill_two_unused_slots_before_probe_variable_with_TOP_TOP() {
+ public void visitFrame_should_fill_3_unused_slots_before_probe_variable_with_TOP_TOP_TOP() {
ProbeInserter pi = new ProbeInserter(Opcodes.ACC_STATIC, "m", "(J)V",
actualVisitor, arrayStrategy);
pi.visitFrame(Opcodes.F_NEW, 0, new Object[] {}, 0, new Object[] {});
// The locals in this frame are filled with TOP up to the probe variable
- expectedVisitor.visitFrame(Opcodes.F_NEW, 3,
- new Object[] { Opcodes.TOP, Opcodes.TOP, "[Z", }, 0,
- new Object[] {});
+ expectedVisitor.visitFrame(Opcodes.F_NEW, 4, new Object[] { //
+ Opcodes.TOP, //
+ Opcodes.TOP, //
+ Opcodes.TOP, // safety slot
+ "[Z", // probe array
+ }, 0, new Object[] {});
}
@Test
- public void visitFrame_should_fill_three_unused_slots_before_probe_variable_with_TOP_TOP_TOP() {
+ public void visitFrame_should_fill_4_unused_slots_before_probe_variable_with_TOP_TOP_TOP_TOP() {
ProbeInserter pi = new ProbeInserter(Opcodes.ACC_STATIC, "m", "(DIJ)V",
actualVisitor, arrayStrategy);
@@ -307,11 +323,47 @@ public void visitFrame_should_fill_three_unused_slots_before_probe_variable_with
new Object[] {});
// The locals in this frame are filled with TOP up to the probe variable
- expectedVisitor
- .visitFrame(
- Opcodes.F_NEW, 5, new Object[] { Opcodes.DOUBLE,
- Opcodes.TOP, Opcodes.TOP, Opcodes.TOP, "[Z", },
- 0, new Object[] {});
+ expectedVisitor.visitFrame(Opcodes.F_NEW, 6, new Object[] { //
+ Opcodes.DOUBLE, //
+ Opcodes.TOP, //
+ Opcodes.TOP, //
+ Opcodes.TOP, //
+ Opcodes.TOP, // safety slot
+ "[Z", // probe array
+ }, 0, new Object[] {});
+ }
+
+ @Test
+ public void visitFrame_should_not_insert_safety_slot_when_it_is_the_last_occupied_slot() {
+ ProbeInserter pi = new ProbeInserter(0, "m", "()V", actualVisitor,
+ arrayStrategy);
+
+ pi.visitFrame(Opcodes.F_NEW, 1, new Object[] { //
+ Opcodes.DOUBLE //
+ }, 0, new Object[] {});
+
+ expectedVisitor.visitFrame(Opcodes.F_NEW, 2, new Object[] { //
+ Opcodes.DOUBLE, //
+ "[Z" // probe array
+ }, 0, new Object[] {});
+ }
+
+ @Test
+ public void visitFrame_should_insert_TOP_after_probe_variable_when_safety_slot_occupied_but_not_the_last() {
+ ProbeInserter pi = new ProbeInserter(0, "m", "()V", actualVisitor,
+ arrayStrategy);
+
+ pi.visitFrame(Opcodes.F_NEW, 2, new Object[] { //
+ Opcodes.DOUBLE, //
+ Opcodes.INTEGER //
+ }, 0, new Object[] {});
+
+ expectedVisitor.visitFrame(Opcodes.F_NEW, 4, new Object[] { //
+ Opcodes.DOUBLE, //
+ "[Z", // probe array
+ Opcodes.TOP, //
+ Opcodes.INTEGER, //
+ }, 0, new Object[] {});
}
@Test(expected = IllegalArgumentException.class)
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/SafetySlotTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/SafetySlotTest.java
new file mode 100644
index 0000000000..938e0b1be2
--- /dev/null
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/SafetySlotTest.java
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.internal.instr;
+
+import org.jacoco.core.instr.Instrumenter;
+import org.jacoco.core.runtime.IRuntime;
+import org.jacoco.core.runtime.RuntimeData;
+import org.jacoco.core.runtime.SystemPropertiesRuntime;
+import org.jacoco.core.test.TargetLoader;
+import org.jacoco.core.test.validation.JavaVersion;
+import org.junit.Test;
+import org.objectweb.asm.ClassWriter;
+import org.objectweb.asm.Label;
+import org.objectweb.asm.MethodVisitor;
+import org.objectweb.asm.Opcodes;
+
+/**
+ * This test verifies that instrumentation can handle case when the last local
+ * variable of method parameters is overridden in the method body to store
+ * a
+ * value of type long or double which occupy two variables.
+ *
+ * @see ProbeInserterTest#visitFrame_should_not_insert_safety_slot_when_it_is_the_last_occupied_slot()
+ * @see ProbeInserterTest#visitFrame_should_insert_TOP_after_probe_variable_when_safety_slot_occupied_but_not_the_last()
+ */
+public class SafetySlotTest {
+
+ @Test
+ public void jvm_should_verify_original_class_without_errors()
+ throws Exception {
+ final byte[] original = createClass();
+
+ new TargetLoader().add("Sample", original).newInstance();
+ }
+
+ @Test
+ public void jvm_should_verify_instrumented_class_without_errors()
+ throws Exception {
+ final IRuntime runtime = new SystemPropertiesRuntime();
+ runtime.startup(new RuntimeData());
+
+ final byte[] original = createClass();
+ final byte[] instrumented = new Instrumenter(runtime)
+ .instrument(original, "Sample");
+
+ new TargetLoader().add("Sample", instrumented).newInstance();
+ }
+
+ private static byte[] createClass() {
+ final ClassWriter writer = new ClassWriter(0);
+ writer.visit(bytecodeVersion(), Opcodes.ACC_PUBLIC, "Sample", null,
+ "java/lang/Object", new String[0]);
+
+ MethodVisitor mv = writer.visitMethod(Opcodes.ACC_PUBLIC, "",
+ "()V", null, new String[0]);
+ mv.visitCode();
+ mv.visitVarInsn(Opcodes.ALOAD, 0);
+ mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/Object", "",
+ "()V", false);
+
+ // Put a long value (2 slots) on position 0, overwriting 'this'
+ mv.visitLdcInsn(Long.valueOf(42));
+ mv.visitVarInsn(Opcodes.LSTORE, 0);
+
+ mv.visitInsn(Opcodes.ICONST_0);
+ final Label label1 = new Label();
+ mv.visitJumpInsn(Opcodes.IFEQ, label1);
+ mv.visitJumpInsn(Opcodes.GOTO, label1);
+ mv.visitLabel(label1);
+ mv.visitFrame(Opcodes.F_NEW, 1, new Object[] { Opcodes.LONG }, 0,
+ new Object[] {});
+
+ mv.visitLdcInsn(Integer.valueOf(13));
+ mv.visitVarInsn(Opcodes.ISTORE, 2);
+ mv.visitInsn(Opcodes.ICONST_0);
+ final Label label2 = new Label();
+ mv.visitJumpInsn(Opcodes.IFEQ, label2);
+ mv.visitJumpInsn(Opcodes.GOTO, label2);
+ mv.visitLabel(label2);
+ mv.visitFrame(Opcodes.F_NEW, 2,
+ new Object[] { Opcodes.LONG, Opcodes.INTEGER }, 0,
+ new Object[] {});
+
+ mv.visitInsn(Opcodes.RETURN);
+ mv.visitMaxs(2, 3);
+ mv.visitEnd();
+
+ writer.visitEnd();
+
+ return writer.toByteArray();
+ }
+
+ /**
+ * According to Java Virtual Machine Specification
+ * §4.10.1:
+ *
+ *
+ *
+ * A class file whose version number is 50.0 or above (§4.1) must be
+ * verified using the type checking rules given in this section.
+ *
+ *
+ * If, and only if, a class file's version number equals 50.0, then if the
+ * type checking fails, a Java Virtual Machine implementation may choose to
+ * attempt to perform verification by type inference (§4.10.2).
+ *
+ *
+ *
+ * @return {@link Opcodes#V1_7} if supported by current JVM,
+ * {@link Opcodes#V1_5} otherwise
+ */
+ private static int bytecodeVersion() {
+ return JavaVersion.current().isBefore("7") ? Opcodes.V1_5
+ : Opcodes.V1_7;
+ }
+
+}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeInserter.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeInserter.java
index 0452b370ad..c27809e281 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeInserter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeInserter.java
@@ -23,7 +23,13 @@
* Internal utility to add probes into the control flow of a method. The code
* for a probe simply sets a certain slot of a boolean array to true. In
* addition the probe array has to be retrieved at the beginning of the method
- * and stored in a local variable.
+ * and stored in a local variable. For this two local variables will be reserved
+ * immediately after the method parameters - the probe array will be stored in
+ * the second one, and the first one is reserved for the case when the last
+ * local variable of method parameters is overridden in the method body to store
+ * a
+ * value of type long or double which occupy two variables.
*/
class ProbeInserter extends MethodVisitor implements IProbeInserter {
@@ -68,7 +74,7 @@ class ProbeInserter extends MethodVisitor implements IProbeInserter {
for (final Type t : Type.getArgumentTypes(desc)) {
pos += t.getSize();
}
- variable = pos;
+ variable = pos + 1;
beginLabel = new Label();
}
@@ -116,7 +122,7 @@ public final void visitIincInsn(final int var, final int increment) {
public final void visitLocalVariable(final String name, final String desc,
final String signature, final Label start, final Label end,
final int index) {
- if (index < variable) {
+ if (index < variable - 1) {
// Method parameters are still valid from the very beginning
mv.visitLocalVariable(name, desc, signature, beginLabel, end,
index);
@@ -145,14 +151,14 @@ public void visitMaxs(final int maxStack, final int maxLocals) {
// stack size is an absolute maximum, as the accessor code is inserted
// at the very beginning of each method when the stack size is empty.
final int increasedStack = Math.max(maxStack + 3, accessorStackSize);
- mv.visitMaxs(increasedStack, maxLocals + 1);
+ mv.visitMaxs(increasedStack, maxLocals + 2);
}
private int map(final int var) {
- if (var < variable) {
+ if (var < variable - 1) {
return var;
} else {
- return var + 1;
+ return var + 2;
}
}
@@ -165,29 +171,29 @@ public final void visitFrame(final int type, final int nLocal,
"ClassReader.accept() should be called with EXPAND_FRAMES flag");
}
- final Object[] newLocal = new Object[Math.max(nLocal, variable) + 1];
+ final Object[] newLocal = new Object[Math.max(nLocal + 2,
+ variable + 1)];
int idx = 0; // Arrays index for existing locals
int newIdx = 0; // Array index for new locals
int pos = 0; // Current variable position
- while (idx < nLocal || pos <= variable) {
- if (pos == variable) {
- newLocal[newIdx++] = InstrSupport.DATAFIELD_DESC;
- pos++;
- } else {
- if (idx < nLocal) {
- final Object t = local[idx++];
- newLocal[newIdx++] = t;
- pos++;
- if (t == Opcodes.LONG || t == Opcodes.DOUBLE) {
- pos++;
- }
- } else {
- // Fill unused slots with TOP
- newLocal[newIdx++] = Opcodes.TOP;
- pos++;
- }
- }
+ while (idx < nLocal && pos < variable - 1) {
+ final Object t = local[idx++];
+ newLocal[newIdx++] = t;
+ pos += t == Opcodes.LONG || t == Opcodes.DOUBLE ? 2 : 1;
}
+ final boolean safetySlotOccupied = pos == variable;
+ while (pos < variable) {
+ newLocal[newIdx++] = Opcodes.TOP;
+ pos++;
+ }
+ newLocal[newIdx++] = InstrSupport.DATAFIELD_DESC;
+ if (idx < nLocal && safetySlotOccupied) {
+ newLocal[newIdx++] = Opcodes.TOP;
+ }
+ while (idx < nLocal) {
+ newLocal[newIdx++] = local[idx++];
+ }
+
mv.visitFrame(type, newIdx, newLocal, nStack, stack);
}
diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html
index 2a6e53476f..243e737af1 100644
--- a/org.jacoco.doc/docroot/doc/changes.html
+++ b/org.jacoco.doc/docroot/doc/changes.html
@@ -20,6 +20,14 @@ Change History
Snapshot Build @qualified.bundle.version@ (@build.date@)
+Fixed bugs
+
+ - Instrumentation should not cause
VerifyError when the last
+ local variable of method parameters is overridden in the method body to
+ store a value of type long or double
+ (GitHub #893).
+
+
Release 0.8.10 (2023/04/24)
Fixed bugs
From cde2ab5d118e06f239b622da76d5ef3f8800af1b Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Mon, 15 May 2023 20:16:01 +0200
Subject: [PATCH 32/66] Upgrade exec-maven-plugin to 3.1.0 (#1439)
---
org.jacoco.build/pom.xml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 9d6995be94..f88511fd76 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -454,8 +454,7 @@
org.codehaus.mojo
exec-maven-plugin
-
- 1.5.0
+ 3.1.0
From 740c51fd74934ea7549383984f21e8ffe3dc2910 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Mon, 15 May 2023 21:15:53 +0200
Subject: [PATCH 33/66] Fix computation of `build.commitId` (#1443)
---
org.jacoco.build/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index f88511fd76..f18ccf25fd 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -666,7 +666,7 @@
false
false
- true
+ false
0000000
build.commitId
From 76b180010b5ab256f6b649b28bd8e2a1596f2fd6 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Mon, 15 May 2023 22:00:23 +0200
Subject: [PATCH 34/66] Upgrade maven-clean-plugin to 3.2.0 (#1442)
---
org.jacoco.build/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index f18ccf25fd..7c8a9a7e9e 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -308,7 +308,7 @@
org.apache.maven.plugins
maven-clean-plugin
- 2.4.1
+ 3.2.0
org.apache.maven.plugins
From 225b2f2580a6db91c7a2d816a7bd9d2e1fae6873 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Mon, 15 May 2023 23:25:14 +0200
Subject: [PATCH 35/66] Upgrade maven-install-plugin to 3.1.1 (#1446)
---
org.jacoco.build/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 7c8a9a7e9e..43a0240f9a 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -333,7 +333,7 @@
org.apache.maven.plugins
maven-install-plugin
- 2.3.1
+ 3.1.1
org.apache.maven.plugins
From 7cf75fc074410d5d6aac1584a19c557448d05ef7 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Mon, 15 May 2023 23:55:17 +0200
Subject: [PATCH 36/66] Upgrade maven-compiler-plugin to 3.11.0 (#1441)
---
org.jacoco.build/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 43a0240f9a..20d2b694e9 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -313,7 +313,7 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.10.1
+ 3.11.0
org.apache.maven.plugins
From 2768531ef72e04bc08c221295ad88d564037e81e Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Tue, 16 May 2023 17:18:05 +0200
Subject: [PATCH 37/66] Upgrade maven-toolchains-plugin to 3.1.0 (#1447)
---
org.jacoco.build/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 20d2b694e9..9b71228196 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -428,7 +428,7 @@
org.apache.maven.plugins
maven-toolchains-plugin
- 1.0
+ 3.1.0
From b79ef2449244931fcdefc6307121af988aec0605 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Wed, 17 May 2023 07:24:59 +0200
Subject: [PATCH 38/66] Upgrade maven-enforcer-plugin to 3.3.0 (#1440)
---
org.jacoco.build/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 9b71228196..73308f17b2 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -328,7 +328,7 @@
org.apache.maven.plugins
maven-enforcer-plugin
- 3.0.0-M2
+ 3.3.0
org.apache.maven.plugins
From 47596d0c2d708e26fa4eb9180b8e34b1ae43dac9 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Wed, 17 May 2023 18:14:34 +0200
Subject: [PATCH 39/66] Upgrade build-helper-maven-plugin to 3.4.0 (#1451)
---
org.jacoco.build/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 73308f17b2..cedb5ca9db 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -439,7 +439,7 @@
org.codehaus.mojo
build-helper-maven-plugin
- 1.5
+ 3.4.0
org.codehaus.mojo
From 41dbbb01f659f14860cbd5bd6e5c3dbcdf95f0dc Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Wed, 17 May 2023 19:25:33 +0200
Subject: [PATCH 40/66] Upgrade maven-deploy-plugin to 3.1.1 (#1452)
---
org.jacoco.build/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index cedb5ca9db..3add124251 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -323,7 +323,7 @@
org.apache.maven.plugins
maven-deploy-plugin
- 2.8.2
+ 3.1.1
org.apache.maven.plugins
From bf09a815048a18f5b2e716bbedc79f045a2a9c8e Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Thu, 18 May 2023 08:06:09 +0200
Subject: [PATCH 41/66] Upgrade maven-source-plugin to 3.2.1 (#1453)
---
org.jacoco.build/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 3add124251..2f8947bcbb 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -412,7 +412,7 @@
org.apache.maven.plugins
maven-source-plugin
- 2.1.2
+ 3.2.1
org.apache.maven.plugins
From 19c315118fcc0dd3c9fa809903e1a862e2097f6b Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Fri, 19 May 2023 00:11:07 +0200
Subject: [PATCH 42/66] Fix generation of `Eclipse-SourceReference` entry in
`MANIFEST.MF` (#1454)
This change fixes flaws of
4dc8b3855c82c868d7756944519c90d4326913da
and
740c51fd74934ea7549383984f21e8ffe3dc2910
i.e. `build.commitId` is correctly computed
and tests can be executed in IntelliJ IDEA.
---
org.jacoco.build/pom.xml | 3 +--
org.jacoco.core/src/org/jacoco/core/jacoco.properties | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 2f8947bcbb..3e7097722b 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -128,7 +128,6 @@
https://oss.sonatype.org/content/repositories/snapshots/
yyyyMMddhhmm
- 0000000
http://www.jacoco.org/jacoco
${project.inceptionYear}, 2023
@@ -666,7 +665,7 @@
false
false
- false
+ true
0000000
build.commitId
diff --git a/org.jacoco.core/src/org/jacoco/core/jacoco.properties b/org.jacoco.core/src/org/jacoco/core/jacoco.properties
index 8325c1b433..58ac24206c 100644
--- a/org.jacoco.core/src/org/jacoco/core/jacoco.properties
+++ b/org.jacoco.core/src/org/jacoco/core/jacoco.properties
@@ -1,4 +1,4 @@
VERSION=${qualified.bundle.version}
-COMMITID=${build.commitId}
+COMMITID=@build.commitId@
HOMEURL=${jacoco.home.url}
RUNTIMEPACKAGE=${jacoco.runtime.package.name}
From d3ab8ebf9e97ed2d3535360c22940332ada5a4d3 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Fri, 19 May 2023 00:46:48 +0200
Subject: [PATCH 43/66] Upgrade maven-jar-plugin to 3.3.0 (#1444)
---
org.jacoco.build/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 3e7097722b..5933137e59 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -347,7 +347,7 @@
org.apache.maven.plugins
maven-jar-plugin
- 2.3.1
+ 3.3.0
org.apache.maven.plugins
From 555c3a232ed684d3618931c83ce80a56c00d31b9 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Fri, 19 May 2023 01:28:02 +0200
Subject: [PATCH 44/66] Upgrade maven-dependency-plugin to 3.5.0 (#1445)
---
org.jacoco.build/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 5933137e59..173a4e3e9e 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -317,7 +317,7 @@
org.apache.maven.plugins
maven-dependency-plugin
- 2.2
+ 3.5.0
org.apache.maven.plugins
From d6de8f0593db6cfc4a9c70a8d200924a060a1bb9 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Mon, 22 May 2023 12:09:02 +0200
Subject: [PATCH 45/66] Upgrade maven-assembly-plugin to 3.6.0 (#1450)
---
org.jacoco.build/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 173a4e3e9e..7f175c5c7a 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -302,7 +302,7 @@
org.apache.maven.plugins
maven-assembly-plugin
- 2.2.1
+ 3.6.0
org.apache.maven.plugins
From 5e9ff0e90a2d5f153ad86112aa9719c914cba88b Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Mon, 22 May 2023 12:29:53 +0200
Subject: [PATCH 46/66] Upgrade maven-resources-plugin to 3.3.1 (#1456)
---
org.jacoco.build/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 7f175c5c7a..d8e08b3415 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -393,7 +393,7 @@
org.apache.maven.plugins
maven-resources-plugin
- 2.5
+ 3.3.1
org.apache.maven.plugins
From c0fd3a7412db6c88da0d417a8ea1d4ed4aed918c Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Mon, 22 May 2023 16:38:18 +0200
Subject: [PATCH 47/66] Upgrade maven-antrun-plugin to 3.1.0 (#1458)
---
org.jacoco.build/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index d8e08b3415..5c204c4b45 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -297,7 +297,7 @@
org.apache.maven.plugins
maven-antrun-plugin
- 1.6
+ 3.1.0
org.apache.maven.plugins
From 4cbb0fa34e69a84fc226b856608526e138b0ed0a Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Mon, 22 May 2023 19:47:38 +0200
Subject: [PATCH 48/66] Upgrade maven-gpg-plugin to 3.1.0 (#1465)
---
org.jacoco.build/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 5c204c4b45..eb4b9ee22d 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -342,7 +342,7 @@
org.apache.maven.plugins
maven-gpg-plugin
- 1.3
+ 3.1.0
org.apache.maven.plugins
From db49eb3afb92a286299906cea7ea303b88801583 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Tue, 23 May 2023 22:58:06 +0200
Subject: [PATCH 49/66] Update validation test in accordance with JEP 440
(#1448)
Quoting https://openjdk.org/jeps/440
> Apart from some minor editorial changes, the main change since the
> second preview is to remove support for record patterns appearing in
> the header of an enhanced for statement.
---
.../java20/targets/RecordPatternsTarget.java | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/RecordPatternsTarget.java b/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/RecordPatternsTarget.java
index 4cd14df8f2..27fb987ecf 100644
--- a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/RecordPatternsTarget.java
+++ b/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/RecordPatternsTarget.java
@@ -16,7 +16,7 @@
/**
* This target exercises Record Patterns
- * (JEP 432).
+ * (JEP 440).
*/
public class RecordPatternsTarget {
@@ -36,20 +36,12 @@ private static void switchStatement(Object p) {
} // assertEmpty()
}
- private static void enhancedForStatement(Point[] p) {
- for (Point(int x, int y) : p) { // assertPartlyCovered(2, 3)
- nop(x + y); // assertFullyCovered()
- } // assertEmpty()
- }
-
public static void main(String[] args) {
instanceofOperator(new Point(1, 2));
instanceofOperator(new Object());
switchStatement(new Point(1, 2));
switchStatement(new Object());
-
- enhancedForStatement(new Point[] { new Point(1, 2) });
}
}
From 94779ca9f7b2cbac2f35c2eab6bcbff4f3b1584d Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Wed, 24 May 2023 05:37:21 +0200
Subject: [PATCH 50/66] Require Java 8 for jacoco-maven-plugin (#1466)
---
jacoco-maven-plugin/.classpath | 2 +-
jacoco-maven-plugin/pom.xml | 15 +++++++++++++++
org.jacoco.doc/docroot/doc/changes.html | 6 ++++++
org.jacoco.doc/docroot/doc/maven.html | 2 +-
4 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/jacoco-maven-plugin/.classpath b/jacoco-maven-plugin/.classpath
index 0ed344a5e8..db3404d0fe 100644
--- a/jacoco-maven-plugin/.classpath
+++ b/jacoco-maven-plugin/.classpath
@@ -1,6 +1,6 @@
-
+
diff --git a/jacoco-maven-plugin/pom.xml b/jacoco-maven-plugin/pom.xml
index 205fe09aed..7098641d6d 100644
--- a/jacoco-maven-plugin/pom.xml
+++ b/jacoco-maven-plugin/pom.xml
@@ -32,6 +32,12 @@
3.0
+
+ 8
+ 8
+ 8
+
+
org.apache.maven
@@ -95,6 +101,15 @@
+
+ org.apache.maven.plugins
+ maven-toolchains-plugin
+
+
+
+
+
+
org.apache.maven.plugins
maven-plugin-plugin
diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html
index 243e737af1..9afd36811f 100644
--- a/org.jacoco.doc/docroot/doc/changes.html
+++ b/org.jacoco.doc/docroot/doc/changes.html
@@ -20,6 +20,12 @@ Change History
Snapshot Build @qualified.bundle.version@ (@build.date@)
+New Features
+
+ - jacoco-maven-plugin now requires at least Java 8
+ (GitHub #1466).
+
+
Fixed bugs
- Instrumentation should not cause
VerifyError when the last
diff --git a/org.jacoco.doc/docroot/doc/maven.html b/org.jacoco.doc/docroot/doc/maven.html
index 4e41e4d4d5..e9151a6b2c 100644
--- a/org.jacoco.doc/docroot/doc/maven.html
+++ b/org.jacoco.doc/docroot/doc/maven.html
@@ -74,7 +74,7 @@ Prerequisites
- Maven 3.0 or higher and
- - Java 1.5 or higher (for both, the Maven runtime and the test executor).
+ - Java 1.8 or higher for the Maven runtime, Java 1.5 or higher for the test executor.
From f879b16fcf460a985e39e70af30f974e3149cfd7 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Wed, 24 May 2023 06:08:56 +0200
Subject: [PATCH 51/66] Upgrade buildnumber-maven-plugin to 3.1.0 (#1467)
It requires Maven 3.5.4 and thus transitively our build should require it too.
---
org.jacoco.build/pom.xml | 4 ++--
org.jacoco.doc/docroot/doc/build.html | 2 +-
org.jacoco.doc/docroot/doc/changes.html | 6 ++++++
org.jacoco.doc/docroot/doc/environment.html | 2 +-
4 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index eb4b9ee22d..23cba9b229 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -443,7 +443,7 @@
org.codehaus.mojo
buildnumber-maven-plugin
- 1.2
+ 3.1.0
org.codehaus.mojo
@@ -534,7 +534,7 @@
- [3.3.9,3.8.2),(3.8.2,)
+ [3.5.4,3.8.2),(3.8.2,)
The rules for repo1.maven.org are that pom.xml files should not include repository definitions.
diff --git a/org.jacoco.doc/docroot/doc/build.html b/org.jacoco.doc/docroot/doc/build.html
index a246a2ba83..25e3756eba 100644
--- a/org.jacoco.doc/docroot/doc/build.html
+++ b/org.jacoco.doc/docroot/doc/build.html
@@ -24,7 +24,7 @@ Build
The JaCoCo build is based on Maven and
can be locally executed on every machine with a proper
environment setup. In particular you need at
- least Maven 3.3.9 and JDK 11
+ least Maven 3.5.4 and JDK 11
installations. Developers are encouraged to run the build before every commit
to ensure consistency of the source tree.
diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html
index 9afd36811f..dcf4163714 100644
--- a/org.jacoco.doc/docroot/doc/changes.html
+++ b/org.jacoco.doc/docroot/doc/changes.html
@@ -34,6 +34,12 @@ Fixed bugs
(GitHub #893).
+Non-functional Changes
+
+ - JaCoCo build now requires at least Maven 3.5.4
+ (GitHub #1467).
+
+
Release 0.8.10 (2023/04/24)
Fixed bugs
diff --git a/org.jacoco.doc/docroot/doc/environment.html b/org.jacoco.doc/docroot/doc/environment.html
index 1042d4dbf9..8755ccf6ec 100644
--- a/org.jacoco.doc/docroot/doc/environment.html
+++ b/org.jacoco.doc/docroot/doc/environment.html
@@ -76,7 +76,7 @@ Build
The JaCoCo build is based on Maven
- and requires at least Maven 3.3.9 and JDK 11.
+ and requires at least Maven 3.5.4 and JDK 11.
See the build description for details.
From 3fb40aacca437b9af241a276437489c3ab6046fc Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Wed, 24 May 2023 23:28:42 +0200
Subject: [PATCH 52/66] Upgrade maven-dependency-plugin to 3.6.0 (#1459)
---
org.jacoco.build/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 23cba9b229..f6dd862e59 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -317,7 +317,7 @@
org.apache.maven.plugins
maven-dependency-plugin
- 3.5.0
+ 3.6.0
org.apache.maven.plugins
From d2df479f1743c5d6ac4982de02b5e83b6a17db4c Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Thu, 25 May 2023 10:39:53 +0200
Subject: [PATCH 53/66] Upgrade maven-source-plugin to 3.3.0 (#1460)
---
org.jacoco.build/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index f6dd862e59..70fb4499e9 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -411,7 +411,7 @@
org.apache.maven.plugins
maven-source-plugin
- 3.2.1
+ 3.3.0
org.apache.maven.plugins
From 6fb878654f6e385b9a1b5971d6889760cc2ce0c1 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Thu, 25 May 2023 13:45:16 +0200
Subject: [PATCH 54/66] Upgrade gmavenplus-plugin to 3.0.0 (#1469)
---
org.jacoco.core.test.validation.groovy/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.jacoco.core.test.validation.groovy/pom.xml b/org.jacoco.core.test.validation.groovy/pom.xml
index 6e8fe29ebb..63628747d5 100644
--- a/org.jacoco.core.test.validation.groovy/pom.xml
+++ b/org.jacoco.core.test.validation.groovy/pom.xml
@@ -26,7 +26,7 @@
JaCoCo :: Test :: Core :: Validation Groovy
- 1.13.0
+ 3.0.0
3.0.15
From e0d9d0442e9d6caa98362db034ad76db819a8cc9 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Fri, 26 May 2023 16:57:23 +0200
Subject: [PATCH 55/66] Maven 3.9.2 should not produce warnings for
jacoco-maven-plugin (#1468)
Note that `org.apache.maven.shared:file-management` version `3.1.0`
requires Java 8.
---
jacoco-maven-plugin/pom.xml | 2 +-
jacoco-maven-plugin/src/org/jacoco/maven/MergeMojo.java | 2 +-
org.jacoco.doc/docroot/doc/changes.html | 5 ++++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/jacoco-maven-plugin/pom.xml b/jacoco-maven-plugin/pom.xml
index 7098641d6d..2baf96ef3f 100644
--- a/jacoco-maven-plugin/pom.xml
+++ b/jacoco-maven-plugin/pom.xml
@@ -59,7 +59,7 @@
org.apache.maven.shared
file-management
- 1.2.1
+ 3.1.0
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/MergeMojo.java b/jacoco-maven-plugin/src/org/jacoco/maven/MergeMojo.java
index b189cb6c16..ae39ffb3d8 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/MergeMojo.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/MergeMojo.java
@@ -86,7 +86,7 @@ private void executeMerge() throws MojoExecutionException {
private void load(final ExecFileLoader loader)
throws MojoExecutionException {
- final FileSetManager fileSetManager = new FileSetManager(getLog());
+ final FileSetManager fileSetManager = new FileSetManager();
for (final FileSet fileSet : fileSets) {
for (final String includedFilename : fileSetManager
.getIncludedFiles(fileSet)) {
diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html
index dcf4163714..c59ddad32f 100644
--- a/org.jacoco.doc/docroot/doc/changes.html
+++ b/org.jacoco.doc/docroot/doc/changes.html
@@ -22,8 +22,11 @@ Snapshot Build @qualified.bundle.version@ (@build.date@)
New Features
+ - Maven 3.9.2 should not produce warnings for jacoco-maven-plugin
+ (GitHub #1468).
- jacoco-maven-plugin now requires at least Java 8
- (GitHub #1466).
+ (GitHub #1466,
+ #1468).
Fixed bugs
From e437b64a9807505189091138c200b85c7e38bd75 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Mon, 5 Jun 2023 18:27:31 +0200
Subject: [PATCH 56/66] Add filter for Record patterns (#1473)
---
.../validation/java20/RecordPatternsTest.java | 18 --
.../java20/targets/RecordPatternsTarget.java | 6 +-
.../filter/RecordPatternFilterTest.java | 220 ++++++++++++++++++
.../internal/analysis/filter/Filters.java | 1 +
.../analysis/filter/RecordPatternFilter.java | 55 +++++
org.jacoco.doc/docroot/doc/changes.html | 3 +
6 files changed, 282 insertions(+), 21 deletions(-)
create mode 100644 org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/RecordPatternFilterTest.java
create mode 100644 org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/RecordPatternFilter.java
diff --git a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/RecordPatternsTest.java b/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/RecordPatternsTest.java
index 998920b660..aedb46ee2c 100644
--- a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/RecordPatternsTest.java
+++ b/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/RecordPatternsTest.java
@@ -26,22 +26,4 @@ public RecordPatternsTest() {
super(RecordPatternsTarget.class);
}
- public void assertSwitchStatementCase(Line line) {
- if (JavaVersion.current().isBefore("21")) {
- assertFullyCovered(line);
- } else {
- // https://github.com/openjdk/jdk/commit/138cdc9283ae8f3367e51f0fe7e27833118dd7cb
- assertPartlyCovered(line);
- }
- }
-
- public void assertSwitchStatementDefault(Line line) {
- if (JavaVersion.current().isBefore("21")) {
- assertPartlyCovered(line);
- } else {
- // https://github.com/openjdk/jdk/commit/138cdc9283ae8f3367e51f0fe7e27833118dd7cb
- assertFullyCovered(line);
- }
- }
-
}
diff --git a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/RecordPatternsTarget.java b/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/RecordPatternsTarget.java
index 27fb987ecf..212b68f660 100644
--- a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/RecordPatternsTarget.java
+++ b/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/RecordPatternsTarget.java
@@ -24,15 +24,15 @@ private record Point(int x, int y) {
}
private static void instanceofOperator(Object o) {
- if (o instanceof Point(int x,int y)) { // assertPartlyCovered(0, 2)
+ if (o instanceof Point(int x,int y)) { // assertFullyCovered(0, 2)
nop(x + y); // assertFullyCovered()
} // assertEmpty()
}
private static void switchStatement(Object p) {
switch (p) { // assertFullyCovered(0, 2)
- case Point(int x, int y) -> nop(x + y); // assertSwitchStatementCase()
- default -> nop(); // assertSwitchStatementDefault()
+ case Point(int x, int y) -> nop(x + y); // assertFullyCovered()
+ default -> nop(); // assertFullyCovered()
} // assertEmpty()
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/RecordPatternFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/RecordPatternFilterTest.java
new file mode 100644
index 0000000000..bb2b569854
--- /dev/null
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/RecordPatternFilterTest.java
@@ -0,0 +1,220 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.internal.analysis.filter;
+
+import org.jacoco.core.internal.instr.InstrSupport;
+import org.junit.Test;
+import org.objectweb.asm.Handle;
+import org.objectweb.asm.Label;
+import org.objectweb.asm.Opcodes;
+import org.objectweb.asm.Type;
+import org.objectweb.asm.tree.MethodNode;
+
+/**
+ * Unit tests for {@link RecordPatternFilter}.
+ */
+public class RecordPatternFilterTest extends FilterTestBase {
+
+ private final IFilter filter = new RecordPatternFilter();
+
+ /**
+ *
+ * record Point(int x, int y) {}
+ *
+ * void example(Object o) {
+ * if (o instanceof Point(int x, int y)) {
+ * ...
+ * }
+ * }
+ *
+ */
+ @Test
+ public void should_filter_instanceof() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "example", "()V", null, null);
+
+ final Label start1 = new Label();
+ final Label end1 = new Label();
+ final Label handler = new Label();
+ m.visitTryCatchBlock(start1, end1, handler, "java/lang/Throwable");
+ final Label start2 = new Label();
+ final Label end2 = new Label();
+ m.visitTryCatchBlock(start2, end2, handler, "java/lang/Throwable");
+
+ m.visitVarInsn(Opcodes.ALOAD, 1);
+ m.visitTypeInsn(Opcodes.INSTANCEOF, "Example$Point");
+ final Label label1 = new Label();
+ m.visitJumpInsn(Opcodes.IFEQ, label1);
+ m.visitVarInsn(Opcodes.ALOAD, 1);
+ m.visitTypeInsn(Opcodes.CHECKCAST, "Example$Point");
+ m.visitVarInsn(Opcodes.ASTORE, 2);
+
+ m.visitVarInsn(Opcodes.ALOAD, 2);
+ m.visitLabel(start1);
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "Example$Point", "x", "()I",
+ false);
+ m.visitLabel(end1);
+ m.visitVarInsn(Opcodes.ISTORE, 5);
+ m.visitVarInsn(Opcodes.ILOAD, 5);
+ m.visitVarInsn(Opcodes.ISTORE, 3);
+
+ m.visitVarInsn(Opcodes.ALOAD, 2);
+ m.visitLabel(start2);
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "Example$Point", "y", "()I",
+ false);
+ m.visitLabel(end2);
+ m.visitVarInsn(Opcodes.ISTORE, 5);
+ m.visitVarInsn(Opcodes.ILOAD, 5);
+ m.visitVarInsn(Opcodes.ISTORE, 4);
+
+ m.visitVarInsn(Opcodes.ILOAD, 3);
+ m.visitVarInsn(Opcodes.ILOAD, 4);
+ m.visitInsn(Opcodes.IADD);
+ m.visitMethodInsn(Opcodes.INVOKESTATIC, "Example", "nop", "(I)V",
+ false);
+
+ m.visitLabel(label1);
+ final Label label2 = new Label();
+ m.visitJumpInsn(Opcodes.GOTO, label2);
+
+ m.visitLabel(handler);
+ final Range range = new Range();
+ range.fromInclusive = m.instructions.getLast();
+ m.visitVarInsn(Opcodes.ASTORE, 1);
+ m.visitTypeInsn(Opcodes.NEW, "java/lang/MatchException");
+ m.visitInsn(Opcodes.DUP);
+ m.visitVarInsn(Opcodes.ALOAD, 1);
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/Throwable",
+ "toString", "()Ljava/lang/String;", false);
+ m.visitVarInsn(Opcodes.ALOAD, 1);
+ m.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/MatchException",
+ "", "(Ljava/lang/String;Ljava/lang/Throwable;)V", false);
+ m.visitInsn(Opcodes.ATHROW);
+ range.toInclusive = m.instructions.getLast();
+
+ m.visitLabel(label2);
+ m.visitInsn(Opcodes.RETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored(range, range);
+ }
+
+ /**
+ *
+ * record Point(int x, int y) {}
+ *
+ * void example(Object o) {
+ * switch (o) {
+ * case Point(int x, int y) -> ...
+ * default -> ...
+ * }
+ * }
+ *
+ */
+ @Test
+ public void should_filter_switch() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "example", "()V", null, null);
+
+ final Label start1 = new Label();
+ final Label end1 = new Label();
+ final Label handler = new Label();
+ m.visitTryCatchBlock(start1, end1, handler, "java/lang/Throwable");
+ final Label start2 = new Label();
+ final Label end2 = new Label();
+ m.visitTryCatchBlock(start2, end2, handler, "java/lang/Throwable");
+
+ m.visitVarInsn(Opcodes.ALOAD, 1);
+ m.visitInsn(Opcodes.DUP);
+ m.visitMethodInsn(Opcodes.INVOKESTATIC, "java/util/Objects",
+ "requireNonNull", "(Ljava/lang/Object;)Ljava/lang/Object;",
+ false);
+ m.visitInsn(Opcodes.POP);
+ m.visitVarInsn(Opcodes.ASTORE, 2);
+ m.visitInsn(Opcodes.ICONST_0);
+ m.visitVarInsn(Opcodes.ISTORE, 3);
+ m.visitVarInsn(Opcodes.ALOAD, 2);
+ m.visitVarInsn(Opcodes.ILOAD, 3);
+ m.visitInvokeDynamicInsn("typeSwitch", "(Ljava/lang/Object;I)I",
+ new Handle(Opcodes.H_INVOKESTATIC,
+ "java/lang/runtime/SwitchBootstraps", "typeSwitch",
+ "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;",
+ false),
+ new Object[] { Type.getType("LExample$Point;") });
+ final Label case1 = new Label();
+ final Label dflt = new Label();
+ m.visitLookupSwitchInsn(dflt, new int[] { 0 }, new Label[] { case1 });
+ m.visitLabel(case1);
+ m.visitVarInsn(Opcodes.ALOAD, 2);
+ m.visitTypeInsn(Opcodes.CHECKCAST, "Example$Point");
+ m.visitVarInsn(Opcodes.ASTORE, 4);
+
+ m.visitVarInsn(Opcodes.ALOAD, 4);
+ m.visitLabel(start1);
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "Example$Point", "x", "()I",
+ false);
+ m.visitLabel(end1);
+ m.visitVarInsn(Opcodes.ISTORE, 7);
+ m.visitVarInsn(Opcodes.ILOAD, 7);
+ m.visitVarInsn(Opcodes.ISTORE, 5);
+
+ m.visitVarInsn(Opcodes.ALOAD, 4);
+ m.visitLabel(start2);
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "Example$Point", "y", "()I",
+ false);
+ m.visitLabel(end2);
+ m.visitVarInsn(Opcodes.ISTORE, 7);
+ m.visitVarInsn(Opcodes.ILOAD, 7);
+ m.visitVarInsn(Opcodes.ISTORE, 6);
+
+ m.visitVarInsn(Opcodes.ILOAD, 5);
+ m.visitVarInsn(Opcodes.ILOAD, 6);
+ m.visitInsn(Opcodes.IADD);
+ m.visitMethodInsn(Opcodes.INVOKESTATIC, "Example", "nop", "(I)V",
+ false);
+ final Label label1 = new Label();
+ m.visitJumpInsn(Opcodes.GOTO, label1);
+
+ m.visitLabel(dflt);
+ m.visitInsn(Opcodes.ICONST_0);
+ m.visitMethodInsn(Opcodes.INVOKESTATIC, "Example", "nop", "(I)V",
+ false);
+ m.visitLabel(label1);
+ final Label label2 = new Label();
+ m.visitJumpInsn(Opcodes.GOTO, label2);
+
+ m.visitLabel(handler);
+ final Range range = new Range();
+ range.fromInclusive = m.instructions.getLast();
+ m.visitVarInsn(Opcodes.ASTORE, 1);
+ m.visitTypeInsn(Opcodes.NEW, "java/lang/MatchException");
+ m.visitInsn(Opcodes.DUP);
+ m.visitVarInsn(Opcodes.ALOAD, 1);
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/Throwable",
+ "toString", "()Ljava/lang/String;", false);
+ m.visitVarInsn(Opcodes.ALOAD, 1);
+ m.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/MatchException",
+ "", "(Ljava/lang/String;Ljava/lang/Throwable;)V", false);
+ m.visitInsn(Opcodes.ATHROW);
+ range.toInclusive = m.instructions.getLast();
+
+ m.visitLabel(label2);
+ m.visitInsn(Opcodes.RETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored(range, range);
+ }
+
+}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/Filters.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/Filters.java
index 8e8e48131e..3889d43d25 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/Filters.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/Filters.java
@@ -40,6 +40,7 @@ public static IFilter all() {
new PrivateEmptyNoArgConstructorFilter(), new AssertFilter(),
new StringSwitchJavacFilter(), new StringSwitchFilter(),
new EnumEmptyConstructorFilter(), new RecordsFilter(),
+ new RecordPatternFilter(), //
new AnnotationGeneratedFilter(), new KotlinGeneratedFilter(),
new KotlinLateinitFilter(), new KotlinWhenFilter(),
new KotlinWhenStringFilter(),
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/RecordPatternFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/RecordPatternFilter.java
new file mode 100644
index 0000000000..49dfce23b0
--- /dev/null
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/RecordPatternFilter.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.internal.analysis.filter;
+
+import org.objectweb.asm.Opcodes;
+import org.objectweb.asm.tree.AbstractInsnNode;
+import org.objectweb.asm.tree.MethodNode;
+import org.objectweb.asm.tree.TryCatchBlockNode;
+
+/**
+ * Filters code that is generated for record patterns.
+ */
+final class RecordPatternFilter implements IFilter {
+
+ public void filter(final MethodNode methodNode,
+ final IFilterContext context, final IFilterOutput output) {
+ final Matcher matcher = new Matcher();
+ for (final TryCatchBlockNode t : methodNode.tryCatchBlocks) {
+ if ("java/lang/Throwable".equals(t.type)) {
+ matcher.match(t.handler, output);
+ }
+ }
+ }
+
+ private static class Matcher extends AbstractMatcher {
+ void match(final AbstractInsnNode start, final IFilterOutput output) {
+ cursor = start;
+ nextIsVar(Opcodes.ASTORE, "cause");
+ nextIsType(org.objectweb.asm.Opcodes.NEW,
+ "java/lang/MatchException");
+ nextIs(Opcodes.DUP);
+ nextIsVar(Opcodes.ALOAD, "cause");
+ nextIsInvoke(Opcodes.INVOKEVIRTUAL, "java/lang/Throwable",
+ "toString", "()Ljava/lang/String;");
+ nextIsVar(Opcodes.ALOAD, "cause");
+ nextIsInvoke(Opcodes.INVOKESPECIAL, "java/lang/MatchException",
+ "", "(Ljava/lang/String;Ljava/lang/Throwable;)V");
+ nextIs(Opcodes.ATHROW);
+ if (cursor != null) {
+ output.ignore(start, cursor);
+ }
+ }
+ }
+
+}
diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html
index c59ddad32f..3f70539274 100644
--- a/org.jacoco.doc/docroot/doc/changes.html
+++ b/org.jacoco.doc/docroot/doc/changes.html
@@ -27,6 +27,9 @@ New Features
jacoco-maven-plugin now requires at least Java 8
(GitHub #1466,
#1468).
+ Part of bytecode generated by the Java compilers for record patterns is
+ filtered out during generation of report
+ (GitHub #1473).
Fixed bugs
From 1f7b17b0922c6de8c44bf66bc56507cd8fd9e82e Mon Sep 17 00:00:00 2001
From: "Marc R. Hoffmann"
Date: Tue, 13 Jun 2023 10:57:49 +0200
Subject: [PATCH 57/66] Fix changelog categories (#1474)
---
org.jacoco.doc/docroot/doc/changes.html | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html
index 3f70539274..3cc1a007e6 100644
--- a/org.jacoco.doc/docroot/doc/changes.html
+++ b/org.jacoco.doc/docroot/doc/changes.html
@@ -22,11 +22,6 @@ Snapshot Build @qualified.bundle.version@ (@build.date@)
New Features
- - Maven 3.9.2 should not produce warnings for jacoco-maven-plugin
- (GitHub #1468).
- - jacoco-maven-plugin now requires at least Java 8
- (GitHub #1466,
- #1468).
- Part of bytecode generated by the Java compilers for record patterns is
filtered out during generation of report
(GitHub #1473).
@@ -42,8 +37,13 @@ Fixed bugs
Non-functional Changes
+ - jacoco-maven-plugin now requires at least Java 8
+ (GitHub #1466,
+ #1468).
- JaCoCo build now requires at least Maven 3.5.4
(GitHub #1467).
+ - Maven 3.9.2 should not produce warnings for jacoco-maven-plugin
+ (GitHub #1468).
Release 0.8.10 (2023/04/24)
From e0f2725b6e646c7fa423a5d8942f008c40406c3d Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Tue, 13 Jun 2023 11:29:30 +0200
Subject: [PATCH 58/66] Add experimental support for Java 22 class files
(#1479)
---
.azure-pipelines/azure-pipelines.yml | 2 ++
org.jacoco.build/pom.xml | 14 ++++++++
org.jacoco.core.test.validation/pom.xml | 33 +++++++++++++++++++
.../jacoco/core/analysis/AnalyzerTest.java | 10 +++---
.../jacoco/core/instr/InstrumenterTest.java | 10 +++---
.../core/internal/instr/InstrSupportTest.java | 15 +++++----
.../core/internal/instr/InstrSupport.java | 4 +--
org.jacoco.doc/docroot/doc/changes.html | 2 ++
8 files changed, 71 insertions(+), 19 deletions(-)
diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml
index 59ec28779f..3d38cb4eda 100644
--- a/.azure-pipelines/azure-pipelines.yml
+++ b/.azure-pipelines/azure-pipelines.yml
@@ -45,6 +45,8 @@ jobs:
JDK_VERSION: 20
JDK 21:
JDK_VERSION: 21
+ JDK 22:
+ JDK_VERSION: 22
pool:
vmImage: 'ubuntu-20.04'
steps:
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 70fb4499e9..ec2fa2b52f 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -919,6 +919,20 @@
+
+ java22-bytecode
+
+
+ bytecode.version
+ 22
+
+
+
+ 13
+ 13
+
+
+
ecj
diff --git a/org.jacoco.core.test.validation/pom.xml b/org.jacoco.core.test.validation/pom.xml
index a296332766..4092283d16 100644
--- a/org.jacoco.core.test.validation/pom.xml
+++ b/org.jacoco.core.test.validation/pom.xml
@@ -458,6 +458,39 @@
+
+ java22-bytecode
+
+
+ bytecode.version
+ 22
+
+
+
+
+ 16
+
+ 16
+
+ 22
+ 22
+
+
+ ../org.jacoco.core.test.validation.kotlin
+ ../org.jacoco.core.test.validation.java7
+ ../org.jacoco.core.test.validation.java8
+ ../org.jacoco.core.test.validation.java14
+ ../org.jacoco.core.test.validation.java16
+ ../org.jacoco.core.test.validation.java20
+
+
+
+
+
diff --git a/org.jacoco.core.test/src/org/jacoco/core/analysis/AnalyzerTest.java b/org.jacoco.core.test/src/org/jacoco/core/analysis/AnalyzerTest.java
index 4da4ff2d32..54d1a165c7 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/analysis/AnalyzerTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/analysis/AnalyzerTest.java
@@ -109,7 +109,7 @@ public void should_ignore_synthetic_classes() throws Exception {
@Test
public void should_not_modify_class_bytes_to_support_next_version()
throws Exception {
- final byte[] originalBytes = createClass(Opcodes.V20 + 1);
+ final byte[] originalBytes = createClass(Opcodes.V21 + 1);
final byte[] bytes = new byte[originalBytes.length];
System.arraycopy(originalBytes, 0, bytes, 0, originalBytes.length);
final long expectedClassId = CRC64.classId(bytes);
@@ -132,13 +132,13 @@ private static byte[] createClass(final int version) {
*/
@Test
public void analyzeClass_should_throw_exception_for_unsupported_class_file_version() {
- final byte[] bytes = createClass(Opcodes.V20 + 2);
+ final byte[] bytes = createClass(Opcodes.V21 + 2);
try {
analyzer.analyzeClass(bytes, "UnsupportedVersion");
fail("exception expected");
} catch (IOException e) {
assertExceptionMessage("UnsupportedVersion", e);
- assertEquals("Unsupported class file major version 66",
+ assertEquals("Unsupported class file major version 67",
e.getCause().getMessage());
}
}
@@ -218,14 +218,14 @@ public void testAnalyzeClass_BrokenStream() throws IOException {
*/
@Test
public void analyzeAll_should_throw_exception_for_unsupported_class_file_version() {
- final byte[] bytes = createClass(Opcodes.V20 + 2);
+ final byte[] bytes = createClass(Opcodes.V21 + 2);
try {
analyzer.analyzeAll(new ByteArrayInputStream(bytes),
"UnsupportedVersion");
fail("exception expected");
} catch (IOException e) {
assertExceptionMessage("UnsupportedVersion", e);
- assertEquals("Unsupported class file major version 66",
+ assertEquals("Unsupported class file major version 67",
e.getCause().getMessage());
}
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/instr/InstrumenterTest.java b/org.jacoco.core.test/src/org/jacoco/core/instr/InstrumenterTest.java
index e115e32fba..7df3e6dd11 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/instr/InstrumenterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/instr/InstrumenterTest.java
@@ -100,7 +100,7 @@ public void setup() throws Exception {
@Test
public void should_not_modify_class_bytes_to_support_next_version()
throws Exception {
- final byte[] originalBytes = createClass(Opcodes.V20 + 1);
+ final byte[] originalBytes = createClass(Opcodes.V21 + 1);
final byte[] bytes = new byte[originalBytes.length];
System.arraycopy(originalBytes, 0, bytes, 0, originalBytes.length);
final long expectedClassId = CRC64.classId(bytes);
@@ -123,13 +123,13 @@ private static byte[] createClass(final int version) {
*/
@Test
public void instrument_should_throw_exception_for_unsupported_class_file_version() {
- final byte[] bytes = createClass(Opcodes.V20 + 2);
+ final byte[] bytes = createClass(Opcodes.V21 + 2);
try {
instrumenter.instrument(bytes, "UnsupportedVersion");
fail("exception expected");
} catch (final IOException e) {
assertExceptionMessage("UnsupportedVersion", e);
- assertEquals("Unsupported class file major version 66",
+ assertEquals("Unsupported class file major version 67",
e.getCause().getMessage());
}
}
@@ -221,14 +221,14 @@ public void testSerialization() throws Exception {
*/
@Test
public void instrumentAll_should_throw_exception_for_unsupported_class_file_version() {
- final byte[] bytes = createClass(Opcodes.V20 + 2);
+ final byte[] bytes = createClass(Opcodes.V21 + 2);
try {
instrumenter.instrumentAll(new ByteArrayInputStream(bytes),
new ByteArrayOutputStream(), "UnsupportedVersion");
fail("exception expected");
} catch (final IOException e) {
assertExceptionMessage("UnsupportedVersion", e);
- assertEquals("Unsupported class file major version 66",
+ assertEquals("Unsupported class file major version 67",
e.getCause().getMessage());
}
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/InstrSupportTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/InstrSupportTest.java
index 84ab05ca8d..f57a981e99 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/InstrSupportTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/InstrSupportTest.java
@@ -43,8 +43,8 @@ public void setup() {
}
@Test
- public void classReaderFor_should_read_java_21_class() {
- final byte[] bytes = createJava21Class();
+ public void classReaderFor_should_read_java_22_class() {
+ final byte[] bytes = createJava22Class();
final ClassReader classReader = InstrSupport.classReaderFor(bytes);
@@ -53,16 +53,16 @@ public void classReaderFor_should_read_java_21_class() {
public void visit(final int version, final int access,
final String name, final String signature,
final String superName, final String[] interfaces) {
- assertEquals(Opcodes.V20 + 1, version);
+ assertEquals(Opcodes.V21 + 1, version);
}
}, 0);
- assertArrayEquals(createJava21Class(), bytes);
+ assertArrayEquals(createJava22Class(), bytes);
}
- private static byte[] createJava21Class() {
+ private static byte[] createJava22Class() {
final ClassWriter cw = new ClassWriter(0);
- cw.visit(Opcodes.V20 + 1, 0, "Foo", null, "java/lang/Object", null);
+ cw.visit(Opcodes.V21 + 1, 0, "Foo", null, "java/lang/Object", null);
cw.visitEnd();
return cw.toByteArray();
}
@@ -132,7 +132,8 @@ public void needFrames_should_return_true_for_versions_greater_than_or_equal_to_
assertTrue(InstrSupport.needsFrames(Opcodes.V18));
assertTrue(InstrSupport.needsFrames(Opcodes.V19));
assertTrue(InstrSupport.needsFrames(Opcodes.V20));
- assertTrue(InstrSupport.needsFrames(Opcodes.V20 + 1));
+ assertTrue(InstrSupport.needsFrames(Opcodes.V21));
+ assertTrue(InstrSupport.needsFrames(Opcodes.V21 + 1));
assertTrue(InstrSupport.needsFrames(0x0100));
}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/InstrSupport.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/InstrSupport.java
index 170ff5486c..2f8bbda7f6 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/InstrSupport.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/InstrSupport.java
@@ -273,9 +273,9 @@ public static void push(final MethodVisitor mv, final int value) {
*/
public static ClassReader classReaderFor(final byte[] b) {
final int originalVersion = getMajorVersion(b);
- if (originalVersion == Opcodes.V20 + 1) {
+ if (originalVersion == Opcodes.V21 + 1) {
// temporarily downgrade version to bypass check in ASM
- setMajorVersion(Opcodes.V20, b);
+ setMajorVersion(Opcodes.V21, b);
}
final ClassReader classReader = new ClassReader(b);
setMajorVersion(originalVersion, b);
diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html
index 3cc1a007e6..9c4cfedf6e 100644
--- a/org.jacoco.doc/docroot/doc/changes.html
+++ b/org.jacoco.doc/docroot/doc/changes.html
@@ -22,6 +22,8 @@ Snapshot Build @qualified.bundle.version@ (@build.date@)
New Features
+ - Experimental support for Java 22 class files
+ (GitHub #1479).
- Part of bytecode generated by the Java compilers for record patterns is
filtered out during generation of report
(GitHub #1473).
From 910619b19592739d67f741624d0a25b88350b272 Mon Sep 17 00:00:00 2001
From: "Marc R. Hoffmann"
Date: Wed, 14 Jun 2023 12:04:36 +0200
Subject: [PATCH 59/66] Move validation tests from Java 20 preview to Java 21
(#1478)
Record patterns and pattern matching for switch are finalized in Java 21,
so no need to test them as preview features in earlier versions.
---
.../.classpath | 2 +-
.../.project | 2 +-
.../.settings/org.eclipse.jdt.core.prefs | 0
.../pom.xml | 27 +++++--------------
.../java21}/RecordPatternsTest.java | 6 ++---
.../java21}/SwitchPatternMatchingTest.java | 4 +--
.../java21}/targets/RecordPatternsTarget.java | 2 +-
.../targets/SwitchPatternMatchingTarget.java | 4 +--
org.jacoco.core.test.validation/pom.xml | 5 ++--
9 files changed, 18 insertions(+), 34 deletions(-)
rename {org.jacoco.core.test.validation.java20 => org.jacoco.core.test.validation.java21}/.classpath (97%)
rename {org.jacoco.core.test.validation.java20 => org.jacoco.core.test.validation.java21}/.project (92%)
rename {org.jacoco.core.test.validation.java20 => org.jacoco.core.test.validation.java21}/.settings/org.eclipse.jdt.core.prefs (100%)
rename {org.jacoco.core.test.validation.java20 => org.jacoco.core.test.validation.java21}/pom.xml (70%)
rename {org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20 => org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21}/RecordPatternsTest.java (83%)
rename {org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20 => org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21}/SwitchPatternMatchingTest.java (88%)
rename {org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20 => org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21}/targets/RecordPatternsTarget.java (96%)
rename {org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20 => org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21}/targets/SwitchPatternMatchingTarget.java (90%)
diff --git a/org.jacoco.core.test.validation.java20/.classpath b/org.jacoco.core.test.validation.java21/.classpath
similarity index 97%
rename from org.jacoco.core.test.validation.java20/.classpath
rename to org.jacoco.core.test.validation.java21/.classpath
index 91e78bc1a1..d1927f49f4 100644
--- a/org.jacoco.core.test.validation.java20/.classpath
+++ b/org.jacoco.core.test.validation.java21/.classpath
@@ -1,6 +1,6 @@
-
+
diff --git a/org.jacoco.core.test.validation.java20/.project b/org.jacoco.core.test.validation.java21/.project
similarity index 92%
rename from org.jacoco.core.test.validation.java20/.project
rename to org.jacoco.core.test.validation.java21/.project
index 1f2381ac5d..bdb0bb46a8 100644
--- a/org.jacoco.core.test.validation.java20/.project
+++ b/org.jacoco.core.test.validation.java21/.project
@@ -1,6 +1,6 @@
- org.jacoco.core.test.validation.java20
+ org.jacoco.core.test.validation.java21
diff --git a/org.jacoco.core.test.validation.java20/.settings/org.eclipse.jdt.core.prefs b/org.jacoco.core.test.validation.java21/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from org.jacoco.core.test.validation.java20/.settings/org.eclipse.jdt.core.prefs
rename to org.jacoco.core.test.validation.java21/.settings/org.eclipse.jdt.core.prefs
diff --git a/org.jacoco.core.test.validation.java20/pom.xml b/org.jacoco.core.test.validation.java21/pom.xml
similarity index 70%
rename from org.jacoco.core.test.validation.java20/pom.xml
rename to org.jacoco.core.test.validation.java21/pom.xml
index 9f3b5fcf4a..8fd27cff85 100644
--- a/org.jacoco.core.test.validation.java20/pom.xml
+++ b/org.jacoco.core.test.validation.java21/pom.xml
@@ -20,12 +20,12 @@
../org.jacoco.core.test.validation
- org.jacoco.core.test.validation.java20
+ org.jacoco.core.test.validation.java21
- JaCoCo :: Test :: Core :: Validation Java 20
+ JaCoCo :: Test :: Core :: Validation Java 21
- 20
+ 21
@@ -38,23 +38,6 @@
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
-
- --enable-preview
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
- --enable-preview
-
-
-
com.diffplug.spotless
spotless-maven-plugin
@@ -62,16 +45,18 @@
- ../org.jacoco.core.test.validation.java20/.settings/org.eclipse.jdt.core.prefs
+ ../org.jacoco.core.test.validation.java21/.settings/org.eclipse.jdt.core.prefs
+
diff --git a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/RecordPatternsTest.java b/org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21/RecordPatternsTest.java
similarity index 83%
rename from org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/RecordPatternsTest.java
rename to org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21/RecordPatternsTest.java
index aedb46ee2c..629675e4dc 100644
--- a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/RecordPatternsTest.java
+++ b/org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21/RecordPatternsTest.java
@@ -10,15 +10,15 @@
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
-package org.jacoco.core.test.validation.java20;
+package org.jacoco.core.test.validation.java21;
import org.jacoco.core.test.validation.JavaVersion;
import org.jacoco.core.test.validation.Source.Line;
import org.jacoco.core.test.validation.ValidationTestBase;
-import org.jacoco.core.test.validation.java20.targets.RecordPatternsTarget;
+import org.jacoco.core.test.validation.java21.targets.RecordPatternsTarget;
/**
- * Test of code coverage in {@link RecordPatterns}.
+ * Test of code coverage in {@link RecordPatternsTarget}.
*/
public class RecordPatternsTest extends ValidationTestBase {
diff --git a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/SwitchPatternMatchingTest.java b/org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21/SwitchPatternMatchingTest.java
similarity index 88%
rename from org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/SwitchPatternMatchingTest.java
rename to org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21/SwitchPatternMatchingTest.java
index 56aa311db6..ef53c048f1 100644
--- a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/SwitchPatternMatchingTest.java
+++ b/org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21/SwitchPatternMatchingTest.java
@@ -10,10 +10,10 @@
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
-package org.jacoco.core.test.validation.java20;
+package org.jacoco.core.test.validation.java21;
import org.jacoco.core.test.validation.ValidationTestBase;
-import org.jacoco.core.test.validation.java20.targets.SwitchPatternMatchingTarget;
+import org.jacoco.core.test.validation.java21.targets.SwitchPatternMatchingTarget;
/**
* Test of code coverage in {@link SwitchPatternMatchingTarget}.
diff --git a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/RecordPatternsTarget.java b/org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21/targets/RecordPatternsTarget.java
similarity index 96%
rename from org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/RecordPatternsTarget.java
rename to org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21/targets/RecordPatternsTarget.java
index 212b68f660..995eeebc80 100644
--- a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/RecordPatternsTarget.java
+++ b/org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21/targets/RecordPatternsTarget.java
@@ -10,7 +10,7 @@
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
-package org.jacoco.core.test.validation.java20.targets;
+package org.jacoco.core.test.validation.java21.targets;
import static org.jacoco.core.test.validation.targets.Stubs.nop;
diff --git a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/SwitchPatternMatchingTarget.java b/org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21/targets/SwitchPatternMatchingTarget.java
similarity index 90%
rename from org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/SwitchPatternMatchingTarget.java
rename to org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21/targets/SwitchPatternMatchingTarget.java
index 1be339aa2e..0bedeeb73f 100644
--- a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/SwitchPatternMatchingTarget.java
+++ b/org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21/targets/SwitchPatternMatchingTarget.java
@@ -10,13 +10,13 @@
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
-package org.jacoco.core.test.validation.java20.targets;
+package org.jacoco.core.test.validation.java21.targets;
import static org.jacoco.core.test.validation.targets.Stubs.nop;
/**
* This target exercises pattern matching for switch
- * (JEP 433).
+ * (JEP 441).
*/
public class SwitchPatternMatchingTarget {
diff --git a/org.jacoco.core.test.validation/pom.xml b/org.jacoco.core.test.validation/pom.xml
index 4092283d16..322639cc2c 100644
--- a/org.jacoco.core.test.validation/pom.xml
+++ b/org.jacoco.core.test.validation/pom.xml
@@ -419,7 +419,6 @@
../org.jacoco.core.test.validation.java8
../org.jacoco.core.test.validation.java14
../org.jacoco.core.test.validation.java16
- ../org.jacoco.core.test.validation.java20
../org.jacoco.core.test.validation.groovy
../org.jacoco.core.test.validation.scala
@@ -448,7 +447,7 @@
../org.jacoco.core.test.validation.java8
../org.jacoco.core.test.validation.java14
../org.jacoco.core.test.validation.java16
- ../org.jacoco.core.test.validation.java20
+ ../org.jacoco.core.test.validation.java21
@@ -481,7 +480,7 @@
../org.jacoco.core.test.validation.java8
../org.jacoco.core.test.validation.java14
../org.jacoco.core.test.validation.java16
- ../org.jacoco.core.test.validation.java20
+ ../org.jacoco.core.test.validation.java21
From 41bc4ac859d76fc6a6c4f5fe451f0bc38c1a6111 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Wed, 14 Jun 2023 16:02:33 +0200
Subject: [PATCH 60/66] Add test to catch cases when compilers generate wrong
line numbers (#1476)
---
.../core/test/validation/ValidationTestBase.java | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/validation/ValidationTestBase.java b/org.jacoco.core.test/src/org/jacoco/core/test/validation/ValidationTestBase.java
index 4328a4eefe..86758e9f38 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/validation/ValidationTestBase.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/validation/ValidationTestBase.java
@@ -113,6 +113,17 @@ public void execute_assertions_in_comments() throws IOException {
}
}
+ /**
+ * Source files for validation tests should contain the license header,
+ * which can not contain executable lines, so this test allows to catch
+ * cases when the compiler generates wrong line numbers.
+ */
+ @Test
+ public void first_line_in_coverage_data_should_be_greater_than_one() {
+ assertTrue("First line in coverage data should be greater than one",
+ 1 < source.getCoverage().getFirstLine());
+ }
+
@Test
public void last_line_in_coverage_data_should_be_less_or_equal_to_number_of_lines_in_source_file() {
assertTrue(String.format(
From 8271afb7520379535a42cd416855e1c41c2df1d6 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Wed, 14 Jun 2023 23:23:47 +0200
Subject: [PATCH 61/66] Add filter for exhaustive switch expression (#1472)
---
jacoco/pom.xml | 4 +-
.../java14/SwitchExpressionsTest.java | 16 -
.../targets/SwitchExpressionsTarget.java | 4 +-
.../filter/ExhaustiveSwitchFilterTest.java | 314 ++++++++++++++++++
.../filter/ExhaustiveSwitchFilter.java | 113 +++++++
.../internal/analysis/filter/Filters.java | 1 +
org.jacoco.doc/docroot/doc/changes.html | 3 +
7 files changed, 435 insertions(+), 20 deletions(-)
create mode 100644 org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/ExhaustiveSwitchFilterTest.java
create mode 100644 org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/ExhaustiveSwitchFilter.java
diff --git a/jacoco/pom.xml b/jacoco/pom.xml
index 82956db3a0..65c7e39eb7 100644
--- a/jacoco/pom.xml
+++ b/jacoco/pom.xml
@@ -111,8 +111,8 @@
- 4500000
- 3400000
+ 4600000
+ 4000000
${project.build.directory}/jacoco-${qualified.bundle.version}.zip
diff --git a/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/SwitchExpressionsTest.java b/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/SwitchExpressionsTest.java
index 0f47ad6789..974eb87d24 100644
--- a/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/SwitchExpressionsTest.java
+++ b/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/SwitchExpressionsTest.java
@@ -25,20 +25,4 @@ public SwitchExpressionsTest() {
super(SwitchExpressionsTarget.class);
}
- public void assertExhaustiveSwitchExpression(Line line) {
- if (isJDKCompiler) {
- assertPartlyCovered(line, 1, 3);
- } else {
- assertFullyCovered(line, 1, 3);
- }
- }
-
- public void assertExhaustiveSwitchExpressionLastCase(Line line) {
- if (isJDKCompiler) {
- assertFullyCovered(line);
- } else {
- assertPartlyCovered(line);
- }
- }
-
}
diff --git a/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/targets/SwitchExpressionsTarget.java b/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/targets/SwitchExpressionsTarget.java
index 48f7a61d72..04715a5ae8 100644
--- a/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/targets/SwitchExpressionsTarget.java
+++ b/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/targets/SwitchExpressionsTarget.java
@@ -101,10 +101,10 @@ private static void switchExpressionWithYield() {
private static void exhaustiveSwitchExpression(Stubs.Enum e) {
- nop(switch (e) { // assertExhaustiveSwitchExpression()
+ nop(switch (e) { // assertFullyCovered(0, 3)
case A -> i1(); // assertFullyCovered()
case B -> i1(); // assertFullyCovered()
- case C -> i1(); // assertExhaustiveSwitchExpressionLastCase()
+ case C -> i1(); // assertFullyCovered()
}); // assertEmpty()
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/ExhaustiveSwitchFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/ExhaustiveSwitchFilterTest.java
new file mode 100644
index 0000000000..20620fffdb
--- /dev/null
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/ExhaustiveSwitchFilterTest.java
@@ -0,0 +1,314 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.internal.analysis.filter;
+
+import org.jacoco.core.internal.instr.InstrSupport;
+import org.junit.Test;
+import org.objectweb.asm.Label;
+import org.objectweb.asm.Opcodes;
+import org.objectweb.asm.tree.AbstractInsnNode;
+import org.objectweb.asm.tree.MethodNode;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Unit tests for {@link ExhaustiveSwitchFilter}.
+ */
+public class ExhaustiveSwitchFilterTest extends FilterTestBase {
+
+ private final IFilter filter = new ExhaustiveSwitchFilter();
+
+ /**
+ *
+ * enum E {
+ * A, B, C
+ * }
+ *
+ * int example(E e) {
+ * return switch (e) {
+ * case A -> 1;
+ * case B -> 2;
+ * case C -> 3;
+ * };
+ * }
+ *
+ */
+ @Test
+ public void should_filter_when_default_branch_has_LineNumber_of_switch() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "Example", "()I", null, null);
+
+ final Label start = new Label();
+ final Label end = new Label();
+ m.visitLabel(start);
+ m.visitLineNumber(0, start);
+ m.visitFieldInsn(Opcodes.GETSTATIC, "Example$1", "$SwitchMap$Example$E",
+ "[I");
+ m.visitVarInsn(Opcodes.ALOAD, 0);
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "Example$E", "ordinal", "()I",
+ false);
+ m.visitInsn(Opcodes.IALOAD);
+
+ final Label dflt = new Label();
+ final Label case1 = new Label();
+ final Label case2 = new Label();
+ final Label case3 = new Label();
+ m.visitLookupSwitchInsn(dflt, new int[] { 1, 2, 3 },
+ new Label[] { case1, case2, case3 });
+ final AbstractInsnNode switchNode = m.instructions.getLast();
+ final Set newTargets = new HashSet();
+
+ m.visitLabel(dflt);
+ final Range range = new Range();
+ range.fromInclusive = m.instructions.getLast();
+ m.visitLineNumber(0, dflt);
+ m.visitTypeInsn(Opcodes.NEW, "java/lang/IncompatibleClassChangeError");
+ m.visitInsn(Opcodes.DUP);
+ m.visitMethodInsn(Opcodes.INVOKESPECIAL,
+ "java/lang/IncompatibleClassChangeError", "", "()V",
+ false);
+ m.visitInsn(Opcodes.ATHROW);
+ range.toInclusive = m.instructions.getLast();
+
+ m.visitLabel(case1);
+ m.visitInsn(Opcodes.ICONST_1);
+ newTargets.add(m.instructions.getLast());
+ m.visitJumpInsn(Opcodes.GOTO, end);
+
+ m.visitLabel(case2);
+ m.visitInsn(Opcodes.ICONST_2);
+ newTargets.add(m.instructions.getLast());
+
+ m.visitLabel(case3);
+ m.visitInsn(Opcodes.ICONST_3);
+ newTargets.add(m.instructions.getLast());
+
+ m.visitLabel(end);
+ m.visitInsn(Opcodes.IRETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored(range);
+ assertReplacedBranches(switchNode, newTargets);
+ }
+
+ /**
+ *
+ * enum E {
+ * A, B, C
+ * }
+ *
+ * int example(E e) {
+ * return switch (e) {
+ * case A -> 1;
+ * case B -> 2;
+ * case C -> 3;
+ * };
+ * }
+ *
+ */
+ @Test
+ public void should_filter_when_default_branch_has_no_LineNumber() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "Example", "()I", null, null);
+
+ final Label start = new Label();
+ final Label end = new Label();
+ m.visitLabel(start);
+ m.visitLineNumber(0, start);
+ m.visitFieldInsn(Opcodes.GETSTATIC, "Example$1", "$SwitchMap$Example$E",
+ "[I");
+ m.visitVarInsn(Opcodes.ALOAD, 0);
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "Example$E", "ordinal", "()I",
+ false);
+ m.visitInsn(Opcodes.IALOAD);
+
+ final Label dflt = new Label();
+ final Label case1 = new Label();
+ final Label case2 = new Label();
+ final Label case3 = new Label();
+ m.visitLookupSwitchInsn(dflt, new int[] { 1, 2, 3 },
+ new Label[] { case1, case2, case3 });
+ final AbstractInsnNode switchNode = m.instructions.getLast();
+ final Set newTargets = new HashSet();
+
+ m.visitLabel(dflt);
+ final Range range = new Range();
+ range.fromInclusive = m.instructions.getLast();
+ m.visitTypeInsn(Opcodes.NEW, "java/lang/IncompatibleClassChangeError");
+ m.visitInsn(Opcodes.DUP);
+ m.visitMethodInsn(Opcodes.INVOKESPECIAL,
+ "java/lang/IncompatibleClassChangeError", "", "()V",
+ false);
+ m.visitInsn(Opcodes.ATHROW);
+ range.toInclusive = m.instructions.getLast();
+
+ m.visitLabel(case1);
+ m.visitInsn(Opcodes.ICONST_1);
+ newTargets.add(m.instructions.getLast());
+ m.visitJumpInsn(Opcodes.GOTO, end);
+
+ m.visitLabel(case2);
+ m.visitInsn(Opcodes.ICONST_2);
+ newTargets.add(m.instructions.getLast());
+
+ m.visitLabel(case3);
+ m.visitInsn(Opcodes.ICONST_3);
+ newTargets.add(m.instructions.getLast());
+
+ m.visitLabel(end);
+ m.visitInsn(Opcodes.IRETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored(range);
+ assertReplacedBranches(switchNode, newTargets);
+ }
+
+ /**
+ *
+ * enum E {
+ * A, B, C
+ * }
+ *
+ * int example(E e) {
+ * return switch (e) {
+ * case A -> 1;
+ * case B -> 2;
+ * case C -> 3;
+ * };
+ * }
+ *
+ */
+ @Test
+ public void should_filter_when_default_branch_throws_Java_21_MatchException() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "Example", "()I", null, null);
+
+ final Label start = new Label();
+ final Label end = new Label();
+ m.visitLabel(start);
+ m.visitLineNumber(0, start);
+ m.visitFieldInsn(Opcodes.GETSTATIC, "Example$1", "$SwitchMap$Example$E",
+ "[I");
+ m.visitVarInsn(Opcodes.ALOAD, 0);
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "Example$E", "ordinal", "()I",
+ false);
+ m.visitInsn(Opcodes.IALOAD);
+
+ final Label dflt = new Label();
+ final Label case1 = new Label();
+ final Label case2 = new Label();
+ final Label case3 = new Label();
+ m.visitLookupSwitchInsn(dflt, new int[] { 1, 2, 3 },
+ new Label[] { case1, case2, case3 });
+ final AbstractInsnNode switchNode = m.instructions.getLast();
+ final Set newTargets = new HashSet();
+
+ m.visitLabel(dflt);
+ final Range range = new Range();
+ range.fromInclusive = m.instructions.getLast();
+ m.visitTypeInsn(Opcodes.NEW, "java/lang/MatchException");
+ m.visitInsn(Opcodes.DUP);
+ m.visitInsn(Opcodes.ACONST_NULL);
+ m.visitInsn(Opcodes.ACONST_NULL);
+ m.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/MatchException",
+ "", "(Ljava/lang/String;Ljava/lang/Throwable;)V", false);
+ m.visitInsn(Opcodes.ATHROW);
+ range.toInclusive = m.instructions.getLast();
+
+ m.visitLabel(case1);
+ m.visitInsn(Opcodes.ICONST_1);
+ newTargets.add(m.instructions.getLast());
+ m.visitJumpInsn(Opcodes.GOTO, end);
+
+ m.visitLabel(case2);
+ m.visitInsn(Opcodes.ICONST_2);
+ newTargets.add(m.instructions.getLast());
+
+ m.visitLabel(case3);
+ m.visitInsn(Opcodes.ICONST_3);
+ newTargets.add(m.instructions.getLast());
+
+ m.visitLabel(end);
+ m.visitInsn(Opcodes.IRETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored(range);
+ assertReplacedBranches(switchNode, newTargets);
+ }
+
+ /**
+ *
+ * enum E {
+ * A, B, C
+ * }
+ *
+ * int example(E e) {
+ * return switch (e) {
+ * case A -> 1;
+ * case B -> 2;
+ * default -> throw new IncompatibleClassChangeError();
+ * };
+ * }
+ *
+ */
+ @Test
+ public void should_not_filter_when_default_branch_has_LineNumber_different_from_switch() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "Example", "()I", null, null);
+
+ final Label start = new Label();
+ final Label end = new Label();
+ m.visitLabel(start);
+ m.visitLineNumber(0, start);
+ m.visitFieldInsn(Opcodes.GETSTATIC, "Example$1", "$SwitchMap$Example$E",
+ "[I");
+ m.visitVarInsn(Opcodes.ALOAD, 0);
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "Example$E", "ordinal", "()I",
+ false);
+ m.visitInsn(Opcodes.IALOAD);
+
+ final Label dflt = new Label();
+ final Label case1 = new Label();
+ final Label case2 = new Label();
+ m.visitLookupSwitchInsn(dflt, new int[] { 1, 2 },
+ new Label[] { case1, case2 });
+
+ m.visitLabel(dflt);
+ m.visitLineNumber(1, dflt);
+ m.visitTypeInsn(Opcodes.NEW, "java/lang/IncompatibleClassChangeError");
+ m.visitInsn(Opcodes.DUP);
+ m.visitMethodInsn(Opcodes.INVOKESPECIAL,
+ "java/lang/IncompatibleClassChangeError", "", "()V",
+ false);
+ m.visitInsn(Opcodes.ATHROW);
+
+ m.visitLabel(case1);
+ m.visitInsn(Opcodes.ICONST_1);
+ m.visitJumpInsn(Opcodes.GOTO, end);
+
+ m.visitLabel(case2);
+ m.visitInsn(Opcodes.ICONST_2);
+
+ m.visitLabel(end);
+ m.visitInsn(Opcodes.IRETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored();
+ }
+
+}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/ExhaustiveSwitchFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/ExhaustiveSwitchFilter.java
new file mode 100644
index 0000000000..4a5e90f3d7
--- /dev/null
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/ExhaustiveSwitchFilter.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.internal.analysis.filter;
+
+import org.objectweb.asm.Opcodes;
+import org.objectweb.asm.tree.AbstractInsnNode;
+import org.objectweb.asm.tree.LabelNode;
+import org.objectweb.asm.tree.LineNumberNode;
+import org.objectweb.asm.tree.LookupSwitchInsnNode;
+import org.objectweb.asm.tree.MethodNode;
+import org.objectweb.asm.tree.TableSwitchInsnNode;
+import org.objectweb.asm.tree.TypeInsnNode;
+
+import java.util.HashSet;
+import java.util.List;
+
+/**
+ * Filters default branch generated by compilers for exhaustive switch
+ * expressions.
+ */
+final class ExhaustiveSwitchFilter implements IFilter {
+
+ public void filter(final MethodNode methodNode,
+ final IFilterContext context, final IFilterOutput output) {
+ final Matcher matcher = new Matcher();
+ int line = -1;
+ for (final AbstractInsnNode i : methodNode.instructions) {
+ if (i.getType() == AbstractInsnNode.LINE) {
+ line = ((LineNumberNode) i).line;
+ }
+ matcher.match(i, line, output);
+ }
+ }
+
+ private static class Matcher extends AbstractMatcher {
+ public void match(final AbstractInsnNode start, final int line,
+ final IFilterOutput output) {
+ final LabelNode dflt;
+ final List labels;
+ if (start.getOpcode() == Opcodes.LOOKUPSWITCH) {
+ dflt = ((LookupSwitchInsnNode) start).dflt;
+ labels = ((LookupSwitchInsnNode) start).labels;
+ } else if (start.getOpcode() == Opcodes.TABLESWITCH) {
+ dflt = ((TableSwitchInsnNode) start).dflt;
+ labels = ((TableSwitchInsnNode) start).labels;
+ } else {
+ return;
+ }
+
+ cursor = skipToLineNumberOrInstruction(dflt);
+ if (cursor == null) {
+ return;
+ }
+ if (cursor.getType() == AbstractInsnNode.LINE) {
+ if (line != ((LineNumberNode) cursor).line) {
+ return;
+ }
+ cursor = skipNonOpcodes(cursor);
+ }
+ if (cursor == null || cursor.getOpcode() != Opcodes.NEW) {
+ return;
+ }
+ if ("java/lang/MatchException"
+ .equals(((TypeInsnNode) cursor).desc)) {
+ // since Java 21
+ nextIs(Opcodes.DUP);
+ nextIs(Opcodes.ACONST_NULL);
+ nextIs(Opcodes.ACONST_NULL);
+ nextIsInvoke(Opcodes.INVOKESPECIAL, "java/lang/MatchException",
+ "", "(Ljava/lang/String;Ljava/lang/Throwable;)V");
+ } else if ("java/lang/IncompatibleClassChangeError"
+ .equals(((TypeInsnNode) cursor).desc)) {
+ // prior to Java 21
+ nextIs(Opcodes.DUP);
+ nextIsInvoke(Opcodes.INVOKESPECIAL,
+ "java/lang/IncompatibleClassChangeError", "",
+ "()V");
+ } else {
+ return;
+ }
+ nextIs(Opcodes.ATHROW);
+ if (cursor == null) {
+ return;
+ }
+ output.ignore(dflt, cursor);
+ final HashSet replacements = new HashSet();
+ for (final AbstractInsnNode label : labels) {
+ replacements.add(skipNonOpcodes(label));
+ }
+ output.replaceBranches(start, replacements);
+ }
+
+ private static AbstractInsnNode skipToLineNumberOrInstruction(
+ AbstractInsnNode cursor) {
+ while (cursor != null && (cursor.getType() == AbstractInsnNode.FRAME
+ || cursor.getType() == AbstractInsnNode.LABEL)) {
+ cursor = cursor.getNext();
+ }
+ return cursor;
+ }
+ }
+
+}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/Filters.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/Filters.java
index 3889d43d25..d8c17ceaaf 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/Filters.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/Filters.java
@@ -40,6 +40,7 @@ public static IFilter all() {
new PrivateEmptyNoArgConstructorFilter(), new AssertFilter(),
new StringSwitchJavacFilter(), new StringSwitchFilter(),
new EnumEmptyConstructorFilter(), new RecordsFilter(),
+ new ExhaustiveSwitchFilter(), //
new RecordPatternFilter(), //
new AnnotationGeneratedFilter(), new KotlinGeneratedFilter(),
new KotlinLateinitFilter(), new KotlinWhenFilter(),
diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html
index 9c4cfedf6e..5f8e029346 100644
--- a/org.jacoco.doc/docroot/doc/changes.html
+++ b/org.jacoco.doc/docroot/doc/changes.html
@@ -24,6 +24,9 @@ New Features
- Experimental support for Java 22 class files
(GitHub #1479).
+ - Part of bytecode generated by the Java compilers for exhaustive switch
+ expressions is filtered out during generation of report
+ (GitHub #1472).
- Part of bytecode generated by the Java compilers for record patterns is
filtered out during generation of report
(GitHub #1473).
From 08f4f83e5df8b7a996aa83249f5377310e493494 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Fri, 16 Jun 2023 16:31:01 +0200
Subject: [PATCH 62/66] Upgrade maven-shade-plugin to 3.5.0 (#1463)
---
org.jacoco.build/pom.xml | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index ec2fa2b52f..09591cc6e1 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -398,15 +398,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.2.1
-
-
-
- org.ow2.asm
- asm
- 7.1
-
-
+ 3.5.0
org.apache.maven.plugins
@@ -488,6 +480,7 @@
org.apache.maven.plugins
maven-shade-plugin
+ false
@@ -803,8 +796,7 @@
From 81253047e2ed7530e31909ac6eed8bc00db7377a Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Mon, 19 Jun 2023 10:52:05 +0200
Subject: [PATCH 63/66] Remove unused parts of configuration for AppVeyor
(#1483)
* Nowadays AppVeyor sets `M2_HOME` pointing on preinstalled Maven,
so the execution of downloaded `apache-maven-3.3.9\bin\mvn`
actually leads to the execution of preinstalled.
* Also `mvn` uses `JAVA_HOME`, so its addition to `PATH` is
not needed.
---
.appveyor.yml | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/.appveyor.yml b/.appveyor.yml
index c90688d6f7..baff61ae70 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -1,17 +1,11 @@
cache:
- - C:\Users\appveyor\apache-maven-3.3.9 -> appveyor.yml
- C:\Users\appveyor\.m2 -> **\pom.xml
install:
- - if not exist C:\Users\appveyor\apache-maven-3.3.9 (
- curl -LsS "http://www.apache.org/dyn/closer.cgi?action=download&filename=maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip" > apache-maven-3.3.9-bin.zip &&
- unzip apache-maven-3.3.9-bin.zip -d C:\Users\appveyor
- )
- SET JAVA_HOME=C:\Program Files\Java\jdk11
- - SET PATH=C:\Users\appveyor\apache-maven-3.3.9\bin;%JAVA_HOME%;%PATH%
build_script:
- # Maven 3.3.9 requires Java >= 7, but generation of Javadocs requires Java <= 6 (https://github.com/jacoco/jacoco/issues/110)
+ # generation of Javadocs requires Java <= 6 (https://github.com/jacoco/jacoco/issues/110)
- mvn -V -B -e verify -Djdk.version=6 --toolchains=.travis\appveyor-toolchains.xml
artifacts:
From a6fabdaba5e9e96dcf761c134a3b3bc9b88c0943 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Mon, 26 Jun 2023 14:36:15 +0200
Subject: [PATCH 64/66] Upgrade xml-maven-plugin to 1.1.0 (#1489)
---
org.jacoco.build/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 09591cc6e1..bd9da8e284 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -440,7 +440,7 @@
org.codehaus.mojo
xml-maven-plugin
- 1.0
+ 1.1.0
org.codehaus.mojo
From 5e83235dd3a8b478e602d53fe6253e83a52046e0 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Tue, 11 Jul 2023 12:32:57 +0200
Subject: [PATCH 65/66] Upgrade ECJ to 3.34.0 (#1482)
It requires Java 17 and thus transitively our build should require it too.
---
.appveyor.yml | 9 +++++++--
.azure-pipelines/azure-pipelines.yml | 10 ++++++----
org.jacoco.build/pom.xml | 4 ++--
org.jacoco.doc/docroot/doc/build.html | 4 ++--
org.jacoco.doc/docroot/doc/changes.html | 2 ++
org.jacoco.doc/docroot/doc/environment.html | 2 +-
6 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/.appveyor.yml b/.appveyor.yml
index baff61ae70..9b36f8e7a3 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -2,11 +2,16 @@ cache:
- C:\Users\appveyor\.m2 -> **\pom.xml
install:
- - SET JAVA_HOME=C:\Program Files\Java\jdk11
+ - mkdir .jdk
+ - curl -L "https://api.azul.com/zulu/download/community/v1.0/bundles/latest/binary/?jdk_version=17&ext=zip&os=windows&arch=x86&hw_bitness=64&javafx=false&bundle_type=jdk" -o .jdk/jdk.zip
+ - unzip -d .jdk .jdk/jdk.zip
+ - mv .jdk/*/* .jdk
+ - .jdk\bin\java -version
+ - SET JAVA_HOME=%CD%\.jdk
build_script:
# generation of Javadocs requires Java <= 6 (https://github.com/jacoco/jacoco/issues/110)
- - mvn -V -B -e verify -Djdk.version=6 --toolchains=.travis\appveyor-toolchains.xml
+ - mvn -V -B -e verify -Djdk.version=6 -Dbytecode.version=5 --toolchains=.travis\appveyor-toolchains.xml
artifacts:
- path: jacoco\target\*.zip
diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml
index 3d38cb4eda..da3f52c61f 100644
--- a/.azure-pipelines/azure-pipelines.yml
+++ b/.azure-pipelines/azure-pipelines.yml
@@ -38,11 +38,11 @@ jobs:
JDK_VERSION: 18
JDK 19:
JDK_VERSION: 19
- JDK 19 with ECJ:
- JDK_VERSION: 19
- ECJ: true
JDK 20:
JDK_VERSION: 20
+ JDK 20 with ECJ:
+ JDK_VERSION: 20
+ ECJ: true
JDK 21:
JDK_VERSION: 21
JDK 22:
@@ -80,8 +80,10 @@ jobs:
tar -xzf .maven/maven.tar.gz -C .maven --strip-components 1
displayName: Setup Maven
- bash: |
- if [[ "$JDK_VERSION" -ge "11" ]]; then
+ if [[ "$JDK_VERSION" -ge "17" ]]; then
export JAVA_HOME=$PWD/.jdk
+ else
+ export JAVA_HOME=$JAVA_HOME_17_X64
fi
if [[ "$BUILD_SOURCEBRANCH" == "refs/heads/master" && "$JDK_VERSION" == "5" ]]; then
.maven/bin/mvn -V -B -e -f org.jacoco.build \
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index bd9da8e284..7183ec5a42 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -523,7 +523,7 @@
- 11
+ 17
@@ -945,7 +945,7 @@
org.eclipse.jdt
ecj
- 3.33.0
+ 3.34.0
org.codehaus.plexus
diff --git a/org.jacoco.doc/docroot/doc/build.html b/org.jacoco.doc/docroot/doc/build.html
index 25e3756eba..2411e9a030 100644
--- a/org.jacoco.doc/docroot/doc/build.html
+++ b/org.jacoco.doc/docroot/doc/build.html
@@ -24,7 +24,7 @@ Build
The JaCoCo build is based on Maven and
can be locally executed on every machine with a proper
environment setup. In particular you need at
- least Maven 3.5.4 and JDK 11
+ least Maven 3.5.4 and JDK 17
installations. Developers are encouraged to run the build before every commit
to ensure consistency of the source tree.
@@ -280,8 +280,8 @@ Compilation and testing with different JDKs
mvn clean verify -Djdk.version=17 -Dbytecode.version=17 -Decj
mvn clean verify -Djdk.version=18 -Dbytecode.version=18
mvn clean verify -Djdk.version=19 -Dbytecode.version=19
- mvn clean verify -Djdk.version=19 -Dbytecode.version=19 -Decj
mvn clean verify -Djdk.version=20 -Dbytecode.version=20
+ mvn clean verify -Djdk.version=20 -Dbytecode.version=20 -Decj
mvn clean verify -Djdk.version=21 -Dbytecode.version=21
diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html
index 5f8e029346..24fe2ff077 100644
--- a/org.jacoco.doc/docroot/doc/changes.html
+++ b/org.jacoco.doc/docroot/doc/changes.html
@@ -49,6 +49,8 @@ Non-functional Changes
(GitHub #1467).
- Maven 3.9.2 should not produce warnings for jacoco-maven-plugin
(GitHub #1468).
+ - JaCoCo build now requires JDK 17
+ (GitHub #1482).
Release 0.8.10 (2023/04/24)
diff --git a/org.jacoco.doc/docroot/doc/environment.html b/org.jacoco.doc/docroot/doc/environment.html
index 8755ccf6ec..54fe8629e9 100644
--- a/org.jacoco.doc/docroot/doc/environment.html
+++ b/org.jacoco.doc/docroot/doc/environment.html
@@ -76,7 +76,7 @@ Build
The JaCoCo build is based on Maven
- and requires at least Maven 3.5.4 and JDK 11.
+ and requires at least Maven 3.5.4 and JDK 17.
See the build description for details.
From 46fad5399d091ecd78cdac2709e8bd20cdb9d972 Mon Sep 17 00:00:00 2001
From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com>
Date: Thu, 13 Jul 2023 15:00:12 +0200
Subject: [PATCH 66/66] Upgrade Eclipse JDT Formatter to 4.28 and
spotless-maven-plugin to 2.37.0 (#1493)
---
org.jacoco.build/pom.xml | 4 ++--
.../test/validation/java21/targets/RecordPatternsTarget.java | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 7183ec5a42..f500050e69 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -461,7 +461,7 @@
com.diffplug.spotless
spotless-maven-plugin
- 2.35.0
+ 2.37.0
@@ -554,7 +554,7 @@
src/**/*.java
- 4.27
+ 4.28
../org.jacoco.core/.settings/org.eclipse.jdt.core.prefs
diff --git a/org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21/targets/RecordPatternsTarget.java b/org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21/targets/RecordPatternsTarget.java
index 995eeebc80..d129b4cc2e 100644
--- a/org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21/targets/RecordPatternsTarget.java
+++ b/org.jacoco.core.test.validation.java21/src/org/jacoco/core/test/validation/java21/targets/RecordPatternsTarget.java
@@ -24,7 +24,7 @@ private record Point(int x, int y) {
}
private static void instanceofOperator(Object o) {
- if (o instanceof Point(int x,int y)) { // assertFullyCovered(0, 2)
+ if (o instanceof Point(int x, int y)) { // assertFullyCovered(0, 2)
nop(x + y); // assertFullyCovered()
} // assertEmpty()
}