diff options
Diffstat (limited to 'org.jacoco.core/src/org/jacoco/core/internal/instr/InstrSupport.java')
-rw-r--r-- | org.jacoco.core/src/org/jacoco/core/internal/instr/InstrSupport.java | 25 |
1 files changed, 13 insertions, 12 deletions
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 4d4e1ba1..c125112d 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 @@ -1,13 +1,14 @@ /******************************************************************************* - * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Copyright (c) 2009, 2021 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: * Marc R. Hoffmann - initial API and implementation - * + * *******************************************************************************/ package org.jacoco.core.internal.instr; @@ -26,7 +27,7 @@ public final class InstrSupport { } /** ASM API version */ - public static final int ASM_API_VERSION = Opcodes.ASM7; + public static final int ASM_API_VERSION = Opcodes.ASM9; // === Data Field === @@ -212,7 +213,7 @@ public final class InstrSupport { /** * Determines whether the given class file version requires stackmap frames. - * + * * @param version * class file version * @return <code>true</code> if frames are required @@ -226,7 +227,7 @@ public final class InstrSupport { * Ensures that the given member does not correspond to a internal member * created by the instrumentation process. This would mean that the class is * already instrumented. - * + * * @param member * name of the member to check * @param owner @@ -248,7 +249,7 @@ public final class InstrSupport { * Generates the instruction to push the given int value on the stack. * Implementation taken from * {@link org.objectweb.asm.commons.GeneratorAdapter#push(int)}. - * + * * @param mv * visitor to emit the instruction * @param value @@ -276,9 +277,9 @@ public final class InstrSupport { */ public static ClassReader classReaderFor(final byte[] b) { final int originalVersion = getMajorVersion(b); - if (originalVersion == Opcodes.V12 + 1) { + if (originalVersion == Opcodes.V16 + 1) { // temporarily downgrade version to bypass check in ASM - setMajorVersion(Opcodes.V12, b); + setMajorVersion(Opcodes.V16, b); } final ClassReader classReader = new ClassReader(b); setMajorVersion(originalVersion, b); |