< prev index next >

test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 47,56 **** --- 47,58 ---- import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.lang.annotation.Annotation; + import java.lang.reflect.AccessibleObject; + import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.Arrays; import java.util.Collections;
*** 760,769 **** --- 762,778 ---- return true; } if (f.getDeclaringClass().equals(metaAccess.lookupJavaType(Class.class)) && f.getName().equals("classLoader")) { return true; } + if (f.getDeclaringClass().equals(metaAccess.lookupJavaType(ClassLoader.class)) || + f.getDeclaringClass().equals(metaAccess.lookupJavaType(AccessibleObject.class)) || + f.getDeclaringClass().equals(metaAccess.lookupJavaType(Constructor.class)) || + f.getDeclaringClass().equals(metaAccess.lookupJavaType(Field.class)) || + f.getDeclaringClass().equals(metaAccess.lookupJavaType(Method.class))) { + return true; + } return false; } @Test public void getInstanceFieldsTest() {
< prev index next >