< prev index next >
src/java.base/share/classes/java/net/SocketPermission.java
Print this page
*** 1192,1202 ****
* Check the system/security property for the ephemeral port range
* for this system. The suffix is either "high" or "low"
*/
private static int initEphemeralPorts(String suffix, int defval) {
return AccessController.doPrivileged(
! new PrivilegedAction<Integer>(){
public Integer run() {
int val = Integer.getInteger(
"jdk.net.ephemeralPortRange."+suffix, -1
);
if (val != -1) {
--- 1192,1202 ----
* Check the system/security property for the ephemeral port range
* for this system. The suffix is either "high" or "low"
*/
private static int initEphemeralPorts(String suffix, int defval) {
return AccessController.doPrivileged(
! new PrivilegedAction<>(){
public Integer run() {
int val = Integer.getInteger(
"jdk.net.ephemeralPortRange."+suffix, -1
);
if (val != -1) {
*** 1326,1336 ****
* Create an empty SocketPermissions object.
*
*/
public SocketPermissionCollection() {
! perms = new ArrayList<SocketPermission>();
}
/**
* Adds a permission to the SocketPermissions. The key for the hash is
* the name in the case of wildcards, or all the IP addresses.
--- 1326,1336 ----
* Create an empty SocketPermissions object.
*
*/
public SocketPermissionCollection() {
! perms = new ArrayList<>();
}
/**
* Adds a permission to the SocketPermissions. The key for the hash is
* the name in the case of wildcards, or all the IP addresses.
*** 1464,1472 ****
ObjectInputStream.GetField gfields = in.readFields();
// Get the one we want
@SuppressWarnings("unchecked")
Vector<SocketPermission> permissions = (Vector<SocketPermission>)gfields.get("permissions", null);
! perms = new ArrayList<SocketPermission>(permissions.size());
perms.addAll(permissions);
}
}
--- 1464,1472 ----
ObjectInputStream.GetField gfields = in.readFields();
// Get the one we want
@SuppressWarnings("unchecked")
Vector<SocketPermission> permissions = (Vector<SocketPermission>)gfields.get("permissions", null);
! perms = new ArrayList<>(permissions.size());
perms.addAll(permissions);
}
}
< prev index next >