zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-2804) Node creation fails with NPE if ACLs are null
Date Sat, 10 Jun 2017 20:28:18 GMT

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-2804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16045684#comment-16045684
] 

ASF GitHub Bot commented on ZOOKEEPER-2804:
-------------------------------------------

GitHub user jainbhupendra24 opened a pull request:

    https://github.com/apache/zookeeper/pull/279

    ZOOKEEPER-2804:Node creation fails with NPE if ACLs are null

    1) Handled Null case in server. Client will get InvalidACLException 
    2) Handled null check in create and setACL APIs in client side. as per their javadoc 
    @throws KeeperException.InvalidACLException if the ACL is invalid, null, or empty
    3) Not handling any validation for async API of create and setACL in this JIRA because
these API doesn't throw KeeperException explicitly. So can not throw InvalidACLException from
Client.  If we throw IllegalArgumentException then it will not be consistent with other sync
APIs.  So Let server throw InvalidACLException for async API.
    
    
    Please review and provide suggestion. 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jainbhupendra24/zookeeper ZOOKEEPER-2804-new

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zookeeper/pull/279.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #279
    
----
commit 9deacdabc061b95b24242a6bc557b7ee031bdf9e
Author: bhupendra jain <bhupendra.jain@huawei.com>
Date:   2017-06-10T20:16:44Z

    ZOOKEEPER-2804:Node creation fails with NPE if ACLs are null

----


> Node creation fails with NPE if ACLs are null
> ---------------------------------------------
>
>                 Key: ZOOKEEPER-2804
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2804
>             Project: ZooKeeper
>          Issue Type: Bug
>            Reporter: Bhupendra Kumar Jain
>
> If null ACLs are passed then zk node creation or set ACL fails with NPE
> {code}
> java.lang.NullPointerException
> 	at org.apache.zookeeper.server.PrepRequestProcessor.removeDuplicates(PrepRequestProcessor.java:1301)
> 	at org.apache.zookeeper.server.PrepRequestProcessor.fixupACL(PrepRequestProcessor.java:1341)
> 	at org.apache.zookeeper.server.PrepRequestProcessor.pRequest2Txn(PrepRequestProcessor.java:519)
> 	at org.apache.zookeeper.server.PrepRequestProcessor.pRequest(PrepRequestProcessor.java:1126)
> 	at org.apache.zookeeper.server.PrepRequestProcessor.run(PrepRequestProcessor.java:178)
> {code}
> Expected to handle null in server and return proper error code to client



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message