|
1 | 1 | /* |
2 | | - * Copyright (c) 2022, 2022, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
@@ -89,9 +89,6 @@ public final class EspressoForeignProxyGenerator extends ClassWriter { |
89 | 89 | private static final String JLR_UNDECLARED_THROWABLE_EX = "java/lang/reflect/UndeclaredThrowableException"; |
90 | 90 | private static final int VARARGS = 0x00000080; |
91 | 91 |
|
92 | | - /* name of the superclass of proxy classes */ |
93 | | - private static final String superclassName = "java/lang/Object"; |
94 | | - |
95 | 92 | private Meta meta; |
96 | 93 |
|
97 | 94 | /* name of proxy class */ |
@@ -162,7 +159,7 @@ private static String nextClassName() { |
162 | 159 | */ |
163 | 160 | private byte[] generateClassFile() { |
164 | 161 | visit(V1_8, accessFlags, dotToSlash(className), null, |
165 | | - superclassName, typeNames(interfaces)); |
| 162 | + meta.sun_reflect_MagicAccessorImpl.getNameAsString(), typeNames(interfaces)); |
166 | 163 |
|
167 | 164 | // toString is implemented by interop protocol by means of |
168 | 165 | // toDisplayString and asString |
@@ -272,7 +269,7 @@ private void generateConstructor() { |
272 | 269 | ctor.visitParameter(null, 0); |
273 | 270 | ctor.visitCode(); |
274 | 271 | ctor.visitVarInsn(ALOAD, 0); |
275 | | - ctor.visitMethodInsn(INVOKESPECIAL, superclassName, "<init>", |
| 272 | + ctor.visitMethodInsn(INVOKESPECIAL, meta.sun_reflect_MagicAccessorImpl.getNameAsString(), "<init>", |
276 | 273 | "()V", false); |
277 | 274 | ctor.visitInsn(RETURN); |
278 | 275 |
|
|
0 commit comments