mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8344233: Remove calls to SecurityManager and doPrivileged in java.net.ProxySelector and sun.net.spi.DefaultProxySelector after JEP 486 integration
Reviewed-by: dfuchs
This commit is contained in:
parent
d2e4b51133
commit
a91d4c022f
4 changed files with 111 additions and 160 deletions
|
@ -28,8 +28,6 @@ package java.net;
|
|||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import sun.security.util.SecurityConstants;
|
||||
|
||||
/**
|
||||
* Selects the proxy server to use, if any, when connecting to the
|
||||
* network resource referenced by a URL. A proxy selector is a
|
||||
|
@ -94,11 +92,6 @@ public abstract class ProxySelector {
|
|||
* @since 1.5
|
||||
*/
|
||||
public static ProxySelector getDefault() {
|
||||
@SuppressWarnings("removal")
|
||||
SecurityManager sm = System.getSecurityManager();
|
||||
if (sm != null) {
|
||||
sm.checkPermission(SecurityConstants.GET_PROXYSELECTOR_PERMISSION);
|
||||
}
|
||||
return theProxySelector;
|
||||
}
|
||||
|
||||
|
@ -114,11 +107,6 @@ public abstract class ProxySelector {
|
|||
* @since 1.5
|
||||
*/
|
||||
public static void setDefault(ProxySelector ps) {
|
||||
@SuppressWarnings("removal")
|
||||
SecurityManager sm = System.getSecurityManager();
|
||||
if (sm != null) {
|
||||
sm.checkPermission(SecurityConstants.SET_PROXYSELECTOR_PERMISSION);
|
||||
}
|
||||
theProxySelector = ps;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue