瀏覽代碼

SEC-532: small bug-fix

Andrei Stefan 17 年之前
父節點
當前提交
0eff5afc8f
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      core/src/main/java/org/springframework/security/acls/domain/AclImpl.java

+ 2 - 2
core/src/main/java/org/springframework/security/acls/domain/AclImpl.java

@@ -380,7 +380,7 @@ public class AclImpl implements Acl, MutableAcl, AuditableAcl, OwnershipAcl {
         synchronized (aces) {
             int offset = findAceOffset(aceId);
 
-            if (offset == 1) {
+            if (offset == -1) {
                 throw new NotFoundException("Requested ACE ID not found");
             }
 
@@ -395,7 +395,7 @@ public class AclImpl implements Acl, MutableAcl, AuditableAcl, OwnershipAcl {
         synchronized (aces) {
             int offset = findAceOffset(aceId);
 
-            if (offset == 1) {
+            if (offset == -1) {
                 throw new NotFoundException("Requested ACE ID not found");
             }