Skip to content

Commit 31e3a80

Browse files
committed
Add version offset to returned VM version
1 parent a3ec015 commit 31e3a80

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/me/coley/recaf/compiler/JavacTargetVersion.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package me.coley.recaf.compiler;
22

3+
import me.coley.recaf.util.ClassUtil;
34
import me.coley.recaf.util.Log;
45
import me.coley.recaf.util.VMUtil;
56
import org.objectweb.asm.Opcodes;
@@ -94,7 +95,7 @@ public static JavacTargetVersion getMinJavacSupport() {
9495
*/
9596
public static JavacTargetVersion getMaxJavacSupport() {
9697
try {
97-
return fromClassMajor(VMUtil.getVmVersion());
98+
return fromClassMajor(VMUtil.getVmVersion() + ClassUtil.VERSION_OFFSET);
9899
} catch (Exception ex) {
99100
Log.error("Failed to find javac maximum supported version, defaulting to Java 8 (52)");
100101
}

0 commit comments

Comments
 (0)