Skip to content

Commit

Permalink
MOD: 优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
idglirongqian committed May 11, 2022
1 parent a9f904a commit 5ebee79
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,15 +255,14 @@ private void updateAllUserPolicySet() {
private boolean existUserPolicy(String user) {
readLock();
try {
boolean exist = false;
for (Map<String, Policy> policies : dbIdToMergePolicyMap.values()) {
for (Policy policy : policies.values()) {
if (policy.getUser().getQualifiedUser().equals(user)) {
return true;
}
}
}
return exist;
return false;
} finally {
readUnlock();
}
Expand Down

0 comments on commit 5ebee79

Please sign in to comment.