From a8966406ae5a5dee5a7d780d3449ff17183e7b2d Mon Sep 17 00:00:00 2001 From: Christian Dietrich Date: Mon, 10 Oct 2022 13:42:35 +0200 Subject: [PATCH 01/66] Upgrade ASM to 9.4 (#1368) Signed-off-by: Christian Dietrich --- org.jacoco.build/licenses/{asm-9.3.html => asm-9.4.html} | 2 +- org.jacoco.build/pom.xml | 2 +- org.jacoco.doc/docroot/doc/changes.html | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) rename org.jacoco.build/licenses/{asm-9.3.html => asm-9.4.html} (96%) diff --git a/org.jacoco.build/licenses/asm-9.3.html b/org.jacoco.build/licenses/asm-9.4.html similarity index 96% rename from org.jacoco.build/licenses/asm-9.3.html rename to org.jacoco.build/licenses/asm-9.4.html index f69f4d6eba..8a11337519 100644 --- a/org.jacoco.build/licenses/asm-9.3.html +++ b/org.jacoco.build/licenses/asm-9.4.html @@ -1,7 +1,7 @@

ASM

- ASM 9.3 is subject to the terms and + ASM 9.4 is subject to the terms and conditions of the following license:

diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml index d98e03062d..9ad71d90fa 100644 --- a/org.jacoco.build/pom.xml +++ b/org.jacoco.build/pom.xml @@ -139,7 +139,7 @@ ${jvm.args} - 9.3 + 9.4 1.9.16 2.0.28 4.13.1 diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html index bddfdc44b5..62a3788503 100644 --- a/org.jacoco.doc/docroot/doc/changes.html +++ b/org.jacoco.doc/docroot/doc/changes.html @@ -31,8 +31,9 @@

Non-functional Changes

Release 0.8.8 (2022/04/05)

From ab859ac504233cea7ebb7114b335254ab3e45cb1 Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com> Date: Mon, 10 Oct 2022 15:40:26 +0200 Subject: [PATCH 02/66] Upgrade Groovy to 3.0.13 (#1372) --- org.jacoco.core.test.validation.groovy/pom.xml | 2 +- org.jacoco.core.test.validation/pom.xml | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/org.jacoco.core.test.validation.groovy/pom.xml b/org.jacoco.core.test.validation.groovy/pom.xml index 542f3c5a63..d1514379e4 100644 --- a/org.jacoco.core.test.validation.groovy/pom.xml +++ b/org.jacoco.core.test.validation.groovy/pom.xml @@ -27,7 +27,7 @@ 1.13.0 - 3.0.8 + 3.0.13 diff --git a/org.jacoco.core.test.validation/pom.xml b/org.jacoco.core.test.validation/pom.xml index 5113448b35..e452e936f1 100644 --- a/org.jacoco.core.test.validation/pom.xml +++ b/org.jacoco.core.test.validation/pom.xml @@ -351,7 +351,7 @@ 16 - + 16 18 @@ -363,9 +363,7 @@ ../org.jacoco.core.test.validation.java8 ../org.jacoco.core.test.validation.java14 ../org.jacoco.core.test.validation.java16 - ../org.jacoco.core.test.validation.scala @@ -381,7 +379,7 @@ 16 - + 16 19 @@ -393,9 +391,7 @@ ../org.jacoco.core.test.validation.java8 ../org.jacoco.core.test.validation.java14 ../org.jacoco.core.test.validation.java16 - ../org.jacoco.core.test.validation.scala @@ -411,7 +407,7 @@ 16 - + 16 20 @@ -423,7 +419,7 @@ ../org.jacoco.core.test.validation.java8 ../org.jacoco.core.test.validation.java14 ../org.jacoco.core.test.validation.java16 - ../org.jacoco.core.test.validation.scala From 8a367e300688f923067c2af45f5e8785b8f80062 Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com> Date: Mon, 10 Oct 2022 17:45:55 +0200 Subject: [PATCH 03/66] Update documentation: JDK version 19 is officially supported (#1371) --- org.jacoco.doc/docroot/doc/build.html | 9 +++++++++ org.jacoco.doc/docroot/doc/changes.html | 6 ++++-- org.jacoco.doc/docroot/doc/environment.html | 2 +- org.jacoco.doc/docroot/doc/faq.html | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/org.jacoco.doc/docroot/doc/build.html b/org.jacoco.doc/docroot/doc/build.html index 16b9c6b182..36b2e45045 100644 --- a/org.jacoco.doc/docroot/doc/build.html +++ b/org.jacoco.doc/docroot/doc/build.html @@ -95,6 +95,7 @@

Compilation and testing with different JDKs

JDK 16 JDK 17 JDK 18 + JDK 19 @@ -114,6 +115,7 @@

Compilation and testing with different JDKs

16 16 16 + 16 org.jacoco.core.test.validation.java14 @@ -131,6 +133,7 @@

Compilation and testing with different JDKs

14 14 14 + 14 org.jacoco.core.test.validation.java8 @@ -148,6 +151,7 @@

Compilation and testing with different JDKs

8 8 8 + 8 org.jacoco.core.test.validation.java7 @@ -165,6 +169,7 @@

Compilation and testing with different JDKs

7 7 7 + 7 org.jacoco.core.test.validation.groovy @@ -182,6 +187,7 @@

Compilation and testing with different JDKs

8 8 8 + 8 org.jacoco.core.test.validation.kotlin @@ -199,6 +205,7 @@

Compilation and testing with different JDKs

6 6 6 + 6 all other modules @@ -216,6 +223,7 @@

Compilation and testing with different JDKs

7 7 7 + 7 @@ -262,6 +270,7 @@

Compilation and testing with different JDKs

  • mvn clean verify -Djdk.version=16 -Dbytecode.version=16
  • mvn clean verify -Djdk.version=17 -Dbytecode.version=17
  • mvn clean verify -Djdk.version=18 -Dbytecode.version=18
  • +
  • mvn clean verify -Djdk.version=19 -Dbytecode.version=19
  • diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html index 62a3788503..02a17356c5 100644 --- a/org.jacoco.doc/docroot/doc/changes.html +++ b/org.jacoco.doc/docroot/doc/changes.html @@ -22,6 +22,10 @@

    Snapshot Build @qualified.bundle.version@ (@build.date@)

    New Features

      +
    • JaCoCo now officially supports Java 19 + (GitHub #1371).
    • +
    • Experimental support for Java 20 class files + (GitHub #1335).
    • Add parameter to include the current project in the report-aggregate Maven goal (GitHub #1007).
    • @@ -29,8 +33,6 @@

      New Features

      Non-functional Changes

        -
      • Experimental support for Java 20 class files - (GitHub #1335).
      • JaCoCo now depends on ASM 9.4 (GitHub #1299, #1368).
      • diff --git a/org.jacoco.doc/docroot/doc/environment.html b/org.jacoco.doc/docroot/doc/environment.html index c424e65390..895f18bc9d 100644 --- a/org.jacoco.doc/docroot/doc/environment.html +++ b/org.jacoco.doc/docroot/doc/environment.html @@ -69,7 +69,7 @@

        JRE/JDK

        The minimum supported JRE version for JaCoCo is Java 5. To guarantee compatibility JaCoCo release builds should always be executed using JDK 5. In addition we run builds with 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 - and 18 JDKs. + 18, and 19 JDKs.

        Build

        diff --git a/org.jacoco.doc/docroot/doc/faq.html b/org.jacoco.doc/docroot/doc/faq.html index fcfea9feaf..daccdfad80 100644 --- a/org.jacoco.doc/docroot/doc/faq.html +++ b/org.jacoco.doc/docroot/doc/faq.html @@ -45,7 +45,7 @@

        Does JaCoCo have a plug-in for [Eclipse|Netbeans|Whatever...]?

        What Java versions are supported by JaCoCo?

        - JaCoCo supports Java class files from version 1.0 to 18. However the minimum + JaCoCo supports Java class files from version 1.0 to 19. However the minimum JRE version required by the JaCoCo runtime (e.g. the agent) and the JaCoCo tools is 1.5. Also note that class files under test from version 1.6 and above have to contain valid stackmap frames. From 4d09eceb478338680ca87c38e8b282035a3b5abd Mon Sep 17 00:00:00 2001 From: "Marc R. Hoffmann" Date: Wed, 18 Jan 2023 13:08:02 +0100 Subject: [PATCH 04/66] Add official support for Java 20, experimental for Java 21 (#1386) --- .azure-pipelines/azure-pipelines.yml | 2 ++ org.jacoco.build/pom.xml | 14 +++++++++ org.jacoco.core.test.validation/pom.xml | 31 +++++++++++++++++++ .../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/build.html | 8 +++++ org.jacoco.doc/docroot/doc/changes.html | 9 +++--- org.jacoco.doc/docroot/doc/environment.html | 2 +- org.jacoco.doc/docroot/doc/faq.html | 2 +- 11 files changed, 82 insertions(+), 25 deletions(-) diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index 10105a7841..0877416b5e 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -37,6 +37,8 @@ jobs: JDK_VERSION: 19 JDK 20: JDK_VERSION: 20 + JDK 21: + JDK_VERSION: 21 pool: vmImage: 'ubuntu-18.04' steps: diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml index 9ad71d90fa..b98acecc30 100644 --- a/org.jacoco.build/pom.xml +++ b/org.jacoco.build/pom.xml @@ -905,6 +905,20 @@ + + java21-bytecode + + + bytecode.version + 21 + + + + 13 + 13 + + + ecj diff --git a/org.jacoco.core.test.validation/pom.xml b/org.jacoco.core.test.validation/pom.xml index e452e936f1..6a52250ddd 100644 --- a/org.jacoco.core.test.validation/pom.xml +++ b/org.jacoco.core.test.validation/pom.xml @@ -425,6 +425,37 @@ ../org.jacoco.core.test.validation.scala + + + java21-bytecode + + + bytecode.version + 21 + + + + + 16 + + 16 + + 21 + 21 + + + ../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.scala + + + 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 001c2a6707..66ed687f1e 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.V19 + 1); + final byte[] originalBytes = createClass(Opcodes.V20 + 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.V19 + 2); + final byte[] bytes = createClass(Opcodes.V20 + 2); try { analyzer.analyzeClass(bytes, "UnsupportedVersion"); fail("exception expected"); } catch (IOException e) { assertExceptionMessage("UnsupportedVersion", e); - assertEquals("Unsupported class file major version 65", + assertEquals("Unsupported class file major version 66", 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.V19 + 2); + final byte[] bytes = createClass(Opcodes.V20 + 2); try { analyzer.analyzeAll(new ByteArrayInputStream(bytes), "UnsupportedVersion"); fail("exception expected"); } catch (IOException e) { assertExceptionMessage("UnsupportedVersion", e); - assertEquals("Unsupported class file major version 65", + assertEquals("Unsupported class file major version 66", 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 a823f3c241..20cb2e1281 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.V19 + 1); + final byte[] originalBytes = createClass(Opcodes.V20 + 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.V19 + 2); + final byte[] bytes = createClass(Opcodes.V20 + 2); try { instrumenter.instrument(bytes, "UnsupportedVersion"); fail("exception expected"); } catch (final IOException e) { assertExceptionMessage("UnsupportedVersion", e); - assertEquals("Unsupported class file major version 65", + assertEquals("Unsupported class file major version 66", 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.V19 + 2); + final byte[] bytes = createClass(Opcodes.V20 + 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 65", + assertEquals("Unsupported class file major version 66", 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 dadeebf517..39f4b42e83 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_20_class() { - final byte[] bytes = createJava20Class(); + public void classReaderFor_should_read_java_21_class() { + final byte[] bytes = createJava21Class(); final ClassReader classReader = InstrSupport.classReaderFor(bytes); @@ -53,16 +53,16 @@ public void classReaderFor_should_read_java_20_class() { public void visit(final int version, final int access, final String name, final String signature, final String superName, final String[] interfaces) { - assertEquals(Opcodes.V19 + 1, version); + assertEquals(Opcodes.V20 + 1, version); } }, 0); - assertArrayEquals(createJava20Class(), bytes); + assertArrayEquals(createJava21Class(), bytes); } - private static byte[] createJava20Class() { + private static byte[] createJava21Class() { final ClassWriter cw = new ClassWriter(0); - cw.visit(Opcodes.V19 + 1, 0, "Foo", null, "java/lang/Object", null); + cw.visit(Opcodes.V20 + 1, 0, "Foo", null, "java/lang/Object", null); cw.visitEnd(); return cw.toByteArray(); } @@ -131,7 +131,8 @@ public void needFrames_should_return_true_for_versions_greater_than_or_equal_to_ assertTrue(InstrSupport.needsFrames(Opcodes.V17)); assertTrue(InstrSupport.needsFrames(Opcodes.V18)); assertTrue(InstrSupport.needsFrames(Opcodes.V19)); - assertTrue(InstrSupport.needsFrames(Opcodes.V19 + 1)); + assertTrue(InstrSupport.needsFrames(Opcodes.V20)); + assertTrue(InstrSupport.needsFrames(Opcodes.V20 + 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 29e9741bad..eff16e6872 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.V19 + 1) { + if (originalVersion == Opcodes.V20 + 1) { // temporarily downgrade version to bypass check in ASM - setMajorVersion(Opcodes.V19, b); + setMajorVersion(Opcodes.V20, b); } final ClassReader classReader = new ClassReader(b); setMajorVersion(originalVersion, b); diff --git a/org.jacoco.doc/docroot/doc/build.html b/org.jacoco.doc/docroot/doc/build.html index 36b2e45045..29052ed6d4 100644 --- a/org.jacoco.doc/docroot/doc/build.html +++ b/org.jacoco.doc/docroot/doc/build.html @@ -96,6 +96,7 @@

        Compilation and testing with different JDKs

        JDK 17 JDK 18 JDK 19 + JDK 20 @@ -116,6 +117,7 @@

        Compilation and testing with different JDKs

        16 16 16 + 16 org.jacoco.core.test.validation.java14 @@ -134,6 +136,7 @@

        Compilation and testing with different JDKs

        14 14 14 + 14 org.jacoco.core.test.validation.java8 @@ -152,6 +155,7 @@

        Compilation and testing with different JDKs

        8 8 8 + 8 org.jacoco.core.test.validation.java7 @@ -170,6 +174,7 @@

        Compilation and testing with different JDKs

        7 7 7 + 7 org.jacoco.core.test.validation.groovy @@ -188,6 +193,7 @@

        Compilation and testing with different JDKs

        8 8 8 + 8 org.jacoco.core.test.validation.kotlin @@ -206,6 +212,7 @@

        Compilation and testing with different JDKs

        6 6 6 + 6 all other modules @@ -224,6 +231,7 @@

        Compilation and testing with different JDKs

        7 7 7 + 7 diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html index 02a17356c5..59bdee188e 100644 --- a/org.jacoco.doc/docroot/doc/changes.html +++ b/org.jacoco.doc/docroot/doc/changes.html @@ -22,10 +22,11 @@

        Snapshot Build @qualified.bundle.version@ (@build.date@)

        New Features

          -
        • JaCoCo now officially supports Java 19 - (GitHub #1371).
        • -
        • Experimental support for Java 20 class files - (GitHub #1335).
        • +
        • JaCoCo now officially supports Java 19 and 20 + (GitHub #1371, + #1386).
        • +
        • Experimental support for Java 21 class files + (GitHub #1386).
        • Add parameter to include the current project in the report-aggregate Maven goal (GitHub #1007).
        • diff --git a/org.jacoco.doc/docroot/doc/environment.html b/org.jacoco.doc/docroot/doc/environment.html index 895f18bc9d..81c429fada 100644 --- a/org.jacoco.doc/docroot/doc/environment.html +++ b/org.jacoco.doc/docroot/doc/environment.html @@ -69,7 +69,7 @@

          JRE/JDK

          The minimum supported JRE version for JaCoCo is Java 5. To guarantee compatibility JaCoCo release builds should always be executed using JDK 5. In addition we run builds with 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 - 18, and 19 JDKs. + 18, 19 and 20 JDKs.

          Build

          diff --git a/org.jacoco.doc/docroot/doc/faq.html b/org.jacoco.doc/docroot/doc/faq.html index daccdfad80..96aa3e73bd 100644 --- a/org.jacoco.doc/docroot/doc/faq.html +++ b/org.jacoco.doc/docroot/doc/faq.html @@ -45,7 +45,7 @@

          Does JaCoCo have a plug-in for [Eclipse|Netbeans|Whatever...]?

          What Java versions are supported by JaCoCo?

          - JaCoCo supports Java class files from version 1.0 to 19. However the minimum + JaCoCo supports Java class files from version 1.0 to 20. However the minimum JRE version required by the JaCoCo runtime (e.g. the agent) and the JaCoCo tools is 1.5. Also note that class files under test from version 1.6 and above have to contain valid stackmap frames. From 6120d5f17ada5f8974f91885e60fb87a672ddf3b Mon Sep 17 00:00:00 2001 From: Michael Edgar Date: Tue, 31 Jan 2023 23:40:48 +0800 Subject: [PATCH 05/66] Add missing `@since` javadoc tag (#1377) --- .../src/org/jacoco/maven/ReportAggregateMojo.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/ReportAggregateMojo.java b/jacoco-maven-plugin/src/org/jacoco/maven/ReportAggregateMojo.java index 0dae609057..a09e5b9cfd 100644 --- a/jacoco-maven-plugin/src/org/jacoco/maven/ReportAggregateMojo.java +++ b/jacoco-maven-plugin/src/org/jacoco/maven/ReportAggregateMojo.java @@ -85,6 +85,8 @@ public class ReportAggregateMojo extends AbstractReportMojo { /** * Include this project in the report. If true then this projects class and * source files as well as JaCoCo execution data files will be collected. + * + * @since 0.8.9 */ @Parameter(defaultValue = "false") private boolean includeCurrentProject; From 77d7418783c60db5330b4c44532857d02cd32b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tesla=20Zhang=E2=80=AE?= Date: Mon, 6 Feb 2023 18:56:49 -0500 Subject: [PATCH 06/66] RecordsFilter should filter out accessors (#1393) --- .../java16/targets/RecordsTarget.java | 4 +- .../analysis/filter/RecordsFilterTest.java | 70 +++++++++++++++++++ .../analysis/filter/RecordsFilter.java | 46 +++++++++++- org.jacoco.doc/docroot/doc/changes.html | 3 + 4 files changed, 120 insertions(+), 3 deletions(-) diff --git a/org.jacoco.core.test.validation.java16/src/org/jacoco/core/test/validation/java16/targets/RecordsTarget.java b/org.jacoco.core.test.validation.java16/src/org/jacoco/core/test/validation/java16/targets/RecordsTarget.java index 35afa05f07..d96b5964c1 100644 --- a/org.jacoco.core.test.validation.java16/src/org/jacoco/core/test/validation/java16/targets/RecordsTarget.java +++ b/org.jacoco.core.test.validation.java16/src/org/jacoco/core/test/validation/java16/targets/RecordsTarget.java @@ -21,14 +21,14 @@ public class RecordsTarget { record WithoutFields() { // assertFullyCovered() } - record WithFields( // assertPartlyCovered() + record WithFields( // assertFullyCovered() int x // assertEmpty() ) { } record WithCustomMethods(int x) { // assertFullyCovered() public int x() { - return x; // assertNotCovered() + return x; // assertEmpty() } public String toString() { diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/RecordsFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/RecordsFilterTest.java index c2cd5ece0d..209d1fee8b 100644 --- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/RecordsFilterTest.java +++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/RecordsFilterTest.java @@ -172,4 +172,74 @@ public void should_not_filter_non_records() { assertIgnored(); } + @Test + public void should_filter_field_int() { + context.superClassName = "java/lang/Record"; + final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0, + "foo", "()Z", null, null); + m.visitVarInsn(Opcodes.ALOAD, 0); + m.visitFieldInsn(Opcodes.GETFIELD, "Dunno", "foo", "Z"); + m.visitInsn(Opcodes.IRETURN); + + filter.filter(m, context, output); + + assertMethodIgnored(m); + } + + @Test + public void should_filter_field_object() { + context.superClassName = "java/lang/Record"; + final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0, + "foo", "()Ljava/lang/String;", null, null); + m.visitVarInsn(Opcodes.ALOAD, 0); + m.visitFieldInsn(Opcodes.GETFIELD, "Dunno", "foo", "Ljava/lang/String"); + m.visitInsn(Opcodes.LRETURN); + + filter.filter(m, context, output); + + assertMethodIgnored(m); + } + + @Test + public void should_not_filter_redirect_method() { + context.superClassName = "java/lang/Record"; + final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0, + "foo", "()Ljava/lang/String;", null, null); + m.visitVarInsn(Opcodes.ALOAD, 0); + // The method name is different from the field name + m.visitFieldInsn(Opcodes.GETFIELD, "Dunno", "bar", "Ljava/lang/String"); + m.visitInsn(Opcodes.LRETURN); + + filter.filter(m, context, output); + + assertIgnored(); + } + + @Test + public void should_not_filter_noreturn_method() { + context.superClassName = "java/lang/Record"; + final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0, + "foo", "()Ljava/lang/String;", null, null); + m.visitVarInsn(Opcodes.ALOAD, 0); + m.visitFieldInsn(Opcodes.GETFIELD, "Dunno", "foo", "Ljava/lang/String"); + + filter.filter(m, context, output); + + assertIgnored(); + } + + @Test + public void should_not_filter_other_method() { + context.superClassName = "java/lang/Record"; + final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0, + "foo", "()Ljava/lang/String;", null, null); + m.visitVarInsn(Opcodes.ALOAD, 0); + m.visitFieldInsn(Opcodes.GETFIELD, "Dunno", "foo", "Ljava/lang/String"); + // Not a return statement + m.visitFieldInsn(Opcodes.GETFIELD, "Dunno", "foo", "Ljava/lang/String"); + + filter.filter(m, context, output); + + assertIgnored(); + } } diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/RecordsFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/RecordsFilter.java index 59b8b58b5a..97c046541e 100644 --- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/RecordsFilter.java +++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/RecordsFilter.java @@ -14,6 +14,7 @@ import org.objectweb.asm.Handle; import org.objectweb.asm.Opcodes; +import org.objectweb.asm.tree.FieldInsnNode; import org.objectweb.asm.tree.InvokeDynamicInsnNode; import org.objectweb.asm.tree.MethodNode; @@ -30,7 +31,8 @@ public void filter(final MethodNode methodNode, } final Matcher matcher = new Matcher(); if (matcher.isEquals(methodNode) || matcher.isHashCode(methodNode) - || matcher.isToString(methodNode)) { + || matcher.isToString(methodNode) + || matcher.isFieldAccessor(methodNode)) { output.ignore(methodNode.instructions.getFirst(), methodNode.instructions.getLast()); } @@ -58,6 +60,48 @@ boolean isHashCode(final MethodNode m) { return cursor != null; } + /** + * Criteria: method name == field name, only three instructions (aload0, + * getField, return), and note that this class only happens in a record, + * so it's safe to assume that this is the record field accessor + * generated. It may happen that the code is explicitly written by the + * developer and is intentionally kept the same as the default generated + * format, but that's just trivial code, and it still makes sense to + * filter them out anyway. + *

          + * Exception: if the code is compiled within IntelliJ IDEA's Java + * instrumentation, there will be extra null-assertion instructions + * after the getField instruction. This case is ignored. + */ + boolean isFieldAccessor(final MethodNode m) { + if (!m.desc.startsWith("()")) { + // Method with parameter(s) + return false; + } + firstIsALoad0(m); + nextIs(Opcodes.GETFIELD); + if (!(cursor instanceof FieldInsnNode)) { + return false; + } + if (!((FieldInsnNode) cursor).name.equals(m.name)) { + return false; + } + next(); + if (cursor == null) { + return false; + } + switch (cursor.getOpcode()) { + case Opcodes.IRETURN: + case Opcodes.LRETURN: + case Opcodes.FRETURN: + case Opcodes.DRETURN: + case Opcodes.ARETURN: + return true; + default: + return false; + } + } + boolean isEquals(final MethodNode m) { if (!"equals".equals(m.name) || !"(Ljava/lang/Object;)Z".equals(m.desc)) { diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html index 59bdee188e..2aa667be8b 100644 --- a/org.jacoco.doc/docroot/doc/changes.html +++ b/org.jacoco.doc/docroot/doc/changes.html @@ -30,6 +30,9 @@

          New Features

        • Add parameter to include the current project in the report-aggregate Maven goal (GitHub #1007).
        • +
        • Component accessors generated by the Java compilers for records are filtered + out during generation of report. Contributed by Tesla Zhang + (GitHub #1393).

        Non-functional Changes

        From c303454b880947242a48775d1771d7eb86844488 Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com> Date: Mon, 13 Feb 2023 12:14:17 +0100 Subject: [PATCH 07/66] Support targeting JDK 5 when using JDK >= 9 for Maven (#1398) --- jacoco-maven-plugin.test/it/setup-parent/pom.xml | 4 ---- jacoco-maven-plugin.test/pom.xml | 8 ++++++++ org.jacoco.examples.test/pom.xml | 8 ++++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/jacoco-maven-plugin.test/it/setup-parent/pom.xml b/jacoco-maven-plugin.test/it/setup-parent/pom.xml index d15caafb7c..cb1c3da1f5 100644 --- a/jacoco-maven-plugin.test/it/setup-parent/pom.xml +++ b/jacoco-maven-plugin.test/it/setup-parent/pom.xml @@ -40,10 +40,6 @@ org.apache.maven.plugins maven-compiler-plugin 2.3.2 - - @maven.compiler.source@ - @maven.compiler.target@ - org.apache.maven.plugins diff --git a/jacoco-maven-plugin.test/pom.xml b/jacoco-maven-plugin.test/pom.xml index 961fb3c256..1ebe60d895 100644 --- a/jacoco-maven-plugin.test/pom.xml +++ b/jacoco-maven-plugin.test/pom.xml @@ -55,6 +55,14 @@ org.jacoco:org.jacoco.agent:${project.version}:jar:runtime + + + 8 + 8 + diff --git a/org.jacoco.examples.test/pom.xml b/org.jacoco.examples.test/pom.xml index 3ef3b7746d..3cecacbfa9 100644 --- a/org.jacoco.examples.test/pom.xml +++ b/org.jacoco.examples.test/pom.xml @@ -124,8 +124,12 @@ ${project.build.directory}/build/examples - ${maven.compiler.source} - ${maven.compiler.target} + + 8 + 8 From 29b1befba8bff8c7f4e4e170a6bb28eb276702e7 Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com> Date: Mon, 13 Feb 2023 12:40:55 +0100 Subject: [PATCH 08/66] Use Ubuntu 20.04 in AzurePipelines (#1399) --- .azure-pipelines/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index 0877416b5e..2cc1437cc5 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -40,7 +40,7 @@ jobs: JDK 21: JDK_VERSION: 21 pool: - vmImage: 'ubuntu-18.04' + vmImage: 'ubuntu-20.04' steps: - bash: | set -e From 926f5d9001f37255090cefa2e983e3732f7799b7 Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov Date: Mon, 13 Feb 2023 23:41:17 +0100 Subject: [PATCH 09/66] Both `-Djdk.version=5` and `-Dbytecode.version=5` are required when using JDK >= 9 for Maven --- .azure-pipelines/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index 2cc1437cc5..50af07fe43 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -77,7 +77,7 @@ jobs: fi if [[ "$BUILD_SOURCEBRANCH" == "refs/heads/master" && "$JDK_VERSION" == "5" ]]; then .maven/bin/mvn -V -B -e -f org.jacoco.build \ - verify -Djdk.version=$JDK_VERSION \ + verify -Djdk.version=$JDK_VERSION -Dbytecode.version=$JDK_VERSION \ deploy:deploy -DdeployAtEnd \ --toolchains=toolchains.xml --settings=.azure-pipelines/maven-settings.xml elif [[ "$BUILD_SOURCEBRANCH" == "refs/heads/master" && "$JDK_VERSION" == "11" ]]; then From 801d3125a59d911afcda287718e22ec7b24c09b7 Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com> Date: Tue, 14 Feb 2023 16:22:29 +0100 Subject: [PATCH 10/66] Upgrade Groovy to 3.0.15 (#1400) --- org.jacoco.core.test.validation.groovy/pom.xml | 2 +- org.jacoco.core.test.validation/pom.xml | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/org.jacoco.core.test.validation.groovy/pom.xml b/org.jacoco.core.test.validation.groovy/pom.xml index d1514379e4..2d507c42f2 100644 --- a/org.jacoco.core.test.validation.groovy/pom.xml +++ b/org.jacoco.core.test.validation.groovy/pom.xml @@ -27,7 +27,7 @@ 1.13.0 - 3.0.13 + 3.0.15 diff --git a/org.jacoco.core.test.validation/pom.xml b/org.jacoco.core.test.validation/pom.xml index 6a52250ddd..d06e77ff11 100644 --- a/org.jacoco.core.test.validation/pom.xml +++ b/org.jacoco.core.test.validation/pom.xml @@ -351,7 +351,7 @@ 16 - + 16 18 @@ -379,7 +379,7 @@ 16 - + 16 19 @@ -407,7 +407,7 @@ 16 - + 16 20 @@ -419,9 +419,7 @@ ../org.jacoco.core.test.validation.java8 ../org.jacoco.core.test.validation.java14 ../org.jacoco.core.test.validation.java16 - ../org.jacoco.core.test.validation.scala @@ -437,7 +435,7 @@ 16 - + 16 21 @@ -449,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.scala From 90670069a1557b12a930bb3a70920e9a26c01d82 Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com> Date: Thu, 16 Feb 2023 17:48:30 +0100 Subject: [PATCH 11/66] Add validation test for JEP 433: Pattern Matching for switch (#1191) --- .../.classpath | 20 +++++++ .../.project | 30 ++++++++++ .../pom.xml | 59 +++++++++++++++++++ .../java20/SwitchPatternMatchingTest.java | 27 +++++++++ .../targets/SwitchPatternMatchingTarget.java | 39 ++++++++++++ org.jacoco.core.test.validation/pom.xml | 2 + 6 files changed, 177 insertions(+) create mode 100644 org.jacoco.core.test.validation.java20/.classpath create mode 100644 org.jacoco.core.test.validation.java20/.project create mode 100644 org.jacoco.core.test.validation.java20/pom.xml create mode 100644 org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/SwitchPatternMatchingTest.java create mode 100644 org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/SwitchPatternMatchingTarget.java diff --git a/org.jacoco.core.test.validation.java20/.classpath b/org.jacoco.core.test.validation.java20/.classpath new file mode 100644 index 0000000000..91e78bc1a1 --- /dev/null +++ b/org.jacoco.core.test.validation.java20/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/org.jacoco.core.test.validation.java20/.project b/org.jacoco.core.test.validation.java20/.project new file mode 100644 index 0000000000..1f2381ac5d --- /dev/null +++ b/org.jacoco.core.test.validation.java20/.project @@ -0,0 +1,30 @@ + + + org.jacoco.core.test.validation.java20 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + org.eclipse.jdt.core.javanature + + + + .settings + 2 + PARENT-1-PROJECT_LOC/org.jacoco.core.test/.settings + + + diff --git a/org.jacoco.core.test.validation.java20/pom.xml b/org.jacoco.core.test.validation.java20/pom.xml new file mode 100644 index 0000000000..452e97daba --- /dev/null +++ b/org.jacoco.core.test.validation.java20/pom.xml @@ -0,0 +1,59 @@ + + + + 4.0.0 + + + org.jacoco + org.jacoco.core.test.validation + 0.8.9-SNAPSHOT + ../org.jacoco.core.test.validation + + + org.jacoco.core.test.validation.java20 + + JaCoCo :: Test :: Core :: Validation Java 20 + + + 20 + + + + + ${project.groupId} + org.jacoco.core.test + ${project.version} + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + --enable-preview + + + + + org.apache.maven.plugins + maven-surefire-plugin + + --enable-preview + + + + + diff --git a/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/SwitchPatternMatchingTest.java b/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/SwitchPatternMatchingTest.java new file mode 100644 index 0000000000..4f8b716f01 --- /dev/null +++ b/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/SwitchPatternMatchingTest.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2009, 2022 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.SwitchPatternMatchingTarget; + +/** + * Test of code coverage in {@link SwitchPatternMatchingTarget}. + */ +public class SwitchPatternMatchingTest extends ValidationTestBase { + + public SwitchPatternMatchingTest() { + super(SwitchPatternMatchingTarget.class); + } + +} 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.java20/src/org/jacoco/core/test/validation/java20/targets/SwitchPatternMatchingTarget.java new file mode 100644 index 0000000000..6a1510e210 --- /dev/null +++ b/org.jacoco.core.test.validation.java20/src/org/jacoco/core/test/validation/java20/targets/SwitchPatternMatchingTarget.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2009, 2022 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 pattern matching for switch + * (JEP 433). + */ +public class SwitchPatternMatchingTarget { + + private static void example(Object o) { + switch (o) { // assertFullyCovered(1, 2) + case String s when s.length() == 0 -> // assertFullyCovered(0, 2) + nop(s); // assertFullyCovered() + case String s -> // assertFullyCovered() + nop(s); // assertFullyCovered() + default -> // assertEmpty() + nop(); // assertNotCovered() + } + } + + public static void main(String[] args) { + example(""); + example("a"); + } + +} diff --git a/org.jacoco.core.test.validation/pom.xml b/org.jacoco.core.test.validation/pom.xml index d06e77ff11..06b743b699 100644 --- a/org.jacoco.core.test.validation/pom.xml +++ b/org.jacoco.core.test.validation/pom.xml @@ -419,6 +419,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.groovy ../org.jacoco.core.test.validation.scala @@ -447,6 +448,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 From 035df4c9e1e4f47002892efc1a0ef506de5b5eac Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com> Date: Mon, 20 Feb 2023 16:35:34 +0100 Subject: [PATCH 12/66] Update plexus-utils to 3.0.24 (#1403) --- jacoco-maven-plugin/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jacoco-maven-plugin/pom.xml b/jacoco-maven-plugin/pom.xml index 05094223fa..e1b695e430 100644 --- a/jacoco-maven-plugin/pom.xml +++ b/jacoco-maven-plugin/pom.xml @@ -48,7 +48,7 @@ org.codehaus.plexus plexus-utils - 3.0.22 + 3.0.24 org.apache.maven.shared From c6299e5b7bff4e67775908afef668f8b3d6f123b Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov Date: Mon, 20 Feb 2023 16:40:11 +0100 Subject: [PATCH 13/66] Happy New Year 2023! --- LICENSE.md | 2 +- jacoco-maven-plugin.test/it/it-check-fails-halt/pom.xml | 2 +- .../it/it-check-fails-halt/src/main/java/Example.java | 2 +- .../it/it-check-fails-halt/src/test/java/ExampleTest.java | 2 +- jacoco-maven-plugin.test/it/it-check-fails-halt/verify.bsh | 2 +- jacoco-maven-plugin.test/it/it-check-fails-no-halt/pom.xml | 2 +- .../it/it-check-fails-no-halt/src/main/java/Example.java | 2 +- .../it-check-fails-no-halt/src/test/java/ExampleTest.java | 2 +- .../it/it-check-fails-no-halt/verify.bsh | 2 +- jacoco-maven-plugin.test/it/it-check-passes/pom.xml | 2 +- .../it/it-check-passes/src/main/java/Example.java | 2 +- .../it/it-check-passes/src/test/java/ExampleTest.java | 2 +- jacoco-maven-plugin.test/it/it-check-passes/verify.bsh | 2 +- jacoco-maven-plugin.test/it/it-customize-agent/pom.xml | 2 +- .../it/it-customize-agent/src/main/java/Example.java | 2 +- .../it/it-customize-agent/src/test/java/ExampleTest.java | 2 +- jacoco-maven-plugin.test/it/it-customize-agent/verify.bsh | 2 +- jacoco-maven-plugin.test/it/it-dump/pom.xml | 2 +- .../it/it-dump/src/main/java/Server.java | 2 +- jacoco-maven-plugin.test/it/it-dump/verify.bsh | 2 +- jacoco-maven-plugin.test/it/it-includes-excludes/pom.xml | 2 +- .../src/main/java/org/project/DatabaseUtil.java | 2 +- .../src/main/java/org/project/FileUtil.java | 2 +- .../src/main/java/org/project/TestUtil.java | 2 +- .../src/test/java/org/project/TestDatabaseUtil.java | 2 +- jacoco-maven-plugin.test/it/it-includes-excludes/verify.bsh | 2 +- .../it/it-java9-offline-instrumentation/pom.xml | 2 +- .../src/main/java/module-info.java | 2 +- .../src/main/java/org/example/Example.java | 2 +- .../src/test/java/org/example/ExampleTest.java | 2 +- jacoco-maven-plugin.test/it/it-java9/pom.xml | 2 +- .../it/it-java9/src/main/java/Example.java | 2 +- .../it/it-java9/src/test/java/ExampleTest.java | 2 +- .../it/it-merge-passes/it-merge-passes-merge/pom.xml | 2 +- .../it/it-merge-passes/it-merge-passes-project1/pom.xml | 2 +- .../it-merge-passes-project1/src/main/java/Example.java | 2 +- .../it-merge-passes-project1/src/test/java/ExampleTest.java | 2 +- .../it/it-merge-passes/it-merge-passes-project2/pom.xml | 2 +- .../it-merge-passes-project2/src/main/java/Example.java | 2 +- .../it-merge-passes-project2/src/test/java/ExampleTest.java | 2 +- jacoco-maven-plugin.test/it/it-merge-passes/pom.xml | 2 +- jacoco-maven-plugin.test/it/it-merge-passes/verify.bsh | 2 +- .../it/it-multi-module/child-jar-without-sources/pom.xml | 2 +- jacoco-maven-plugin.test/it/it-multi-module/child/pom.xml | 2 +- .../it/it-multi-module/child/src/main/java/Example.java | 2 +- .../child/src/main/java/somepackage/Example.java | 2 +- .../it/it-multi-module/child/src/test/java/ExampleTest.java | 2 +- jacoco-maven-plugin.test/it/it-multi-module/pom.xml | 2 +- .../it/it-multi-module/skip-child/pom.xml | 2 +- .../it/it-multi-module/skip-child/src/test/ExampleTest.java | 2 +- jacoco-maven-plugin.test/it/it-multi-module/verify.bsh | 2 +- jacoco-maven-plugin.test/it/it-multiple-executions/pom.xml | 2 +- .../it/it-multiple-executions/src/main/java/Example.java | 2 +- .../it-multiple-executions/src/test/java/ExampleTest.java | 2 +- .../it/it-multiple-executions/verify.bsh | 2 +- .../child-without-main-classes/pom.xml | 2 +- .../src/test/java/ExampleTest.java | 2 +- .../it/it-offline-instrumentation/child/pom.xml | 2 +- .../child/src/main/java/DoNotInstrument.java | 2 +- .../child/src/main/java/Example.java | 2 +- .../child/src/test/java/ExampleTest.java | 2 +- .../it/it-offline-instrumentation/pom.xml | 2 +- .../it/it-offline-instrumentation/verify.bsh | 2 +- .../it/it-prepend-property-skip/pom.xml | 2 +- .../it-prepend-property-skip/src/test/java/ExampleTest.java | 2 +- jacoco-maven-plugin.test/it/it-prepend-property/pom.xml | 2 +- jacoco-maven-plugin.test/it/it-prepend-property/verify.bsh | 2 +- .../it/it-report-aggregate-customization/child1/pom.xml | 2 +- .../child1/src/main/java/package1/Example1.java | 2 +- .../child1/src/test/java/package1/Example1Test.java | 2 +- .../it/it-report-aggregate-customization/child2/pom.xml | 2 +- .../child2/src/main/java/package2/Example2.java | 2 +- .../child2/src/test/java/package2/Example2Test.java | 2 +- .../it/it-report-aggregate-customization/pom.xml | 2 +- .../it/it-report-aggregate-customization/report/pom.xml | 2 +- .../it/it-report-aggregate-customization/verify.bsh | 2 +- .../it/it-report-aggregate/child1-test/pom.xml | 2 +- .../child1-test/src/test/java/package1/Example1bTest.java | 2 +- .../it/it-report-aggregate/child1/pom.xml | 2 +- .../child1/src/main/java/package1/Example1a.java | 2 +- .../child1/src/main/java/package1/Example1b.java | 2 +- .../child1/src/test/java/package1/Example1aTest.java | 2 +- .../it/it-report-aggregate/child2/pom.xml | 2 +- .../child2/src/main/java/package2/Example2.java | 2 +- .../child2/src/test/java/package2/Example2Test.java | 2 +- .../it/it-report-aggregate/child2v2/pom.xml | 2 +- .../child2v2/src/main/java/package2/Example2.java | 2 +- .../child2v2/src/test/java/package2/Example2Test.java | 2 +- jacoco-maven-plugin.test/it/it-report-aggregate/pom.xml | 2 +- .../it/it-report-aggregate/report/pom.xml | 2 +- .../report/src/test/java/packagereport/ReportTest.java | 2 +- jacoco-maven-plugin.test/it/it-report-aggregate/verify.bsh | 2 +- jacoco-maven-plugin.test/it/it-report-nomatch/pom.xml | 2 +- .../it/it-report-nomatch/src/main/java/Example.java | 2 +- jacoco-maven-plugin.test/it/it-report-nomatch/verify.bsh | 2 +- .../it/it-report-select-formats/pom.xml | 2 +- .../it/it-report-select-formats/src/main/java/Example.java | 2 +- .../it-report-select-formats/src/test/java/ExampleTest.java | 2 +- .../it/it-report-select-formats/verify.bsh | 2 +- .../it/it-report-unreadable-dump/pom.xml | 2 +- .../it/it-report-unreadable-dump/verify.bsh | 2 +- jacoco-maven-plugin.test/it/it-report-without-debug/pom.xml | 2 +- .../it/it-report-without-debug/src/main/java/Example.java | 2 +- .../it-report-without-debug/src/test/java/ExampleTest.java | 2 +- .../it/it-report-without-debug/verify.bsh | 2 +- jacoco-maven-plugin.test/it/it-report-without-dump/pom.xml | 2 +- .../it/it-report-without-dump/verify.bsh | 2 +- jacoco-maven-plugin.test/it/it-site-failsafe/pom.xml | 2 +- .../it/it-site-failsafe/src/main/java/Example.java | 2 +- .../it/it-site-failsafe/src/test/java/ExampleIT.java | 2 +- .../it/it-site-failsafe/src/test/java/ExampleTest.java | 2 +- jacoco-maven-plugin.test/it/it-site-failsafe/verify.bsh | 2 +- jacoco-maven-plugin.test/it/it-site/pom.xml | 2 +- .../it/it-site/src/main/java/Example.java | 2 +- .../it/it-site/src/test/java/ExampleTest.java | 2 +- jacoco-maven-plugin.test/it/it-site/verify.bsh | 2 +- jacoco-maven-plugin.test/it/settings.xml | 2 +- jacoco-maven-plugin.test/it/setup-parent/pom.xml | 2 +- jacoco-maven-plugin.test/pom.xml | 2 +- .../META-INF/m2e/lifecycle-mapping-metadata.xml | 2 +- jacoco-maven-plugin/pom.xml | 2 +- .../src/org/jacoco/maven/AbstractAgentMojo.java | 2 +- .../src/org/jacoco/maven/AbstractJacocoMojo.java | 2 +- .../src/org/jacoco/maven/AbstractReportMojo.java | 2 +- jacoco-maven-plugin/src/org/jacoco/maven/AgentITMojo.java | 2 +- jacoco-maven-plugin/src/org/jacoco/maven/AgentMojo.java | 2 +- jacoco-maven-plugin/src/org/jacoco/maven/CheckMojo.java | 2 +- jacoco-maven-plugin/src/org/jacoco/maven/DumpMojo.java | 2 +- jacoco-maven-plugin/src/org/jacoco/maven/FileFilter.java | 2 +- .../src/org/jacoco/maven/InstrumentMojo.java | 2 +- jacoco-maven-plugin/src/org/jacoco/maven/MergeMojo.java | 2 +- .../src/org/jacoco/maven/ReportAggregateMojo.java | 2 +- jacoco-maven-plugin/src/org/jacoco/maven/ReportFormat.java | 2 +- jacoco-maven-plugin/src/org/jacoco/maven/ReportITMojo.java | 2 +- jacoco-maven-plugin/src/org/jacoco/maven/ReportMojo.java | 2 +- jacoco-maven-plugin/src/org/jacoco/maven/ReportSupport.java | 2 +- jacoco-maven-plugin/src/org/jacoco/maven/RestoreMojo.java | 2 +- .../src/org/jacoco/maven/RuleConfiguration.java | 2 +- jacoco/assembly.xml | 2 +- jacoco/pom.xml | 2 +- org.jacoco.agent.rt.test/pom.xml | 2 +- .../src/org/jacoco/agent/rt/internal/AgentTest.java | 2 +- .../org/jacoco/agent/rt/internal/ClassFileDumperTest.java | 2 +- .../src/org/jacoco/agent/rt/internal/ConfigLoaderTest.java | 2 +- .../jacoco/agent/rt/internal/CoverageTransformerTest.java | 2 +- .../src/org/jacoco/agent/rt/internal/ExceptionRecorder.java | 2 +- .../jacoco/agent/rt/internal/output/ExecutorTestBase.java | 2 +- .../org/jacoco/agent/rt/internal/output/FileOutputTest.java | 2 +- .../jacoco/agent/rt/internal/output/MockServerSocket.java | 2 +- .../agent/rt/internal/output/MockServerSocketTest.java | 2 +- .../agent/rt/internal/output/MockSocketConnection.java | 2 +- .../agent/rt/internal/output/MockSocketConnectionTest.java | 2 +- .../agent/rt/internal/output/TcpClientOutputTest.java | 2 +- .../jacoco/agent/rt/internal/output/TcpConnectionTest.java | 2 +- .../agent/rt/internal/output/TcpServerOutputTest.java | 2 +- org.jacoco.agent.rt/pom.xml | 2 +- org.jacoco.agent.rt/src/com/vladium/emma/rt/RT.java | 2 +- .../src/com/vladium/emma/rt/package-info.java | 2 +- org.jacoco.agent.rt/src/org/jacoco/agent/rt/IAgent.java | 2 +- org.jacoco.agent.rt/src/org/jacoco/agent/rt/RT.java | 2 +- .../src/org/jacoco/agent/rt/internal/Agent.java | 2 +- .../src/org/jacoco/agent/rt/internal/ClassFileDumper.java | 2 +- .../src/org/jacoco/agent/rt/internal/ConfigLoader.java | 2 +- .../org/jacoco/agent/rt/internal/CoverageTransformer.java | 2 +- .../src/org/jacoco/agent/rt/internal/IExceptionLogger.java | 2 +- .../src/org/jacoco/agent/rt/internal/JmxRegistration.java | 2 +- .../src/org/jacoco/agent/rt/internal/Offline.java | 2 +- .../src/org/jacoco/agent/rt/internal/PreMain.java | 2 +- .../src/org/jacoco/agent/rt/internal/output/FileOutput.java | 2 +- .../org/jacoco/agent/rt/internal/output/IAgentOutput.java | 2 +- .../src/org/jacoco/agent/rt/internal/output/NoneOutput.java | 2 +- .../jacoco/agent/rt/internal/output/TcpClientOutput.java | 2 +- .../org/jacoco/agent/rt/internal/output/TcpConnection.java | 2 +- .../jacoco/agent/rt/internal/output/TcpServerOutput.java | 2 +- .../src/org/jacoco/agent/rt/package-info.java | 2 +- org.jacoco.agent.test/pom.xml | 2 +- .../src/org/jacoco/agent/AgentJarTest.java | 2 +- org.jacoco.agent/pom.xml | 2 +- org.jacoco.agent/src/org/jacoco/agent/AgentJar.java | 2 +- org.jacoco.agent/src/org/jacoco/agent/package-info.java | 2 +- org.jacoco.ant.test/pom.xml | 2 +- org.jacoco.ant.test/src/TestTargetInDefault.java | 2 +- org.jacoco.ant.test/src/org/jacoco/ant/AgentTaskTest.java | 2 +- org.jacoco.ant.test/src/org/jacoco/ant/AgentTaskTest.xml | 2 +- .../src/org/jacoco/ant/AntFilesLocatorTest.java | 2 +- .../src/org/jacoco/ant/AntResourcesLocatorTest.java | 2 +- .../src/org/jacoco/ant/CoverageTaskTest.java | 2 +- org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.xml | 2 +- org.jacoco.ant.test/src/org/jacoco/ant/CreateExecFiles.java | 2 +- .../src/org/jacoco/ant/DumpExecClassNames.java | 2 +- org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskTest.java | 2 +- org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskTest.xml | 2 +- .../src/org/jacoco/ant/DumpTaskWithServerTest.java | 2 +- .../src/org/jacoco/ant/DumpTaskWithServerTest.xml | 2 +- .../src/org/jacoco/ant/InstrumentTaskTest.java | 2 +- .../src/org/jacoco/ant/InstrumentTaskTest.xml | 2 +- org.jacoco.ant.test/src/org/jacoco/ant/MergeTaskTest.java | 2 +- org.jacoco.ant.test/src/org/jacoco/ant/MergeTaskTest.xml | 2 +- .../src/org/jacoco/ant/RemoveDebugInfos.java | 2 +- .../src/org/jacoco/ant/ReportTaskLocaleTest.java | 2 +- org.jacoco.ant.test/src/org/jacoco/ant/ReportTaskTest.java | 2 +- org.jacoco.ant.test/src/org/jacoco/ant/ReportTaskTest.xml | 2 +- org.jacoco.ant.test/src/org/jacoco/ant/TestTarget.java | 2 +- org.jacoco.ant/pom.xml | 2 +- org.jacoco.ant/src/org/jacoco/ant/AbstractCoverageTask.java | 2 +- org.jacoco.ant/src/org/jacoco/ant/AgentTask.java | 2 +- org.jacoco.ant/src/org/jacoco/ant/AntFilesLocator.java | 2 +- org.jacoco.ant/src/org/jacoco/ant/AntResourcesLocator.java | 2 +- org.jacoco.ant/src/org/jacoco/ant/CoverageTask.java | 2 +- org.jacoco.ant/src/org/jacoco/ant/DumpTask.java | 2 +- org.jacoco.ant/src/org/jacoco/ant/InstrumentTask.java | 2 +- org.jacoco.ant/src/org/jacoco/ant/MergeTask.java | 2 +- org.jacoco.ant/src/org/jacoco/ant/ReportTask.java | 2 +- org.jacoco.ant/src/org/jacoco/ant/antlib.xml | 2 +- org.jacoco.build/pom.xml | 6 +++--- org.jacoco.cli.test/pom.xml | 2 +- .../src/org/jacoco/cli/internal/CommandTestBase.java | 2 +- .../src/org/jacoco/cli/internal/MainTest.java | 2 +- .../src/org/jacoco/cli/internal/XmlDocumentationTest.java | 2 +- .../src/org/jacoco/cli/internal/commands/ClassInfoTest.java | 2 +- .../src/org/jacoco/cli/internal/commands/DumpTest.java | 2 +- .../src/org/jacoco/cli/internal/commands/ExecInfoTest.java | 2 +- .../org/jacoco/cli/internal/commands/InstrumentTest.java | 2 +- .../src/org/jacoco/cli/internal/commands/MergeTest.java | 2 +- .../src/org/jacoco/cli/internal/commands/ReportTest.java | 2 +- .../src/org/jacoco/cli/internal/commands/VersionTest.java | 2 +- org.jacoco.cli/pom.xml | 2 +- org.jacoco.cli/src/org/jacoco/cli/internal/Command.java | 2 +- .../src/org/jacoco/cli/internal/CommandHandler.java | 2 +- .../src/org/jacoco/cli/internal/CommandParser.java | 2 +- org.jacoco.cli/src/org/jacoco/cli/internal/Main.java | 2 +- .../src/org/jacoco/cli/internal/XmlDocumentation.java | 2 +- .../src/org/jacoco/cli/internal/commands/AllCommands.java | 2 +- .../src/org/jacoco/cli/internal/commands/ClassInfo.java | 2 +- .../src/org/jacoco/cli/internal/commands/Dump.java | 2 +- .../src/org/jacoco/cli/internal/commands/ExecInfo.java | 2 +- .../src/org/jacoco/cli/internal/commands/Instrument.java | 2 +- .../src/org/jacoco/cli/internal/commands/Merge.java | 2 +- .../src/org/jacoco/cli/internal/commands/Report.java | 2 +- .../src/org/jacoco/cli/internal/commands/Version.java | 2 +- org.jacoco.core.test.validation.groovy/pom.xml | 2 +- .../test/validation/groovy/GroovyAutoCloneClassTest.java | 2 +- .../validation/groovy/GroovyAutoExternalizeClassTest.java | 2 +- .../test/validation/groovy/GroovyBindableClassTest.java | 2 +- .../core/test/validation/groovy/GroovyBuilderClassTest.java | 2 +- .../test/validation/groovy/GroovyCanonicalClassTest.java | 2 +- .../test/validation/groovy/GroovyDelegateClassTest.java | 2 +- .../test/validation/groovy/GroovyImmutableClassTest.java | 2 +- .../validation/groovy/GroovyIndexPropertyClassTest.java | 2 +- .../test/validation/groovy/GroovySortableClassTest.java | 2 +- .../test/validation/groovy/GroovyVetoableClassTest.java | 2 +- .../groovy/targets/GroovyAutoCloneClassTarget.groovy | 2 +- .../groovy/targets/GroovyAutoExternalizeClassTarget.groovy | 2 +- .../groovy/targets/GroovyBindableClassTarget.groovy | 2 +- .../groovy/targets/GroovyBuilderClassTarget.groovy | 2 +- .../groovy/targets/GroovyCanonicalClassTarget.groovy | 2 +- .../groovy/targets/GroovyDelegateClassTarget.groovy | 2 +- .../groovy/targets/GroovyImmutableClassTarget.groovy | 2 +- .../groovy/targets/GroovyIndexPropertyClassTarget.groovy | 2 +- .../groovy/targets/GroovySortableClassTarget.groovy | 2 +- .../groovy/targets/GroovyVetoableClassTarget.groovy | 2 +- org.jacoco.core.test.validation.java14/pom.xml | 2 +- .../core/test/validation/java14/SwitchExpressionsTest.java | 2 +- .../validation/java14/targets/SwitchExpressionsTarget.java | 2 +- org.jacoco.core.test.validation.java16/pom.xml | 2 +- .../jacoco/core/test/validation/java16/InstanceofTest.java | 2 +- .../org/jacoco/core/test/validation/java16/RecordsTest.java | 2 +- .../test/validation/java16/targets/InstanceofTarget.java | 2 +- .../core/test/validation/java16/targets/RecordsTarget.java | 2 +- org.jacoco.core.test.validation.java20/pom.xml | 2 +- .../test/validation/java20/SwitchPatternMatchingTest.java | 2 +- .../java20/targets/SwitchPatternMatchingTarget.java | 2 +- org.jacoco.core.test.validation.java5/pom.xml | 2 +- .../core/test/validation/java5/AnnotationGeneratedTest.java | 2 +- .../test/validation/java5/AnnotationInitializerTest.java | 2 +- .../org/jacoco/core/test/validation/java5/AssertTest.java | 2 +- .../core/test/validation/java5/BadCycleClassTest.java | 2 +- .../core/test/validation/java5/BooleanExpressionsTest.java | 2 +- .../core/test/validation/java5/ClassInitializerTest.java | 2 +- .../jacoco/core/test/validation/java5/ConstructorsTest.java | 2 +- .../java5/ControlStructureBeforeSuperConstructorTest.java | 2 +- .../core/test/validation/java5/ControlStructuresTest.java | 2 +- .../test/validation/java5/CyclomaticComplexityTest.java | 2 +- .../core/test/validation/java5/EnumConstructorTest.java | 2 +- .../core/test/validation/java5/EnumImplicitMethodsTest.java | 2 +- .../jacoco/core/test/validation/java5/EnumSwitchTest.java | 2 +- .../jacoco/core/test/validation/java5/ExceptionsTest.java | 2 +- .../test/validation/java5/ExplicitInitialFrameTest.java | 2 +- .../java5/FieldInitializationInTwoConstructorsTest.java | 2 +- .../org/jacoco/core/test/validation/java5/FinallyTest.java | 2 +- .../org/jacoco/core/test/validation/java5/FramesTest.java | 2 +- .../validation/java5/ImplicitFieldInitializationTest.java | 2 +- .../validation/java5/InterfaceClassInitializerTest.java | 2 +- .../core/test/validation/java5/StructuredLockingTest.java | 2 +- .../jacoco/core/test/validation/java5/SynchronizedTest.java | 2 +- .../jacoco/core/test/validation/java5/SyntheticTest.java | 2 +- .../validation/java5/targets/AnnotationGeneratedTarget.java | 2 +- .../java5/targets/AnnotationInitializerTarget.java | 2 +- .../core/test/validation/java5/targets/AssertTarget.java | 2 +- .../test/validation/java5/targets/BadCycleClassTarget.java | 2 +- .../validation/java5/targets/BooleanExpressionsTarget.java | 2 +- .../validation/java5/targets/ClassInitializerTarget.java | 2 +- .../test/validation/java5/targets/ConstructorsTarget.java | 2 +- .../ControlStructureBeforeSuperConstructorTarget.java | 2 +- .../validation/java5/targets/ControlStructuresTarget.java | 2 +- .../validation/java5/targets/EnumConstructorTarget.java | 2 +- .../validation/java5/targets/EnumImplicitMethodsTarget.java | 2 +- .../test/validation/java5/targets/EnumSwitchTarget.java | 2 +- .../test/validation/java5/targets/ExceptionsTarget.java | 2 +- .../java5/targets/ExplicitInitialFrameTarget.java | 2 +- .../targets/FieldInitializationInTwoConstructorsTarget.java | 2 +- .../core/test/validation/java5/targets/FinallyTarget.java | 2 +- .../java5/targets/ImplicitFieldInitializationTarget.java | 2 +- .../java5/targets/InterfaceClassInitializerTarget.java | 2 +- .../validation/java5/targets/StructuredLockingTarget.java | 2 +- .../test/validation/java5/targets/SynchronizedTarget.java | 2 +- .../core/test/validation/java5/targets/SyntheticTarget.java | 2 +- org.jacoco.core.test.validation.java7/pom.xml | 2 +- .../jacoco/core/test/validation/java7/StringSwitchTest.java | 2 +- .../core/test/validation/java7/TryWithResourcesTest.java | 2 +- .../test/validation/java7/targets/StringSwitchTarget.java | 2 +- .../validation/java7/targets/TryWithResourcesTarget.java | 2 +- org.jacoco.core.test.validation.java8/pom.xml | 2 +- .../validation/java8/AnnotationOnLocalVariableTest.java | 2 +- .../core/test/validation/java8/BadCycleInterfaceTest.java | 2 +- .../test/validation/java8/BootstrapMethodReferenceTest.java | 2 +- .../test/validation/java8/InterfaceDefaultMethodsTest.java | 2 +- .../validation/java8/InterfaceOnlyDefaultMethodsTest.java | 2 +- .../core/test/validation/java8/LambdaExpressionsTest.java | 2 +- .../core/test/validation/java8/LambdaInInterfaceTest.java | 2 +- .../java8/targets/AnnotationOnLocalVariableTarget.java | 2 +- .../validation/java8/targets/BadCycleInterfaceTarget.java | 2 +- .../java8/targets/InterfaceDefaultMethodsTarget.java | 2 +- .../java8/targets/InterfaceOnlyDefaultMethodsTarget.java | 2 +- .../validation/java8/targets/LambdaExpressionsTarget.java | 2 +- .../validation/java8/targets/LambdaInInterfaceTarget.java | 2 +- org.jacoco.core.test.validation.kotlin/pom.xml | 2 +- .../test/validation/kotlin/KotlinCallableReferenceTest.java | 2 +- .../test/validation/kotlin/KotlinControlStructuresTest.java | 2 +- .../core/test/validation/kotlin/KotlinCoroutineTest.java | 2 +- .../core/test/validation/kotlin/KotlinDataClassTest.java | 2 +- .../test/validation/kotlin/KotlinDefaultArgumentsTest.java | 2 +- .../test/validation/kotlin/KotlinDefaultMethodsTest.java | 2 +- .../core/test/validation/kotlin/KotlinDelegatesTest.java | 2 +- .../test/validation/kotlin/KotlinElvisOperatorTest.java | 2 +- .../core/test/validation/kotlin/KotlinInlineTest.java | 2 +- .../test/validation/kotlin/KotlinLambdaExpressionsTest.java | 2 +- .../core/test/validation/kotlin/KotlinLateinitTest.java | 2 +- .../test/validation/kotlin/KotlinNotNullOperatorTest.java | 2 +- .../test/validation/kotlin/KotlinSafeCallOperatorTest.java | 2 +- .../core/test/validation/kotlin/KotlinSafeCastTest.java | 2 +- .../test/validation/kotlin/KotlinTopLevelFunctionTest.java | 2 +- .../validation/kotlin/KotlinUnsafeCastOperatorTest.java | 2 +- .../test/validation/kotlin/KotlinWhenExpressionTest.java | 2 +- .../kotlin/targets/KotlinCallableReferenceTarget.kt | 2 +- .../kotlin/targets/KotlinControlStructuresTarget.kt | 2 +- .../test/validation/kotlin/targets/KotlinCoroutineTarget.kt | 2 +- .../test/validation/kotlin/targets/KotlinDataClassTarget.kt | 2 +- .../kotlin/targets/KotlinDefaultArgumentsTarget.kt | 2 +- .../validation/kotlin/targets/KotlinDefaultMethodsTarget.kt | 2 +- .../test/validation/kotlin/targets/KotlinDelegatesTarget.kt | 2 +- .../validation/kotlin/targets/KotlinElvisOperatorTarget.kt | 2 +- .../test/validation/kotlin/targets/KotlinInlineTarget.kt | 2 +- .../kotlin/targets/KotlinLambdaExpressionsTarget.kt | 2 +- .../test/validation/kotlin/targets/KotlinLateinitTarget.kt | 2 +- .../kotlin/targets/KotlinNotNullOperatorTarget.kt | 2 +- .../kotlin/targets/KotlinSafeCallOperatorTarget.kt | 2 +- .../test/validation/kotlin/targets/KotlinSafeCastTarget.kt | 2 +- .../kotlin/targets/KotlinTopLevelFunctionTarget.kt | 2 +- .../kotlin/targets/KotlinUnsafeCastOperatorTarget.kt | 2 +- .../validation/kotlin/targets/KotlinWhenExpressionTarget.kt | 2 +- org.jacoco.core.test.validation.scala/pom.xml | 2 +- .../test/validation/scala/ScalaAnonymousFunctionTest.java | 2 +- .../test/validation/scala/ScalaSingletonObjectTest.java | 2 +- .../core/test/validation/scala/ScalaSynchronizedTest.java | 2 +- .../scala/targets/ScalaAnonymousFunctionTarget.scala | 2 +- .../scala/targets/ScalaSingletonObjectTarget.scala | 2 +- .../validation/scala/targets/ScalaSynchronizedTarget.scala | 2 +- org.jacoco.core.test.validation/pom.xml | 2 +- org.jacoco.core.test/pom.xml | 2 +- org.jacoco.core.test/src/org/jacoco/core/JaCoCoTest.java | 2 +- .../src/org/jacoco/core/analysis/AnalyzerTest.java | 2 +- .../src/org/jacoco/core/analysis/CounterComparatorTest.java | 2 +- .../src/org/jacoco/core/analysis/CoverageBuilderTest.java | 2 +- .../src/org/jacoco/core/analysis/CoverageNodeImplTest.java | 2 +- .../src/org/jacoco/core/analysis/NodeComparatorTest.java | 2 +- .../org/jacoco/core/data/ExecutionDataReaderWriterTest.java | 2 +- .../src/org/jacoco/core/data/ExecutionDataStoreTest.java | 2 +- .../src/org/jacoco/core/data/ExecutionDataTest.java | 2 +- .../core/data/IncompatibleExecDataVersionExceptionTest.java | 2 +- .../src/org/jacoco/core/data/SessionInfoStoreTest.java | 2 +- .../src/org/jacoco/core/data/SessionInfoTest.java | 2 +- .../src/org/jacoco/core/instr/ClassFileVersionsTest.java | 2 +- .../src/org/jacoco/core/instr/InstrumenterTest.java | 2 +- .../src/org/jacoco/core/instr/MethodRecorder.java | 2 +- .../src/org/jacoco/core/instr/ResizeInstructionsTest.java | 2 +- .../org/jacoco/core/internal/ContentTypeDetectorTest.java | 2 +- .../src/org/jacoco/core/internal/Pack200StreamsTest.java | 2 +- .../core/internal/analysis/BundleCoverageImplTest.java | 2 +- .../jacoco/core/internal/analysis/ClassAnalyzerTest.java | 2 +- .../core/internal/analysis/ClassCoverageImplTest.java | 2 +- .../org/jacoco/core/internal/analysis/CounterImplTest.java | 2 +- .../org/jacoco/core/internal/analysis/InstructionTest.java | 2 +- .../core/internal/analysis/InstructionsBuilderTest.java | 2 +- .../src/org/jacoco/core/internal/analysis/LineImplTest.java | 2 +- .../jacoco/core/internal/analysis/MethodAnalyzerTest.java | 2 +- .../internal/analysis/MethodCoverageCalculatorTest.java | 2 +- .../core/internal/analysis/MethodCoverageImplTest.java | 2 +- .../jacoco/core/internal/analysis/PackageCoverageTest.java | 2 +- .../core/internal/analysis/SourceFileCoverageImplTest.java | 2 +- .../jacoco/core/internal/analysis/SourceNodeImplTest.java | 2 +- .../org/jacoco/core/internal/analysis/StringPoolTest.java | 2 +- .../core/internal/analysis/filter/AbstractMatcherTest.java | 2 +- .../analysis/filter/AnnotationGeneratedFilterTest.java | 2 +- .../core/internal/analysis/filter/AssertFilterTest.java | 2 +- .../core/internal/analysis/filter/BridgeFilterTest.java | 2 +- .../analysis/filter/EnumEmptyConstructorFilterTest.java | 2 +- .../core/internal/analysis/filter/EnumFilterTest.java | 2 +- .../core/internal/analysis/filter/FilterContextMock.java | 2 +- .../core/internal/analysis/filter/FilterTestBase.java | 2 +- .../core/internal/analysis/filter/FinallyFilterTest.java | 2 +- .../internal/analysis/filter/KotlinCoroutineFilterTest.java | 2 +- .../analysis/filter/KotlinDefaultArgumentsFilterTest.java | 2 +- .../analysis/filter/KotlinDefaultMethodsFilterTest.java | 2 +- .../internal/analysis/filter/KotlinGeneratedFilterTest.java | 2 +- .../internal/analysis/filter/KotlinInlineFilterTest.java | 2 +- .../internal/analysis/filter/KotlinLateinitFilterTest.java | 2 +- .../analysis/filter/KotlinNotNullOperatorFilterTest.java | 2 +- .../analysis/filter/KotlinUnsafeCastOperatorFilterTest.java | 2 +- .../core/internal/analysis/filter/KotlinWhenFilterTest.java | 2 +- .../analysis/filter/KotlinWhenStringFilterTest.java | 2 +- .../filter/PrivateEmptyNoArgConstructorFilterTest.java | 2 +- .../core/internal/analysis/filter/RecordsFilterTest.java | 2 +- .../internal/analysis/filter/StringSwitchFilterTest.java | 2 +- .../analysis/filter/StringSwitchJavacFilterTest.java | 2 +- .../internal/analysis/filter/SynchronizedFilterTest.java | 2 +- .../core/internal/analysis/filter/SyntheticFilterTest.java | 2 +- .../analysis/filter/TryWithResourcesEcjFilterTest.java | 2 +- .../analysis/filter/TryWithResourcesJavac11FilterTest.java | 2 +- .../analysis/filter/TryWithResourcesJavacFilterTest.java | 2 +- .../src/org/jacoco/core/internal/data/CRC64Test.java | 2 +- .../core/internal/data/CompactDataInputOutputTest.java | 2 +- .../jacoco/core/internal/flow/ClassProbesAdapterTest.java | 2 +- .../org/jacoco/core/internal/flow/FrameSnapshotTest.java | 2 +- .../jacoco/core/internal/flow/LabelFlowAnalyzerTest.java | 2 +- .../src/org/jacoco/core/internal/flow/LabelInfoTest.java | 2 +- .../jacoco/core/internal/flow/MethodProbesAdapterTest.java | 2 +- .../org/jacoco/core/internal/flow/MethodSanitizerTest.java | 2 +- .../jacoco/core/internal/instr/ClassInstrumenterTest.java | 2 +- .../core/internal/instr/CondyProbeArrayStrategyTest.java | 2 +- .../core/internal/instr/DuplicateFrameEliminatorTest.java | 2 +- .../org/jacoco/core/internal/instr/InstrSupportTest.java | 2 +- .../jacoco/core/internal/instr/MethodInstrumenterTest.java | 2 +- .../core/internal/instr/NoneProbeArrayStrategyTest.java | 2 +- .../core/internal/instr/ProbeArrayStrategyFactoryTest.java | 2 +- .../org/jacoco/core/internal/instr/ProbeCounterTest.java | 2 +- .../org/jacoco/core/internal/instr/ProbeInserterTest.java | 2 +- .../jacoco/core/internal/instr/SignatureRemoverTest.java | 2 +- .../src/org/jacoco/core/runtime/AgentOptionsTest.java | 2 +- .../src/org/jacoco/core/runtime/CommandLineSupportTest.java | 2 +- .../org/jacoco/core/runtime/InjectedClassRuntimeTest.java | 2 +- .../src/org/jacoco/core/runtime/LoggerRuntimeTest.java | 2 +- .../jacoco/core/runtime/ModifiedSystemClassRuntimeTest.java | 2 +- .../runtime/OfflineInstrumentationAccessGeneratorTest.java | 2 +- .../jacoco/core/runtime/RemoteControlReaderWriterTest.java | 2 +- .../src/org/jacoco/core/runtime/RuntimeDataTest.java | 2 +- .../src/org/jacoco/core/runtime/RuntimeTestBase.java | 2 +- .../jacoco/core/runtime/SystemPropertiesRuntimeTest.java | 2 +- .../src/org/jacoco/core/runtime/TestStorage.java | 2 +- .../src/org/jacoco/core/runtime/WildcardMatcherTest.java | 2 +- .../src/org/jacoco/core/test/InstrumentingLoader.java | 2 +- .../src/org/jacoco/core/test/InstrumentingLoaderTest.java | 2 +- .../src/org/jacoco/core/test/TargetLoader.java | 2 +- .../src/org/jacoco/core/test/perf/AnalysisTimeScenario.java | 2 +- .../core/test/perf/ExecuteInstrumentedCodeScenario.java | 2 +- .../src/org/jacoco/core/test/perf/IPerfOutput.java | 2 +- .../src/org/jacoco/core/test/perf/IPerfScenario.java | 2 +- .../jacoco/core/test/perf/InstrumentationSizeSzenario.java | 2 +- .../jacoco/core/test/perf/InstrumentationTimeScenario.java | 2 +- .../src/org/jacoco/core/test/perf/PerfOutputWriter.java | 2 +- .../src/org/jacoco/core/test/perf/PerformanceSuite.java | 2 +- .../src/org/jacoco/core/test/perf/TimedScenario.java | 2 +- .../src/org/jacoco/core/test/perf/targets/Target01.java | 2 +- .../src/org/jacoco/core/test/perf/targets/Target02.java | 2 +- .../src/org/jacoco/core/test/perf/targets/Target03.java | 2 +- .../src/org/jacoco/core/test/validation/Compiler.java | 2 +- .../src/org/jacoco/core/test/validation/JavaVersion.java | 2 +- .../org/jacoco/core/test/validation/JavaVersionTest.java | 2 +- .../src/org/jacoco/core/test/validation/Source.java | 2 +- .../src/org/jacoco/core/test/validation/SourceTest.java | 2 +- .../org/jacoco/core/test/validation/StatementExecutor.java | 2 +- .../jacoco/core/test/validation/StatementExecutorTest.java | 2 +- .../org/jacoco/core/test/validation/StatementParser.java | 2 +- .../jacoco/core/test/validation/StatementParserTest.java | 2 +- .../org/jacoco/core/test/validation/ValidationTestBase.java | 2 +- .../src/org/jacoco/core/test/validation/targets/Stubs.java | 2 +- .../src/org/jacoco/core/tools/ExecDumpClientTest.java | 2 +- .../src/org/jacoco/core/tools/ExecFileLoaderTest.java | 2 +- org.jacoco.core/pom.xml | 2 +- org.jacoco.core/src/org/jacoco/core/JaCoCo.java | 2 +- org.jacoco.core/src/org/jacoco/core/analysis/Analyzer.java | 2 +- .../src/org/jacoco/core/analysis/CounterComparator.java | 2 +- .../src/org/jacoco/core/analysis/CoverageBuilder.java | 2 +- .../src/org/jacoco/core/analysis/CoverageNodeImpl.java | 2 +- .../src/org/jacoco/core/analysis/IBundleCoverage.java | 2 +- .../src/org/jacoco/core/analysis/IClassCoverage.java | 2 +- org.jacoco.core/src/org/jacoco/core/analysis/ICounter.java | 2 +- .../src/org/jacoco/core/analysis/ICoverageNode.java | 2 +- .../src/org/jacoco/core/analysis/ICoverageVisitor.java | 2 +- org.jacoco.core/src/org/jacoco/core/analysis/ILine.java | 2 +- .../src/org/jacoco/core/analysis/IMethodCoverage.java | 2 +- .../src/org/jacoco/core/analysis/IPackageCoverage.java | 2 +- .../src/org/jacoco/core/analysis/ISourceFileCoverage.java | 2 +- .../src/org/jacoco/core/analysis/ISourceNode.java | 2 +- .../src/org/jacoco/core/analysis/NodeComparator.java | 2 +- .../src/org/jacoco/core/analysis/package-info.java | 2 +- org.jacoco.core/src/org/jacoco/core/data/ExecutionData.java | 2 +- .../src/org/jacoco/core/data/ExecutionDataReader.java | 2 +- .../src/org/jacoco/core/data/ExecutionDataStore.java | 2 +- .../src/org/jacoco/core/data/ExecutionDataWriter.java | 2 +- .../src/org/jacoco/core/data/IExecutionDataVisitor.java | 2 +- .../src/org/jacoco/core/data/ISessionInfoVisitor.java | 2 +- .../core/data/IncompatibleExecDataVersionException.java | 2 +- org.jacoco.core/src/org/jacoco/core/data/SessionInfo.java | 2 +- .../src/org/jacoco/core/data/SessionInfoStore.java | 2 +- org.jacoco.core/src/org/jacoco/core/data/package-info.java | 2 +- org.jacoco.core/src/org/jacoco/core/instr/Instrumenter.java | 2 +- org.jacoco.core/src/org/jacoco/core/instr/package-info.java | 2 +- .../src/org/jacoco/core/internal/ContentTypeDetector.java | 2 +- .../src/org/jacoco/core/internal/InputStreams.java | 2 +- .../src/org/jacoco/core/internal/Pack200Streams.java | 2 +- .../jacoco/core/internal/analysis/BundleCoverageImpl.java | 2 +- .../org/jacoco/core/internal/analysis/ClassAnalyzer.java | 2 +- .../jacoco/core/internal/analysis/ClassCoverageImpl.java | 2 +- .../src/org/jacoco/core/internal/analysis/CounterImpl.java | 2 +- .../src/org/jacoco/core/internal/analysis/Instruction.java | 2 +- .../jacoco/core/internal/analysis/InstructionsBuilder.java | 2 +- .../src/org/jacoco/core/internal/analysis/LineImpl.java | 2 +- .../org/jacoco/core/internal/analysis/MethodAnalyzer.java | 2 +- .../core/internal/analysis/MethodCoverageCalculator.java | 2 +- .../jacoco/core/internal/analysis/MethodCoverageImpl.java | 2 +- .../jacoco/core/internal/analysis/PackageCoverageImpl.java | 2 +- .../core/internal/analysis/SourceFileCoverageImpl.java | 2 +- .../org/jacoco/core/internal/analysis/SourceNodeImpl.java | 2 +- .../src/org/jacoco/core/internal/analysis/StringPool.java | 2 +- .../core/internal/analysis/filter/AbstractMatcher.java | 2 +- .../internal/analysis/filter/AnnotationGeneratedFilter.java | 2 +- .../jacoco/core/internal/analysis/filter/AssertFilter.java | 2 +- .../jacoco/core/internal/analysis/filter/BridgeFilter.java | 2 +- .../analysis/filter/EnumEmptyConstructorFilter.java | 2 +- .../jacoco/core/internal/analysis/filter/EnumFilter.java | 2 +- .../org/jacoco/core/internal/analysis/filter/Filters.java | 2 +- .../jacoco/core/internal/analysis/filter/FinallyFilter.java | 2 +- .../org/jacoco/core/internal/analysis/filter/IFilter.java | 2 +- .../core/internal/analysis/filter/IFilterContext.java | 2 +- .../jacoco/core/internal/analysis/filter/IFilterOutput.java | 2 +- .../internal/analysis/filter/KotlinCoroutineFilter.java | 2 +- .../analysis/filter/KotlinDefaultArgumentsFilter.java | 2 +- .../analysis/filter/KotlinDefaultMethodsFilter.java | 2 +- .../internal/analysis/filter/KotlinGeneratedFilter.java | 2 +- .../core/internal/analysis/filter/KotlinInlineFilter.java | 2 +- .../core/internal/analysis/filter/KotlinLateinitFilter.java | 2 +- .../analysis/filter/KotlinNotNullOperatorFilter.java | 2 +- .../analysis/filter/KotlinUnsafeCastOperatorFilter.java | 2 +- .../core/internal/analysis/filter/KotlinWhenFilter.java | 2 +- .../internal/analysis/filter/KotlinWhenStringFilter.java | 2 +- .../analysis/filter/PrivateEmptyNoArgConstructorFilter.java | 2 +- .../jacoco/core/internal/analysis/filter/RecordsFilter.java | 2 +- .../core/internal/analysis/filter/StringSwitchFilter.java | 2 +- .../internal/analysis/filter/StringSwitchJavacFilter.java | 2 +- .../core/internal/analysis/filter/SynchronizedFilter.java | 2 +- .../core/internal/analysis/filter/SyntheticFilter.java | 2 +- .../internal/analysis/filter/TryWithResourcesEcjFilter.java | 2 +- .../analysis/filter/TryWithResourcesJavac11Filter.java | 2 +- .../analysis/filter/TryWithResourcesJavacFilter.java | 2 +- .../src/org/jacoco/core/internal/data/CRC64.java | 2 +- .../src/org/jacoco/core/internal/data/CompactDataInput.java | 2 +- .../org/jacoco/core/internal/data/CompactDataOutput.java | 2 +- .../org/jacoco/core/internal/flow/ClassProbesAdapter.java | 2 +- .../org/jacoco/core/internal/flow/ClassProbesVisitor.java | 2 +- .../src/org/jacoco/core/internal/flow/FrameSnapshot.java | 2 +- .../src/org/jacoco/core/internal/flow/IFrame.java | 2 +- .../org/jacoco/core/internal/flow/IProbeIdGenerator.java | 2 +- .../org/jacoco/core/internal/flow/LabelFlowAnalyzer.java | 2 +- .../src/org/jacoco/core/internal/flow/LabelInfo.java | 2 +- .../org/jacoco/core/internal/flow/MethodProbesAdapter.java | 2 +- .../org/jacoco/core/internal/flow/MethodProbesVisitor.java | 2 +- .../src/org/jacoco/core/internal/flow/MethodSanitizer.java | 2 +- .../core/internal/instr/ClassFieldProbeArrayStrategy.java | 2 +- .../org/jacoco/core/internal/instr/ClassInstrumenter.java | 2 +- .../jacoco/core/internal/instr/CondyProbeArrayStrategy.java | 2 +- .../core/internal/instr/DuplicateFrameEliminator.java | 2 +- .../org/jacoco/core/internal/instr/IProbeArrayStrategy.java | 2 +- .../src/org/jacoco/core/internal/instr/IProbeInserter.java | 2 +- .../src/org/jacoco/core/internal/instr/InstrSupport.java | 2 +- .../internal/instr/InterfaceFieldProbeArrayStrategy.java | 2 +- .../jacoco/core/internal/instr/LocalProbeArrayStrategy.java | 2 +- .../org/jacoco/core/internal/instr/MethodInstrumenter.java | 2 +- .../jacoco/core/internal/instr/NoneProbeArrayStrategy.java | 2 +- .../core/internal/instr/ProbeArrayStrategyFactory.java | 2 +- .../src/org/jacoco/core/internal/instr/ProbeCounter.java | 2 +- .../src/org/jacoco/core/internal/instr/ProbeInserter.java | 2 +- .../org/jacoco/core/internal/instr/SignatureRemover.java | 2 +- org.jacoco.core/src/org/jacoco/core/package-info.java | 2 +- .../src/org/jacoco/core/runtime/AbstractRuntime.java | 2 +- .../src/org/jacoco/core/runtime/AgentOptions.java | 2 +- .../src/org/jacoco/core/runtime/CommandLineSupport.java | 2 +- .../core/runtime/IExecutionDataAccessorGenerator.java | 2 +- .../src/org/jacoco/core/runtime/IRemoteCommandVisitor.java | 2 +- org.jacoco.core/src/org/jacoco/core/runtime/IRuntime.java | 2 +- .../src/org/jacoco/core/runtime/InjectedClassRuntime.java | 2 +- .../src/org/jacoco/core/runtime/LoggerRuntime.java | 2 +- .../org/jacoco/core/runtime/ModifiedSystemClassRuntime.java | 2 +- .../core/runtime/OfflineInstrumentationAccessGenerator.java | 2 +- .../src/org/jacoco/core/runtime/RemoteControlReader.java | 2 +- .../src/org/jacoco/core/runtime/RemoteControlWriter.java | 2 +- .../src/org/jacoco/core/runtime/RuntimeData.java | 2 +- .../org/jacoco/core/runtime/SystemPropertiesRuntime.java | 2 +- .../src/org/jacoco/core/runtime/WildcardMatcher.java | 2 +- .../src/org/jacoco/core/runtime/package-info.java | 2 +- .../src/org/jacoco/core/tools/ExecDumpClient.java | 2 +- .../src/org/jacoco/core/tools/ExecFileLoader.java | 2 +- org.jacoco.core/src/org/jacoco/core/tools/package-info.java | 2 +- org.jacoco.doc/pom.xml | 2 +- org.jacoco.doc/xsl/cli.xsl | 2 +- org.jacoco.doc/xsl/maven-goal.xsl | 2 +- org.jacoco.examples.test/pom.xml | 2 +- .../src/org/jacoco/examples/ClassInfoTest.java | 2 +- .../src/org/jacoco/examples/ConsoleOutput.java | 2 +- .../src/org/jacoco/examples/CoreTutorialTest.java | 2 +- .../src/org/jacoco/examples/ExecDumpTest.java | 2 +- .../src/org/jacoco/examples/MBeanClientTest.java | 2 +- org.jacoco.examples.test/src/test/resources/verify-it.bsh | 2 +- .../src/test/resources/verify-offline.bsh | 2 +- org.jacoco.examples.test/src/test/resources/verify.bsh | 2 +- org.jacoco.examples/assembly.xml | 2 +- org.jacoco.examples/build/build-offline.xml | 2 +- org.jacoco.examples/build/build.xml | 2 +- org.jacoco.examples/build/pom-it.xml | 2 +- org.jacoco.examples/build/pom-offline.xml | 2 +- org.jacoco.examples/build/pom.xml | 2 +- .../src/main/java/org/jacoco/examples/expressions/Add.java | 2 +- .../main/java/org/jacoco/examples/expressions/Const.java | 2 +- .../src/main/java/org/jacoco/examples/expressions/Div.java | 2 +- .../java/org/jacoco/examples/expressions/IExpression.java | 2 +- .../src/main/java/org/jacoco/examples/expressions/Mul.java | 2 +- .../src/main/java/org/jacoco/examples/expressions/Sub.java | 2 +- .../java/org/jacoco/examples/parser/ExpressionParser.java | 2 +- .../src/main/java/org/jacoco/examples/parser/Main.java | 2 +- .../java/org/jacoco/examples/parser/ExpressionParserIT.java | 2 +- .../org/jacoco/examples/parser/ExpressionParserTest.java | 2 +- org.jacoco.examples/pom.xml | 2 +- org.jacoco.examples/src/org/jacoco/examples/ClassInfo.java | 2 +- .../src/org/jacoco/examples/CoreTutorial.java | 2 +- org.jacoco.examples/src/org/jacoco/examples/ExecDump.java | 2 +- .../src/org/jacoco/examples/ExecutionDataClient.java | 2 +- .../src/org/jacoco/examples/ExecutionDataServer.java | 2 +- .../src/org/jacoco/examples/MBeanClient.java | 2 +- .../src/org/jacoco/examples/ReportGenerator.java | 2 +- org.jacoco.report.test/pom.xml | 2 +- .../org/jacoco/report/DirectorySourceFileLocatorTest.java | 2 +- .../src/org/jacoco/report/FileMultiReportOutputTest.java | 2 +- .../org/jacoco/report/InputStreamSourceFileLocatorTest.java | 2 +- .../src/org/jacoco/report/JavaNamesTest.java | 2 +- .../src/org/jacoco/report/MemoryMultiReportOutput.java | 2 +- .../src/org/jacoco/report/MemoryOutput.java | 2 +- .../src/org/jacoco/report/MultiReportVisitorTest.java | 2 +- .../src/org/jacoco/report/MultiSourceFileLocatorTest.java | 2 +- .../src/org/jacoco/report/ReportStructureTestDriver.java | 2 +- .../src/org/jacoco/report/ZipMultiReportOutputTest.java | 2 +- .../src/org/jacoco/report/check/BundleCheckerTest.java | 2 +- .../src/org/jacoco/report/check/LimitTest.java | 2 +- .../src/org/jacoco/report/check/RuleTest.java | 2 +- .../src/org/jacoco/report/check/RulesCheckerTest.java | 2 +- .../src/org/jacoco/report/csv/CSVFormatterTest.java | 2 +- .../src/org/jacoco/report/csv/CSVGroupHandlerTest.java | 2 +- .../src/org/jacoco/report/csv/ClassRowWriterTest.java | 2 +- .../src/org/jacoco/report/csv/DelimitedWriterTest.java | 2 +- .../src/org/jacoco/report/html/HTMLFormatterTest.java | 2 +- .../org/jacoco/report/internal/NormalizedFileNamesTest.java | 2 +- .../org/jacoco/report/internal/ReportOutputFolderTest.java | 2 +- .../org/jacoco/report/internal/html/HTMLElementTest.java | 2 +- .../src/org/jacoco/report/internal/html/HTMLSupport.java | 2 +- .../src/org/jacoco/report/internal/html/LinkableStub.java | 2 +- .../jacoco/report/internal/html/page/BundlePageTest.java | 2 +- .../org/jacoco/report/internal/html/page/ClassPageTest.java | 2 +- .../jacoco/report/internal/html/page/MethodItemTest.java | 2 +- .../org/jacoco/report/internal/html/page/NodePageTest.java | 2 +- .../jacoco/report/internal/html/page/PackagePageTest.java | 2 +- .../report/internal/html/page/PackageSourcePageTest.java | 2 +- .../org/jacoco/report/internal/html/page/PageTestBase.java | 2 +- .../jacoco/report/internal/html/page/ReportPageTest.java | 2 +- .../jacoco/report/internal/html/page/SessionsPageTest.java | 2 +- .../report/internal/html/page/SourceFilePageTest.java | 2 +- .../report/internal/html/page/SourceHighlighterTest.java | 2 +- .../report/internal/html/resources/ResourcesTest.java | 2 +- .../jacoco/report/internal/html/resources/StylesTest.java | 2 +- .../jacoco/report/internal/html/table/BarColumnTest.java | 2 +- .../report/internal/html/table/CounterColumnTest.java | 2 +- .../jacoco/report/internal/html/table/LabelColumnTest.java | 2 +- .../report/internal/html/table/PercentageColumnTest.java | 2 +- .../jacoco/report/internal/html/table/SortIndexTest.java | 2 +- .../org/jacoco/report/internal/html/table/TableTest.java | 2 +- .../org/jacoco/report/internal/xml/LocalEntityResolver.java | 2 +- .../src/org/jacoco/report/internal/xml/XMLElementTest.java | 2 +- .../org/jacoco/report/internal/xml/XMLGroupVisitorTest.java | 2 +- .../src/org/jacoco/report/internal/xml/XMLSupport.java | 2 +- .../src/org/jacoco/report/xml/XMLFormatterTest.java | 2 +- org.jacoco.report/pom.xml | 2 +- .../src/org/jacoco/report/DirectorySourceFileLocator.java | 2 +- .../src/org/jacoco/report/FileMultiReportOutput.java | 2 +- org.jacoco.report/src/org/jacoco/report/ILanguageNames.java | 2 +- .../src/org/jacoco/report/IMultiReportOutput.java | 2 +- .../src/org/jacoco/report/IReportGroupVisitor.java | 2 +- org.jacoco.report/src/org/jacoco/report/IReportVisitor.java | 2 +- .../src/org/jacoco/report/ISourceFileLocator.java | 2 +- .../src/org/jacoco/report/InputStreamSourceFileLocator.java | 2 +- org.jacoco.report/src/org/jacoco/report/JavaNames.java | 2 +- .../src/org/jacoco/report/MultiReportVisitor.java | 2 +- .../src/org/jacoco/report/MultiSourceFileLocator.java | 2 +- .../src/org/jacoco/report/ZipMultiReportOutput.java | 2 +- .../src/org/jacoco/report/check/BundleChecker.java | 2 +- .../src/org/jacoco/report/check/IViolationsOutput.java | 2 +- org.jacoco.report/src/org/jacoco/report/check/Limit.java | 2 +- org.jacoco.report/src/org/jacoco/report/check/Rule.java | 2 +- .../src/org/jacoco/report/check/RulesChecker.java | 2 +- .../src/org/jacoco/report/check/package-info.java | 2 +- .../src/org/jacoco/report/csv/CSVFormatter.java | 2 +- .../src/org/jacoco/report/csv/CSVGroupHandler.java | 2 +- .../src/org/jacoco/report/csv/ClassRowWriter.java | 2 +- .../src/org/jacoco/report/csv/DelimitedWriter.java | 2 +- .../src/org/jacoco/report/csv/package-info.java | 2 +- .../src/org/jacoco/report/html/HTMLFormatter.java | 2 +- .../src/org/jacoco/report/html/package-info.java | 2 +- .../org/jacoco/report/internal/AbstractGroupVisitor.java | 2 +- .../src/org/jacoco/report/internal/NormalizedFileNames.java | 2 +- .../src/org/jacoco/report/internal/ReportOutputFolder.java | 2 +- .../src/org/jacoco/report/internal/html/HTMLElement.java | 2 +- .../org/jacoco/report/internal/html/HTMLGroupVisitor.java | 2 +- .../org/jacoco/report/internal/html/IHTMLReportContext.java | 2 +- .../src/org/jacoco/report/internal/html/ILinkable.java | 2 +- .../org/jacoco/report/internal/html/index/ElementIndex.java | 2 +- .../org/jacoco/report/internal/html/index/IIndexUpdate.java | 2 +- .../org/jacoco/report/internal/html/index/package-info.java | 2 +- .../org/jacoco/report/internal/html/page/BundlePage.java | 2 +- .../src/org/jacoco/report/internal/html/page/ClassPage.java | 2 +- .../src/org/jacoco/report/internal/html/page/GroupPage.java | 2 +- .../org/jacoco/report/internal/html/page/MethodItem.java | 2 +- .../src/org/jacoco/report/internal/html/page/NodePage.java | 2 +- .../org/jacoco/report/internal/html/page/PackagePage.java | 2 +- .../jacoco/report/internal/html/page/PackageSourcePage.java | 2 +- .../org/jacoco/report/internal/html/page/ReportPage.java | 2 +- .../org/jacoco/report/internal/html/page/SessionsPage.java | 2 +- .../jacoco/report/internal/html/page/SourceFileItem.java | 2 +- .../jacoco/report/internal/html/page/SourceFilePage.java | 2 +- .../jacoco/report/internal/html/page/SourceHighlighter.java | 2 +- .../src/org/jacoco/report/internal/html/page/TablePage.java | 2 +- .../jacoco/report/internal/html/resources/Resources.java | 2 +- .../org/jacoco/report/internal/html/resources/Styles.java | 2 +- .../jacoco/report/internal/html/resources/package-info.java | 2 +- .../src/org/jacoco/report/internal/html/resources/sort.js | 2 +- .../org/jacoco/report/internal/html/table/BarColumn.java | 2 +- .../jacoco/report/internal/html/table/CounterColumn.java | 2 +- .../jacoco/report/internal/html/table/IColumnRenderer.java | 2 +- .../org/jacoco/report/internal/html/table/ITableItem.java | 2 +- .../org/jacoco/report/internal/html/table/LabelColumn.java | 2 +- .../jacoco/report/internal/html/table/PercentageColumn.java | 2 +- .../org/jacoco/report/internal/html/table/SortIndex.java | 2 +- .../src/org/jacoco/report/internal/html/table/Table.java | 2 +- .../report/internal/html/table/TableItemComparator.java | 2 +- .../org/jacoco/report/internal/html/table/package-info.java | 2 +- .../src/org/jacoco/report/internal/xml/ReportElement.java | 2 +- .../org/jacoco/report/internal/xml/XMLCoverageWriter.java | 2 +- .../src/org/jacoco/report/internal/xml/XMLElement.java | 2 +- .../src/org/jacoco/report/internal/xml/XMLGroupVisitor.java | 2 +- org.jacoco.report/src/org/jacoco/report/package-info.java | 2 +- .../src/org/jacoco/report/xml/XMLFormatter.java | 2 +- .../src/org/jacoco/report/xml/package-info.java | 2 +- org.jacoco.report/src/org/jacoco/report/xml/report.dtd | 2 +- org.jacoco.tests/pom.xml | 2 +- 780 files changed, 782 insertions(+), 782 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index d152410c85..757dbf4afb 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,7 +1,7 @@ License ======= -Copyright (c) 2009, 2022 Mountainminds GmbH & Co. KG and Contributors +Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors The JaCoCo Java Code Coverage Library and all included documentation is made available by Mountainminds GmbH & Co. KG, Munich. Except indicated below, the diff --git a/jacoco-maven-plugin.test/it/it-check-fails-halt/pom.xml b/jacoco-maven-plugin.test/it/it-check-fails-halt/pom.xml index d0d8873e0b..c7221a1eac 100644 --- a/jacoco-maven-plugin.test/it/it-check-fails-halt/pom.xml +++ b/jacoco-maven-plugin.test/it/it-check-fails-halt/pom.xml @@ -1,6 +1,6 @@ diff --git a/org.jacoco.doc/docroot/doc/build.html b/org.jacoco.doc/docroot/doc/build.html index 7ceab93405..a246a2ba83 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 8 + least Maven 3.3.9 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 2aa667be8b..e79693102b 100644 --- a/org.jacoco.doc/docroot/doc/changes.html +++ b/org.jacoco.doc/docroot/doc/changes.html @@ -40,6 +40,8 @@

        Non-functional Changes

      • JaCoCo now depends on ASM 9.4 (GitHub #1299, #1368).
      • +
      • JaCoCo build now requires JDK 11 + (GitHub #1413).

      Release 0.8.8 (2022/04/05)

      diff --git a/org.jacoco.doc/docroot/doc/environment.html b/org.jacoco.doc/docroot/doc/environment.html index 81c429fada..1042d4dbf9 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 8. + and requires at least Maven 3.3.9 and JDK 11. See the build description for details.

      From 5bc2fae5cf3500312b003bc2cc13c438a3313c79 Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com> Date: Fri, 17 Mar 2023 17:10:22 +0100 Subject: [PATCH 16/66] Upgrade spotless-maven-plugin to 2.35.0 and Eclipse JDT Formatter to 4.27 (#1414) This allows format checking of the integration test targets up to Java 20. --- org.jacoco.build/pom.xml | 4 +- .../cli/internal/commands/InstrumentTest.java | 2 +- .../cli/internal/commands/ReportTest.java | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 335 ++++++++++++++++++ .../pom.xml | 18 + 5 files changed, 357 insertions(+), 4 deletions(-) create mode 100644 org.jacoco.core.test.validation.java20/.settings/org.eclipse.jdt.core.prefs diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml index 15ba07da1f..9aa1aa04e8 100644 --- a/org.jacoco.build/pom.xml +++ b/org.jacoco.build/pom.xml @@ -470,7 +470,7 @@ com.diffplug.spotless spotless-maven-plugin - 1.24.3 + 2.35.0 @@ -562,7 +562,7 @@ src/**/*.java - 4.12.0 + 4.27 ../org.jacoco.core/.settings/org.eclipse.jdt.core.prefs diff --git a/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/InstrumentTest.java b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/InstrumentTest.java index 39b2a8997b..a1381cf0ab 100644 --- a/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/InstrumentTest.java +++ b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/InstrumentTest.java @@ -70,7 +70,7 @@ public void should_instrument_class_files_and_copy_resources_when_folder_is_give // non class-file resources are copied: assertTrue(new File(destdir, "org/jacoco/cli/internal/commands/test-resource.properties") - .isFile()); + .isFile()); assertInstrumented(new File(destdir, "org/jacoco/cli/internal/commands/InstrumentTest.class")); diff --git a/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/ReportTest.java b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/ReportTest.java index 305397b3e8..bc2c37f413 100644 --- a/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/ReportTest.java +++ b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/ReportTest.java @@ -124,7 +124,7 @@ public void should_create_html_report_when_html_option_is_provided() "org.jacoco.cli.internal.commands/ReportTest.html").isFile()); assertTrue(new File(html, "org.jacoco.cli.internal.commands/ReportTest.java.html") - .isFile()); + .isFile()); } @Test diff --git a/org.jacoco.core.test.validation.java20/.settings/org.eclipse.jdt.core.prefs b/org.jacoco.core.test.validation.java20/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..1b6a37525d --- /dev/null +++ b/org.jacoco.core.test.validation.java20/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,335 @@ +#Sat Sep 05 17:45:34 CEST 2009 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=enabled +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedParameter=warning +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.5 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=80 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true diff --git a/org.jacoco.core.test.validation.java20/pom.xml b/org.jacoco.core.test.validation.java20/pom.xml index ca4fbcf665..e91df6065c 100644 --- a/org.jacoco.core.test.validation.java20/pom.xml +++ b/org.jacoco.core.test.validation.java20/pom.xml @@ -54,6 +54,24 @@ --enable-preview + + + com.diffplug.spotless + spotless-maven-plugin + + + + + ../org.jacoco.core.test.validation.java20/.settings/org.eclipse.jdt.core.prefs + + + + From b865890d566c55832def986bb800b0b2f98200de Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com> Date: Wed, 22 Mar 2023 17:32:11 +0100 Subject: [PATCH 17/66] Agent should not open `java.lang` package to unnamed module of the application class loader (#1334) Co-authored-by: Evgeny Mandrikov Co-authored-by: Marc R. Hoffmann --- .../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 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

    • JaCoCo now depends on ASM 9.4 From 5f12145bffb2b965618f9b0f05e73336fbed3f85 Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov <138671+Godin@users.noreply.github.com> Date: Sun, 26 Mar 2023 07:12:36 +0200 Subject: [PATCH 18/66] Upgrade ASM to 9.5 (#1416) --- org.jacoco.build/licenses/{asm-9.4.html => asm-9.5.html} | 2 +- org.jacoco.build/pom.xml | 2 +- org.jacoco.doc/docroot/doc/changes.html | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) rename org.jacoco.build/licenses/{asm-9.4.html => asm-9.5.html} (96%) diff --git a/org.jacoco.build/licenses/asm-9.4.html b/org.jacoco.build/licenses/asm-9.5.html similarity index 96% rename from org.jacoco.build/licenses/asm-9.4.html rename to org.jacoco.build/licenses/asm-9.5.html index 8a11337519..9d6d464de7 100644 --- a/org.jacoco.build/licenses/asm-9.4.html +++ b/org.jacoco.build/licenses/asm-9.5.html @@ -1,7 +1,7 @@

      ASM

      - ASM 9.4 is subject to the terms and + ASM 9.5 is subject to the terms and conditions of the following license:

      diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml index 9aa1aa04e8..87edf49e71 100644 --- a/org.jacoco.build/pom.xml +++ b/org.jacoco.build/pom.xml @@ -139,7 +139,7 @@ ${jvm.args} - 9.4 + 9.5 1.9.16 2.0.28 4.13.1 diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html index 5b18f9cd6e..031df68f68 100644 --- a/org.jacoco.doc/docroot/doc/changes.html +++ b/org.jacoco.doc/docroot/doc/changes.html @@ -44,9 +44,10 @@

      Fixed bugs

      Non-functional Changes

        -
      • JaCoCo now depends on ASM 9.4 +
      • JaCoCo now depends on ASM 9.5 (GitHub #1299, - #1368).
      • + #1368, + #1416).
      • JaCoCo build now requires JDK 11 (GitHub #1413).
      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() }