< prev index next >
test/jdk/java/util/logging/LogManagerAppContextDeadlock.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.
*** 33,51 ****
import java.util.concurrent.Semaphore;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.LogManager;
import java.util.logging.Logger;
! import jdk.internal.misc.JavaAWTAccess;
! import jdk.internal.misc.SharedSecrets;
/**
* @test
* @bug 8065991
* @summary check that when LogManager is initialized, a deadlock similar
* to that described in 8065709 will not occur.
! * @modules java.base/jdk.internal.misc
* java.logging
* java.management
* @run main/othervm LogManagerAppContextDeadlock UNSECURE
* @run main/othervm LogManagerAppContextDeadlock SECURE
*
--- 33,51 ----
import java.util.concurrent.Semaphore;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.LogManager;
import java.util.logging.Logger;
! import jdk.internal.access.JavaAWTAccess;
! import jdk.internal.access.SharedSecrets;
/**
* @test
* @bug 8065991
* @summary check that when LogManager is initialized, a deadlock similar
* to that described in 8065709 will not occur.
! * @modules java.base/jdk.internal.access
* java.logging
* java.management
* @run main/othervm LogManagerAppContextDeadlock UNSECURE
* @run main/othervm LogManagerAppContextDeadlock SECURE
*
*** 347,357 ****
this.allowAll = allowAll;
// we don't actually need any permission to create our
// FileHandlers because we're passing invalid parameters
// which will make the creation fail...
permissions = new Permissions();
! permissions.add(new RuntimePermission("accessClassInPackage.jdk.internal.misc"));
// these are used for configuring the test itself...
allPermissions = new Permissions();
allPermissions.add(new java.security.AllPermission());
--- 347,357 ----
this.allowAll = allowAll;
// we don't actually need any permission to create our
// FileHandlers because we're passing invalid parameters
// which will make the creation fail...
permissions = new Permissions();
! permissions.add(new RuntimePermission("accessClassInPackage.jdk.internal.access"));
// these are used for configuring the test itself...
allPermissions = new Permissions();
allPermissions.add(new java.security.AllPermission());
< prev index next >