< prev index next >
test/jdk/java/util/logging/RootLogger/RootLevelInConfigFile.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2019, 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,20 +32,16 @@
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
*/
public class RootLevelInConfigFile {
@@ -71,26 +67,10 @@
Policy.setPolicy(new SimplePolicy(configFile));
System.setSecurityManager(new SecurityManager());
test("security");
-
- LogManager.getLogManager().readConfiguration();
-
- final JavaAWTAccessStub access = new JavaAWTAccessStub();
- SharedSecrets.setJavaAWTAccess(access);
-
- test("security and no context");
-
- for (Context ctx : Context.values()) {
-
- LogManager.getLogManager().readConfiguration();
-
- access.setContext(ctx);
-
- test("security and context " + ctx);
- }
}
public static void test(String conf) throws IOException {
System.out.println("Testing with " + conf);
@@ -188,22 +168,6 @@
@Override
public boolean implies(ProtectionDomain domain, Permission permission) {
return perms.implies(permission);
}
}
-
- static enum Context { ONE, TWO };
-
- static final class JavaAWTAccessStub implements JavaAWTAccess {
- private Context context;
-
- public void setContext(Context context) {
- this.context = context;
- }
-
- @Override
- public Object getAppletContext() {
- return context;
- }
- }
-
}
< prev index next >