< prev index next >

test/jdk/tools/launcher/modules/illegalaccess/IllegalAccessTest.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2017, 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) 2017, 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.
*** 24,34 **** /** * @test * @requires vm.compMode != "Xcomp" * @modules java.base/jdk.internal.misc * java.base/sun.security.x509 - * java.activation * @library /test/lib /lib/testlibrary modules * @build IllegalAccessTest TryAccess JarUtils * jdk.test.lib.compiler.CompilerUtils * jdk.testlibrary.* * @build m/* --- 24,33 ----
*** 265,292 **** expectedResult.expect("TryAccess.main"); } run(action, expectedResult, "--illegal-access=debug"); } - /** - * Test accessing internals of upgradeable module - */ - public void testWithUpgradedModule() throws Exception { - // upgradeable module loaded from run-time image - run("setAccessibleNotPublicMemberUpgradeableModule", successWithWarning(), - "--add-modules=java.activation"); - - // upgradeable module loaded from upgrade module path - Path upgradesrc = Paths.get(TEST_SRC, "upgradesrc"); - Path upgrademods = Files.createDirectory(Paths.get("upgrademods")); - Path output = upgrademods.resolve("java.activation"); - assertTrue(CompilerUtils.compile(upgradesrc, output)); - run("setAccessibleNotPublicMemberUpgradeableModule", - fail("InaccessibleObjectException"), - "--upgrade-module-path=" + upgrademods, - "--add-modules=java.activation"); - } /** * Specify --add-exports to export a package */ public void testWithAddExportsOption() throws Exception { --- 264,273 ----
< prev index next >