Skip to content

Commit

Permalink
Support Java 9, 10, and 11 bytecode with invokedynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
keeganwitt committed Sep 9, 2018
1 parent 522fd49 commit 9a8b38f
Showing 1 changed file with 2 additions and 6 deletions.
Expand Up @@ -146,15 +146,11 @@ private ClassVisitor createClassVisitor(ClassVisitor cv) {
return new LoggableClassVisitor(cv);
}
private static int chooseBytecodeVersion(final boolean invokedynamic, final String targetBytecode) {
if (invokedynamic) {
if (CompilerConfiguration.JDK7.equals(targetBytecode)) {
return Opcodes.V1_7;
}
Integer bytecodeVersion = CompilerConfiguration.JDK_TO_BYTECODE_VERSION_MAP.get(targetBytecode);

if (invokedynamic && bytecodeVersion < Opcodes.V1_8) {
return Opcodes.V1_8;
} else {
Integer bytecodeVersion = CompilerConfiguration.JDK_TO_BYTECODE_VERSION_MAP.get(targetBytecode);

if (null != bytecodeVersion) {
return bytecodeVersion;
}
Expand Down

0 comments on commit 9a8b38f

Please sign in to comment.