kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaofeng...@apache.org
Subject [2/2] kylin git commit: KYLIN-2778 avoid NPE in AclService.java
Date Mon, 07 Aug 2017 14:34:16 GMT
KYLIN-2778 avoid NPE in AclService.java


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/714b2251
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/714b2251
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/714b2251

Branch: refs/heads/master
Commit: 714b225122bd6686ef6e1c1d7075bc662b5a6eb2
Parents: 4f16f1c
Author: shaofengshi <shaofengshi@apache.org>
Authored: Mon Aug 7 22:20:08 2017 +0800
Committer: shaofengshi <shaofengshi@apache.org>
Committed: Mon Aug 7 22:34:09 2017 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/kylin/rest/service/AclService.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/714b2251/server-base/src/main/java/org/apache/kylin/rest/service/AclService.java
----------------------------------------------------------------------
diff --git a/server-base/src/main/java/org/apache/kylin/rest/service/AclService.java b/server-base/src/main/java/org/apache/kylin/rest/service/AclService.java
index 79ed4aa..fe31bd9 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/service/AclService.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/service/AclService.java
@@ -151,9 +151,9 @@ public class AclService implements MutableAclService {
             for (ObjectIdentity oid : oids) {
                 AclRecord record = aclStore.getResource(getQueryKeyById(String.valueOf(oid.getIdentifier())),
                         AclRecord.class, SERIALIZER);
-                if (record != null) {
+                if (record != null && record.getOwnerInfo() != null) {
                     SidInfo owner = record.getOwnerInfo();
-                    Sid ownerSid = (null == owner) ? null : (owner.isPrincipal() ? new PrincipalSid(owner.getSid())
: new GrantedAuthoritySid(owner.getSid()));
+                    Sid ownerSid = owner.isPrincipal() ? new PrincipalSid(owner.getSid())
: new GrantedAuthoritySid(owner.getSid());
                     boolean entriesInheriting = record.isEntriesInheriting();
 
                     Acl parentAcl = null;


Mime
View raw message