ソースを参照

ZOOKEEPER-489. When create a znode, a NULL ACL parameter cannot be accepted. (breed via mahadev)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/zookeeper/trunk@907830 13f79535-47bb-0310-9956-ffa450edef68
Mahadev Konar 15 年 前
コミット
d7b6d49174

+ 3 - 0
CHANGES.txt

@@ -215,6 +215,9 @@ BUGFIXES:
   ZOOKEEPER-495. c client logs an invalid error when zookeeper_init is called
   with chroot (phunt via mahadev)
 
+  ZOOKEEPER-489. When create a znode, a NULL ACL parameter cannot be accepted.
+  (breed via mahadev)
+
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to
   "socket reuse" and failure to close client (phunt via mahadev)

+ 3 - 5
src/c/include/zookeeper.h

@@ -600,8 +600,7 @@ ZOOAPI int zoo_state(zhandle_t *zh);
  * separating ancestors of the node.
  * \param value The data to be stored in the node.
  * \param valuelen The number of bytes in data.
- * \param acl The initial ACL of the node. If null, the ACL of the parent will be
- *    used.
+ * \param acl The initial ACL of the node. The ACL must not be null or empty.
  * \param flags this parameter can be set to 0 for normal create or an OR
  *    of the Create Flags
  * \param completion the routine to invoke when the request completes. The completion
@@ -1055,9 +1054,8 @@ ZOOAPI void zoo_deterministic_conn_order(int yesOrNo);
  * separating ancestors of the node.
  * \param value The data to be stored in the node.
  * \param valuelen The number of bytes in data. To set the data to be NULL use
-  * value as NULL and valuelen as -1.
- * \param acl The initial ACL of the node. If null, the ACL of the parent will be
- *    used.
+ * value as NULL and valuelen as -1.
+ * \param acl The initial ACL of the node. The ACL must not be null or empty.
  * \param flags this parameter can be set to 0 for normal create or an OR
  *    of the Create Flags
  * \param path_buffer Buffer which will be filled with the path of the

+ 1 - 1
src/java/main/org/apache/zookeeper/ZooKeeper.java

@@ -608,7 +608,7 @@ public class ZooKeeper {
      *                and/or sequential
      * @return the actual path of the created node
      * @throws KeeperException if the server returns a non-zero error code
-     * @throws KeeperException.InvalidACLException if the ACL is invalid
+     * @throws KeeperException.InvalidACLException if the ACL is invalid, null, or empty
      * @throws InterruptedException if the transaction is interrupted
      * @throws IllegalArgumentException if an invalid path is specified
      */