You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2018/04/16 12:25:00 UTC

[jira] [Commented] (HBASE-20419) Fix potential NPE in ZKUtil#listChildrenAndWatchForNewChildren callers

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

Hudson commented on HBASE-20419:
--------------------------------

Results for branch master
	[build #301 on builds.a.o|https://builds.apache.org/job/HBase%20Nightly/job/master/301/]: (x) *{color:red}-1 overall{color}*
----
details (if available):

(/) {color:green}+1 general checks{color}
-- For more information [see general report|https://builds.apache.org/job/HBase%20Nightly/job/master/301//General_Nightly_Build_Report/]




(x) {color:red}-1 jdk8 hadoop2 checks{color}
-- For more information [see jdk8 (hadoop2) report|https://builds.apache.org/job/HBase%20Nightly/job/master/301//JDK8_Nightly_Build_Report_(Hadoop2)/]


(x) {color:red}-1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3) report|https://builds.apache.org/job/HBase%20Nightly/job/master/301//JDK8_Nightly_Build_Report_(Hadoop3)/]


(/) {color:green}+1 source release artifact{color}
-- See build output for details.


> Fix potential NPE in ZKUtil#listChildrenAndWatchForNewChildren callers
> ----------------------------------------------------------------------
>
>                 Key: HBASE-20419
>                 URL: https://issues.apache.org/jira/browse/HBASE-20419
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 1.4.1, 2.0.0-beta-2, 1.1.13
>            Reporter: lujie
>            Assignee: lujie
>            Priority: Major
>             Fix For: 3.0.0, 2.1.0
>
>         Attachments: HBASE-20419.v3.patch, HBASE-20419_1.patch, HBASE-20419_2.patch
>
>
> We have developed a static analysis tool [NPEDetector|https://github.com/lujiefsi/NPEDetector] to find some potential NPE. Our analysis shows that some callees may return null in corner case(e.g. node crash , IO exception), some of their callers have  _!=null_ check but some do not have.  For example:
> Callee ZKUtil#listChildrenAndWatchForNewChildren may return null, it has 8 callers, 6 of the caller have null checker like:
> {code:java}
> List<String> children = ZKUtil.listChildrenAndWatchForNewChildren(zkw, zkw.znodePaths.rsZNode);
> if (children == null) {
>     return Collections.emptyList();
> }
> {code}
> but another two callers do not have null checker:RSGroupInfoManagerImpl#retrieveGroupListFromZookeeper,ZKProcedureMemberRpcs#watchForAbortedProcedures. 
> We attach the patch to fix this problem.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)