Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1308

Guaranteed NPE in WriteLock recipe

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Invalid
    • None
    • None
    • recipes
    • None

    Description

              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);
                      }
      

      ZNodeName will throw an NPE if id is null.

      Attachments

        Activity

          People

            Unassigned Unassigned
            markrmiller@gmail.com Mark Miller
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: