diff --git a/org.jacoco.build/licenses/asm-8.0.1.html b/org.jacoco.build/licenses/asm-9.0.html
similarity index 96%
rename from org.jacoco.build/licenses/asm-8.0.1.html
rename to org.jacoco.build/licenses/asm-9.0.html
index 1ba58e514c..7e6d1d7b7f 100644
--- a/org.jacoco.build/licenses/asm-8.0.1.html
+++ b/org.jacoco.build/licenses/asm-9.0.html
@@ -1,7 +1,7 @@
ASM
- ASM 7.2 is subject to the terms and
+ ASM 9.0 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 078b4e73ec..89acca23d6 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -139,7 +139,7 @@
${jvm.args}
- 8.0.1
+ 9.0
1.7.1
2.0.28
4.13
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 120ddb9244..33d1ea5a11 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
@@ -107,7 +107,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.V15 + 1);
+ final byte[] originalBytes = createClass(Opcodes.V16);
final byte[] bytes = new byte[originalBytes.length];
System.arraycopy(originalBytes, 0, bytes, 0, originalBytes.length);
final long expectedClassId = CRC64.classId(bytes);
@@ -130,7 +130,7 @@ private static byte[] createClass(final int version) {
*/
@Test
public void analyzeClass_should_throw_exception_for_unsupported_class_file_version() {
- final byte[] bytes = createClass(Opcodes.V15 + 2);
+ final byte[] bytes = createClass(Opcodes.V16 + 1);
try {
analyzer.analyzeClass(bytes, "UnsupportedVersion");
fail("exception expected");
@@ -217,7 +217,7 @@ public void testAnalyzeClass_BrokenStream() throws IOException {
*/
@Test
public void analyzeAll_should_throw_exception_for_unsupported_class_file_version() {
- final byte[] bytes = createClass(Opcodes.V15 + 2);
+ final byte[] bytes = createClass(Opcodes.V16 + 1);
try {
analyzer.analyzeAll(new ByteArrayInputStream(bytes),
"UnsupportedVersion");
diff --git a/org.jacoco.core.test/src/org/jacoco/core/instr/ClassFileVersionsTest.java b/org.jacoco.core.test/src/org/jacoco/core/instr/ClassFileVersionsTest.java
index f1d21db210..3afa8103b0 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/instr/ClassFileVersionsTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/instr/ClassFileVersionsTest.java
@@ -30,6 +30,7 @@
import static org.objectweb.asm.Opcodes.V13;
import static org.objectweb.asm.Opcodes.V14;
import static org.objectweb.asm.Opcodes.V15;
+import static org.objectweb.asm.Opcodes.V16;
import static org.objectweb.asm.Opcodes.V1_1;
import static org.objectweb.asm.Opcodes.V1_2;
import static org.objectweb.asm.Opcodes.V1_3;
@@ -135,7 +136,7 @@ public void test_15() throws IOException {
@Test
public void test_16() throws IOException {
- testVersion(V15 + 1, true);
+ testVersion(V16, true);
}
private void testVersion(int version, boolean frames) throws IOException {
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 5d29429a91..b7500cb122 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
@@ -99,7 +99,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.V15 + 1);
+ final byte[] originalBytes = createClass(Opcodes.V16);
final byte[] bytes = new byte[originalBytes.length];
System.arraycopy(originalBytes, 0, bytes, 0, originalBytes.length);
final long expectedClassId = CRC64.classId(bytes);
@@ -122,7 +122,7 @@ private static byte[] createClass(final int version) {
*/
@Test
public void instrument_should_throw_exception_for_unsupported_class_file_version() {
- final byte[] bytes = createClass(Opcodes.V15 + 2);
+ final byte[] bytes = createClass(Opcodes.V16 + 1);
try {
instrumenter.instrument(bytes, "UnsupportedVersion");
fail("exception expected");
@@ -224,7 +224,7 @@ public void testSerialization() throws Exception {
*/
@Test
public void instrumentAll_should_throw_exception_for_unsupported_class_file_version() {
- final byte[] bytes = createClass(Opcodes.V15 + 2);
+ final byte[] bytes = createClass(Opcodes.V16 + 1);
try {
instrumenter.instrumentAll(new ByteArrayInputStream(bytes),
new ByteArrayOutputStream(), "UnsupportedVersion");
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 b6ddb29336..a66b5ebd3d 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
@@ -53,7 +53,7 @@ public void classReaderFor_should_read_java_16_class() {
public void visit(final int version, final int access,
final String name, final String signature,
final String superName, final String[] interfaces) {
- assertEquals(Opcodes.V15 + 1, version);
+ assertEquals(Opcodes.V16, version);
}
}, 0);
@@ -62,7 +62,7 @@ public void visit(final int version, final int access,
private static byte[] createJava16Class() {
final ClassWriter cw = new ClassWriter(0);
- cw.visit(Opcodes.V15 + 1, 0, "Foo", null, "java/lang/Object", null);
+ cw.visit(Opcodes.V16, 0, "Foo", null, "java/lang/Object", null);
cw.visitEnd();
return cw.toByteArray();
}
@@ -127,7 +127,7 @@ public void needFrames_should_return_true_for_versions_greater_than_or_equal_to_
assertTrue(InstrSupport.needsFrames(Opcodes.V13));
assertTrue(InstrSupport.needsFrames(Opcodes.V14));
assertTrue(InstrSupport.needsFrames(Opcodes.V15));
- assertTrue(InstrSupport.needsFrames(Opcodes.V15 + 1));
+ assertTrue(InstrSupport.needsFrames(Opcodes.V16));
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 bf91e6d051..a4de1f227e 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.V15 + 1) {
+ if (originalVersion == Opcodes.V16) {
// temporarily downgrade version to bypass check in ASM
- setMajorVersion(Opcodes.V15, b);
+ setMajorVersion(Opcodes.V16, 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 67769e4646..8558948b83 100644
--- a/org.jacoco.doc/docroot/doc/changes.html
+++ b/org.jacoco.doc/docroot/doc/changes.html
@@ -20,6 +20,19 @@ Change History
Snapshot Build @qualified.bundle.version@ (@build.date@)
+New Features
+
+ - JaCoCo now officially supports Java 15
+ (GitHub #1094).
+
+
+Non-functional Changes
+
+ - JaCoCo now depends on ASM 9.0
+ (GitHub #1094).
+
+
+
Release 0.8.6 (2020/09/15)
New Features