Benjamin Reed commented on ZOOKEEPER-16:

We could throw an IllegalArgumentException, then the API wouldn't be a problem. 
Arguably an invalid path is along the same lines as a null pointer. (Especially 
given that a null path is an invalid case.)

If we want to make it a checked exception we should throw BadArgumentException 
and not KeeperException. The async methods have the nice property that you 
don't have to worry about KeeperExceptions happening. Any exceptions will come 
through the callback. It is a pain to have to handle exceptions in two places: 
once when you make the call and again when you get the callback.

> Need to do path validation
> --------------------------
>                 Key: ZOOKEEPER-16
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-16
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: c client, java client, server
>            Reporter: Patrick Hunt
>            Assignee: Patrick Hunt
>             Fix For: 3.1.0
>         Attachments: ZOOKEEPER-16.patch
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1963141&group_id=209147&atid=1008544

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to