mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8344216: Remove calls to SecurityManager and and doPrivileged in java.net.Authenticator, java.net.CookieHandler, and java.net.ResponseCache after JEP 486 integration
Reviewed-by: dfuchs
This commit is contained in:
parent
f62e05ee96
commit
73fd8919f5
4 changed files with 1 additions and 86 deletions
|
@ -28,7 +28,6 @@ package java.net;
|
|||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import sun.security.util.SecurityConstants;
|
||||
|
||||
/**
|
||||
* A CookieHandler object provides a callback mechanism to hook up a
|
||||
|
@ -73,11 +72,6 @@ public abstract class CookieHandler {
|
|||
* @see #setDefault(CookieHandler)
|
||||
*/
|
||||
public static synchronized CookieHandler getDefault() {
|
||||
@SuppressWarnings("removal")
|
||||
SecurityManager sm = System.getSecurityManager();
|
||||
if (sm != null) {
|
||||
sm.checkPermission(SecurityConstants.GET_COOKIEHANDLER_PERMISSION);
|
||||
}
|
||||
return cookieHandler;
|
||||
}
|
||||
|
||||
|
@ -91,11 +85,6 @@ public abstract class CookieHandler {
|
|||
* @see #getDefault()
|
||||
*/
|
||||
public static synchronized void setDefault(CookieHandler cHandler) {
|
||||
@SuppressWarnings("removal")
|
||||
SecurityManager sm = System.getSecurityManager();
|
||||
if (sm != null) {
|
||||
sm.checkPermission(SecurityConstants.SET_COOKIEHANDLER_PERMISSION);
|
||||
}
|
||||
cookieHandler = cHandler;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue