Guaranteed NPE in WriteLock recipe
----------------------------------
Key: ZOOKEEPER-1308
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1308
Project: ZooKeeper
Issue Type: Bug
Components: recipes
Reporter: Mark Miller
Priority: Minor
{code}
public boolean execute() throws KeeperException, InterruptedException {
do {
if (id == null) {
long sessionId = zookeeper.getSessionId();
String prefix = "x-" + sessionId + "-";
// lets try look up the current ID if we failed
// in the middle of creating the znode
findPrefixInChildren(prefix, zookeeper, dir);
idName = new ZNodeName(id);
}
{code}
ZNodeName will throw an NPE if id is null.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira