< prev index next >

test/jdk/java/util/logging/RootLogger/RootLevelInConfigFile.java

Print this page
rev 51958 : 8211122: Reduce the number of internal classes made accessible to jdk.unsupported
Reviewed-by: alanb, dfuchs, kvn

*** 1,7 **** /* ! * Copyright (c) 2013, 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) 2013, 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.
*** 32,50 **** import java.util.PropertyPermission; import java.util.logging.Level; import java.util.logging.LogManager; import java.util.logging.Logger; import java.util.logging.LoggingPermission; ! import jdk.internal.misc.JavaAWTAccess; ! import jdk.internal.misc.SharedSecrets; /** * @test * @bug 8030850 * @summary Tests that setting .level=FINEST for the root logger in logging * configuration file does work. ! * @modules java.base/jdk.internal.misc * java.logging * @run main/othervm RootLevelInConfigFile * * @author danielfuchs */ --- 32,50 ---- import java.util.PropertyPermission; import java.util.logging.Level; import java.util.logging.LogManager; import java.util.logging.Logger; import java.util.logging.LoggingPermission; ! import jdk.internal.access.JavaAWTAccess; ! import jdk.internal.access.SharedSecrets; /** * @test * @bug 8030850 * @summary Tests that setting .level=FINEST for the root logger in logging * configuration file does work. ! * @modules java.base/jdk.internal.access * java.logging * @run main/othervm RootLevelInConfigFile * * @author danielfuchs */
*** 180,190 **** public SimplePolicy(String configFile) { perms.add(new LoggingPermission("control", null)); perms.add(new PropertyPermission("java.util.logging.config.class","read")); perms.add(new PropertyPermission("java.util.logging.config.file","read")); perms.add(new FilePermission(configFile, "read")); ! perms.add(new RuntimePermission("accessClassInPackage.jdk.internal.misc")); } @Override public boolean implies(ProtectionDomain domain, Permission permission) { return perms.implies(permission); --- 180,190 ---- public SimplePolicy(String configFile) { perms.add(new LoggingPermission("control", null)); perms.add(new PropertyPermission("java.util.logging.config.class","read")); perms.add(new PropertyPermission("java.util.logging.config.file","read")); perms.add(new FilePermission(configFile, "read")); ! perms.add(new RuntimePermission("accessClassInPackage.jdk.internal.access")); } @Override public boolean implies(ProtectionDomain domain, Permission permission) { return perms.implies(permission);
< prev index next >