9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 /*
26 * @test
27 * @bug 8087342
28 * @summary Test linkresolver search static, instance and overpass duplicates
29 * @run main/othervm -Xverify:none TestStaticandInstance
30 */
31
32
33 import java.util.*;
34 import jdk.internal.org.objectweb.asm.*;
35 import static jdk.internal.org.objectweb.asm.Opcodes.*;
36
37 public class TestStaticandInstance {
38 static final String stringC = "C";
39 static final String stringD = "D";
40 static final String stringI = "I";
41
42 public static void main(String args[]) throws Throwable {
43 ClassLoader cl = new ClassLoader() {
44 public Class<?> loadClass(String name) throws ClassNotFoundException {
45 Class retClass;
46 if ((retClass = findLoadedClass(name)) != null) {
47 return retClass;
48 }
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 /*
26 * @test
27 * @bug 8087342
28 * @summary Test linkresolver search static, instance and overpass duplicates
29 * @modules java.base/jdk.internal.org.objectweb.asm
30 * @run main/othervm -Xverify:none TestStaticandInstance
31 */
32
33
34 import java.util.*;
35 import jdk.internal.org.objectweb.asm.*;
36 import static jdk.internal.org.objectweb.asm.Opcodes.*;
37
38 public class TestStaticandInstance {
39 static final String stringC = "C";
40 static final String stringD = "D";
41 static final String stringI = "I";
42
43 public static void main(String args[]) throws Throwable {
44 ClassLoader cl = new ClassLoader() {
45 public Class<?> loadClass(String name) throws ClassNotFoundException {
46 Class retClass;
47 if ((retClass = findLoadedClass(name)) != null) {
48 return retClass;
49 }
|