Skip to content

Commit

Permalink
Add version offset to returned VM version
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankHeijden committed Nov 7, 2021
1 parent a3ec015 commit 31e3a80
Showing 1 changed file with 2 additions and 1 deletion.
@@ -1,5 +1,6 @@
package me.coley.recaf.compiler;

import me.coley.recaf.util.ClassUtil;
import me.coley.recaf.util.Log;
import me.coley.recaf.util.VMUtil;
import org.objectweb.asm.Opcodes;
Expand Down Expand Up @@ -94,7 +95,7 @@ public static JavacTargetVersion getMinJavacSupport() {
*/
public static JavacTargetVersion getMaxJavacSupport() {
try {
return fromClassMajor(VMUtil.getVmVersion());
return fromClassMajor(VMUtil.getVmVersion() + ClassUtil.VERSION_OFFSET);
} catch (Exception ex) {
Log.error("Failed to find javac maximum supported version, defaulting to Java 8 (52)");
}
Expand Down

0 comments on commit 31e3a80

Please sign in to comment.