Skip to content

Commit

Permalink
Explain we only need to target Java8 for the generated helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
mcculls committed Jun 6, 2020
1 parent 1386c48 commit 774b89b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/src/com/google/inject/internal/aop/Enhancer.java
Expand Up @@ -175,6 +175,7 @@ final class Enhancer extends AbstractGlueGenerator {
protected byte[] generateGlue(Collection<Executable> members) {
ClassWriter cw = new ClassWriter(COMPUTE_MAXS);

// target Java8 because that's all we need for the generated trampoline code
cw.visit(V1_8, PUBLIC | ACC_SUPER, proxyName, null, hostName, null);
cw.visitSource(GENERATED_SOURCE, null);

Expand Down
1 change: 1 addition & 0 deletions core/src/com/google/inject/internal/aop/FastClass.java
Expand Up @@ -128,6 +128,7 @@ protected byte[] generateGlue(Collection<Executable> members) {
ClassWriter cw = new ClassWriter(COMPUTE_MAXS);
MethodVisitor mv;

// target Java8 because that's all we need for the generated trampoline code
cw.visit(V1_8, PUBLIC | FINAL | ACC_SUPER, proxyName, null, "java/lang/Object", FAST_CLASS_API);
cw.visitSource(GENERATED_SOURCE, null);

Expand Down
Expand Up @@ -160,6 +160,7 @@ static Method accessDefineMethod(Class<?> loaderClass) throws Exception {
private static byte[] buildDefineClassAccess(Class<?> loaderClass) {
ClassWriter cw = new ClassWriter(COMPUTE_MAXS);

// target Java8 because that's all we need for the generated helper
cw.visit(
V1_8,
PUBLIC | ACC_SUPER,
Expand Down

0 comments on commit 774b89b

Please sign in to comment.