[ https://issues.apache.org/jira/browse/ZOOKEEPER-3007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16447132#comment-16447132 ]
Hadoop QA commented on ZOOKEEPER-3007: -------------------------------------- +1 overall. GitHub Pull Request Build +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 3.0.1) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/1614//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/1614//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/1614//console This message is automatically generated. > Potential NPE in ReferenceCountedACLCache#deserialize > ------------------------------------------------------ > > Key: ZOOKEEPER-3007 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3007 > Project: ZooKeeper > Issue Type: Bug > Affects Versions: 3.6.0 > Reporter: lujie > Priority: Major > > Inspired by ZK-3006 , I develop a simple static analysis tool to find other > Potential NPE like ZK-3006. This bug is found by this tool ,and I have > carefully studied it. But i am a newbie at here so i may be wrong, hope > someone could confirm it and help me improve this tool. > h3. Bug describtion: > callee BinaryInputArchive#startVector will return null: > {code:java} > // code placeholder > public Index startVector(String tag) throws IOException { > int len = readInt(tag); > if (len == -1) { > return null; > } > {code} > and caller ReferenceCountedACLCache#deserialize call it without null check > {code:java} > // code placeholder > Index j = ia.startVector("acls"); > while (!j.done()) { > ACL acl = new ACL(); > acl.deserialize(ia, "acl"); > }{code} > but all the other 14 caller of BinaryInputArchive#startVector performs null > checker like: > {code:java} > // code placeholder > Index vidx1 = a_.startVector("acl"); > if (vidx1!= null) > for (; !vidx1.done(); vidx1.incr()){ > ..... > } > } > } > {code} > so i think we also need add null check in caller > ReferenceCountedACLCache#deserialize just like other 14 caller > -- This message was sent by Atlassian JIRA (v7.6.3#76005)