8230415: Avoid redundant permission checking in FilePermissionCollection and SocketPermissionCollection

Reviewed-by: mullan
This commit is contained in:
Ivan Gerasimov 2019-09-27 17:50:09 -07:00
parent 68937e9b9f
commit 680fceb9ba
2 changed files with 2 additions and 2 deletions

View File

@ -1196,7 +1196,7 @@ final class FilePermissionCollection extends PermissionCollection
if ((effective & desired) == desired) {
return true;
}
needed = (desired ^ effective);
needed = (desired & ~effective);
}
}
return false;

View File

@ -1433,7 +1433,7 @@ final class SocketPermissionCollection extends PermissionCollection
if ((effective & desired) == desired) {
return true;
}
needed = (desired ^ effective);
needed = (desired & ~effective);
}
}
return false;