Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions 2 .azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:
JDK_VERSION: 25
JDK 26:
JDK_VERSION: 26
JDK 27:
JDK_VERSION: 27
pool:
vmImage: 'ubuntu-24.04'
steps:
Expand Down
14 changes: 14 additions & 0 deletions 14 org.jacoco.build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,20 @@
</properties>
</profile>

<profile>
<id>java27-bytecode</id>
<activation>
<property>
<name>bytecode.version</name>
<value>27</value>
</property>
</activation>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
</profile>

<!-- This profile enables use of ECJ -->
<profile>
<id>ecj</id>
Expand Down
31 changes: 31 additions & 0 deletions 31 org.jacoco.core.test.validation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,37 @@
</modules>
</profile>

<profile>
<id>java27-bytecode</id>
<activation>
<property>
<name>bytecode.version</name>
<value>27</value>
</property>
</activation>
<properties>
<!-- Kotlin 2.2.21 doesn't support compilation into 27 -->
<kotlin.compiler.jvmTarget>24</kotlin.compiler.jvmTarget>
<!-- Groovy 3.0.25 does not support compilation into 27 -->
<groovy.targetBytecode>16</groovy.targetBytecode>
<!-- see respective profile in org.jacoco.build about this override -->
<maven.compiler.source>27</maven.compiler.source>
<maven.compiler.target>27</maven.compiler.target>
</properties>
<modules>
<module>../org.jacoco.core.test.validation.kotlin</module>
<module>../org.jacoco.core.test.validation.java7</module>
<module>../org.jacoco.core.test.validation.java8</module>
<module>../org.jacoco.core.test.validation.java14</module>
<module>../org.jacoco.core.test.validation.java16</module>
<module>../org.jacoco.core.test.validation.java21</module>
<!-- Groovy 3.0.25 does not support Java 27
<module>../org.jacoco.core.test.validation.groovy</module>
-->
<module>../org.jacoco.core.test.validation.scala</module>
</modules>
</profile>

</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,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.V25 + 1);
final byte[] originalBytes = createClass(Opcodes.V26 + 1);
final byte[] bytes = new byte[originalBytes.length];
System.arraycopy(originalBytes, 0, bytes, 0, originalBytes.length);
final long expectedClassId = CRC64.classId(bytes);
Expand All @@ -134,13 +134,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.V25 + 2);
final byte[] bytes = createClass(Opcodes.V26 + 2);
try {
analyzer.analyzeClass(bytes, "UnsupportedVersion");
fail("exception expected");
} catch (IOException e) {
assertExceptionMessage("UnsupportedVersion", e);
assertEquals("Unsupported class file major version 71",
assertEquals("Unsupported class file major version 72",
e.getCause().getMessage());
}
}
Expand Down Expand Up @@ -220,14 +220,14 @@ public void testAnalyzeClass_BrokenStream() throws IOException {
*/
@Test
public void analyzeAll_should_throw_exception_for_unsupported_class_file_version() {
final byte[] bytes = createClass(Opcodes.V25 + 2);
final byte[] bytes = createClass(Opcodes.V26 + 2);
try {
analyzer.analyzeAll(new ByteArrayInputStream(bytes),
"UnsupportedVersion");
fail("exception expected");
} catch (IOException e) {
assertExceptionMessage("UnsupportedVersion", e);
assertEquals("Unsupported class file major version 71",
assertEquals("Unsupported class file major version 72",
e.getCause().getMessage());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import static org.objectweb.asm.Opcodes.V23;
import static org.objectweb.asm.Opcodes.V24;
import static org.objectweb.asm.Opcodes.V25;
import static org.objectweb.asm.Opcodes.V26;
import static org.objectweb.asm.Opcodes.V9;

import java.io.IOException;
Expand Down Expand Up @@ -195,7 +196,12 @@ public void test_25() throws IOException {

@Test
public void test_26() throws IOException {
testVersion(V25 + 1, true);
testVersion(V26, true);
}

@Test
public void test_27() throws IOException {
testVersion(V26 + 1, true);
}

private void testVersion(int version, boolean frames) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.V25 + 2);
final byte[] bytes = createClass(Opcodes.V26 + 2);
try {
instrumenter.instrument(bytes, "UnsupportedVersion");
fail("exception expected");
} catch (final IOException e) {
assertExceptionMessage("UnsupportedVersion", e);
assertEquals("Unsupported class file major version 71",
assertEquals("Unsupported class file major version 72",
e.getCause().getMessage());
}
}
Expand Down Expand Up @@ -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.V25 + 2);
final byte[] bytes = createClass(Opcodes.V26 + 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 71",
assertEquals("Unsupported class file major version 72",
e.getCause().getMessage());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ public void needFrames_should_return_true_for_versions_greater_than_or_equal_to_
assertTrue(InstrSupport.needsFrames(Opcodes.V23));
assertTrue(InstrSupport.needsFrames(Opcodes.V24));
assertTrue(InstrSupport.needsFrames(Opcodes.V25));
assertTrue(InstrSupport.needsFrames(Opcodes.V25 + 1));
assertTrue(InstrSupport.needsFrames(Opcodes.V26));
assertTrue(InstrSupport.needsFrames(Opcodes.V26 + 1));

assertTrue(InstrSupport.needsFrames(0x0100));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.V25 + 1) {
if (originalVersion == Opcodes.V26 + 1) {
// temporarily downgrade version to bypass check in ASM
setMajorVersion(Opcodes.V25, b);
setMajorVersion(Opcodes.V26, b);
}
final ClassReader classReader = new ClassReader(b);
setMajorVersion(originalVersion, b);
Expand Down
11 changes: 11 additions & 0 deletions 11 org.jacoco.doc/docroot/doc/build.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ <h2>Compilation and testing with different JDKs</h2>
<td>JDK 24</td>
<td>JDK 25</td>
<td>JDK 26</td>
<td>JDK 27</td>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -130,6 +131,7 @@ <h2>Compilation and testing with different JDKs</h2>
<td>21</td>
<td>21</td>
<td>21</td>
<td>21</td>
</tr>
<tr>
<td>org.jacoco.core.test.validation.java16</td>
Expand All @@ -155,6 +157,7 @@ <h2>Compilation and testing with different JDKs</h2>
<td>16</td>
<td>16</td>
<td>16</td>
<td>16</td>
</tr>
<tr>
<td>org.jacoco.core.test.validation.java14</td>
Expand All @@ -180,6 +183,7 @@ <h2>Compilation and testing with different JDKs</h2>
<td>14</td>
<td>14</td>
<td>14</td>
<td>14</td>
</tr>
<tr>
<td>org.jacoco.core.test.validation.java8</td>
Expand All @@ -205,6 +209,7 @@ <h2>Compilation and testing with different JDKs</h2>
<td>8</td>
<td>8</td>
<td>8</td>
<td>8</td>
</tr>
<tr>
<td>org.jacoco.core.test.validation.java7</td>
Expand All @@ -230,6 +235,7 @@ <h2>Compilation and testing with different JDKs</h2>
<td>8</td>
<td>8</td>
<td>8</td>
<td>8</td>
</tr>
<tr>
<td>org.jacoco.core.test.validation.groovy</td>
Expand All @@ -255,6 +261,7 @@ <h2>Compilation and testing with different JDKs</h2>
<td>8</td>
<td>8</td>
<td>8</td>
<td>8</td>
</tr>
<tr>
<td>org.jacoco.core.test.validation.kotlin</td>
Expand All @@ -280,6 +287,7 @@ <h2>Compilation and testing with different JDKs</h2>
<td>8</td>
<td>8</td>
<td>8</td>
<td>8</td>
</tr>
<tr>
<td>org.jacoco.core.test.validation.scala</td>
Expand All @@ -305,6 +313,7 @@ <h2>Compilation and testing with different JDKs</h2>
<td>8</td>
<td>8</td>
<td>8</td>
<td>8</td>
</tr>
<tr>
<td>all other modules</td>
Expand All @@ -330,6 +339,7 @@ <h2>Compilation and testing with different JDKs</h2>
<td>8</td>
<td>8</td>
<td>8</td>
<td>8</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -386,6 +396,7 @@ <h2>Compilation and testing with different JDKs</h2>
<li><code>../mvnw clean verify -Djdk.version=24 -Dbytecode.version=24</code></li>
<li><code>../mvnw clean verify -Djdk.version=25 -Dbytecode.version=25</code></li>
<li><code>../mvnw clean verify -Djdk.version=26 -Dbytecode.version=26</code></li>
<li><code>../mvnw clean verify -Djdk.version=27 -Dbytecode.version=27</code></li>
</ul>


Expand Down
2 changes: 2 additions & 0 deletions 2 org.jacoco.doc/docroot/doc/changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ <h2>Snapshot Build @qualified.bundle.version@ (@build.date@)</h2>

<h3>New Features</h3>
<ul>
<li>Experimental support for Java 27 class files
(GitHub <a href="https://github.com/jacoco/jacoco/issues/2004">#2004</a>).</li>
<li>Compatibility methods generated by Kotlin compiler for functions defined in
interfaces are filtered out during generation of report
(GitHub <a href="https://github.com/jacoco/jacoco/issues/1905">#1905</a>).</li>
Expand Down
2 changes: 1 addition & 1 deletion 2 org.jacoco.doc/docroot/doc/faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h3>Does JaCoCo have a plug-in for [Eclipse|Netbeans|Whatever...]?</h3>
<h3>What Java versions are supported by JaCoCo?</h3>
<p>
JaCoCo officially supports Java class files from version 1.0 to 25. Also
experimental support for class files of version 26 is provided.
experimental support for class files of version 26 and 27 is provided.
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.
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.