zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bhallamudi Venkata Siva Kamesh (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-1059) stat command isses on non-existing node causes NPE
Date Wed, 04 May 2011 11:02:03 GMT

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

Bhallamudi Venkata Siva Kamesh commented on ZOOKEEPER-1059:
-----------------------------------------------------------

When stat command is issued with a path,zookeeper returns the stat of node of the given path.If
no such node exists returns null.
{code:title=ZooKeeperMain.java|borderStyle=solid}
stat = zk.exists(path, watch); // Returns null when No node exists of given path
printStat(stat); // When stat is null, this method throws NPE
{code} 

> stat command isses on non-existing node causes NPE 
> ---------------------------------------------------
>
>                 Key: ZOOKEEPER-1059
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1059
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: java client
>    Affects Versions: 3.4.0
>            Reporter: Bhallamudi Venkata Siva Kamesh
>
> *stat* command issues on non existing zookeeper node,causes NPE to the client.
> {noformat}
> [zk: localhost:2181(CONNECTED) 2] stat /invalidPath
> Exception in thread "main" java.lang.NullPointerException
>         at org.apache.zookeeper.ZooKeeperMain.printStat(ZooKeeperMain.java:131)
>         at org.apache.zookeeper.ZooKeeperMain.processZKCmd(ZooKeeperMain.java:723)
>         at org.apache.zookeeper.ZooKeeperMain.processCmd(ZooKeeperMain.java:582)
>         at org.apache.zookeeper.ZooKeeperMain.executeLine(ZooKeeperMain.java:354)
>         at org.apache.zookeeper.ZooKeeperMain.run(ZooKeeperMain.java:312)
>         at org.apache.zookeeper.ZooKeeperMain.main(ZooKeeperMain.java:271)
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message