blob: 94aac1e6d9c99b197a7fd931b9599a2aebca87b6 [file] [log] [blame]
David Brazdil11b67b22018-01-18 16:41:40 +00001Test whether hidden API access flags are being enforced. The test is composed of
2two JARs. The first (parent) defines methods and fields and the second (child)
Orion Hodson198a27e2018-04-06 15:41:28 +01003tries to access them with reflection/JNI/MethodHandles or link against them.
4Note that the first is compiled twice - once with and once without hidden access
5flags.
David Brazdil11b67b22018-01-18 16:41:40 +00006
7The test then proceeds to exercise the following combinations of class loading:
8(a) Both parent and child dex loaded with PathClassLoader, parent's class loader
9 is the child's class loader's parent. Access flags should not be enforced as
10 the parent does not belong to boot class path.
11(b) Parent is appended to boot class path, child is loaded with PathClassLoader.
12 In this situation child should not be able to access hidden methods/fields
13 of the parent.
14(c) Both parent and child are appended to boot class path. Restrictions should
15 not apply as hidden APIs are accessible within the boundaries of the boot
16 class path.