Skip to content

Commit

Permalink
8230415: Avoid redundant permission checking in FilePermissionCollect…
Browse files Browse the repository at this point in the history
…ion and SocketPermissionCollection

Reviewed-by: mullan
  • Loading branch information
Ivan Gerasimov committed Sep 28, 2019
1 parent 68937e9 commit 680fceb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/java.base/share/classes/java/io/FilePermission.java
Expand Up @@ -1196,7 +1196,7 @@ public boolean implies(Permission permission) {
if ((effective & desired) == desired) {
return true;
}
needed = (desired ^ effective);
needed = (desired & ~effective);
}
}
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/java.base/share/classes/java/net/SocketPermission.java
Expand Up @@ -1433,7 +1433,7 @@ public boolean implies(Permission permission)
if ((effective & desired) == desired) {
return true;
}
needed = (desired ^ effective);
needed = (desired & ~effective);
}
}
return false;
Expand Down

0 comments on commit 680fceb

Please sign in to comment.