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

ASF GitHub Bot commented on FALCON-2073:
----------------------------------------

GitHub user yzheng-hortonworks opened a pull request:

    https://github.com/apache/falcon/pull/223

    FALCON-2073 Handle with NULL corner case

    Changes:
    1. EntityGraph::getDependents should return empty list instead of NULL 
value if there is no dependent entities. Affected method include 
OozieWorkflowEngine::updateDependant and 
AbstractEntityManager::getDependencies. Also removed unnecessary existing NULL 
checks after the change.
    2. In LogProvider::populateActionLogUrls, handle with the NULL case where 
there is no file status under the specified path.
    3. FalconClient::getDependency should return empty list instead of NULL 
value if there is no dependent entities. Affected method include 
FalconEntityCLI::entityCommand.
    
    Extra minor changes in this patch:
    4. A regular expression misusage in LogProvider::getActionName. To match 
special character ".", should use "[.]" instead of "." which will try to match 
any character.
    5. Fix a rat check error in Falcon CLI due to the introduction of Spring 
shell commands.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/yzheng-hortonworks/falcon FALCON-2073

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/falcon/pull/223.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #223
    
----
commit c69f9a4b9f13f957611d2da6eca423b6fc07fc64
Author: yzheng-hortonworks <yzh...@hortonworks.com>
Date:   2016-07-12T21:23:29Z

    FALCON-2073 Handle with NULL corner case

----


> Handle with NULL corner cases
> -----------------------------
>
>                 Key: FALCON-2073
>                 URL: https://issues.apache.org/jira/browse/FALCON-2073
>             Project: Falcon
>          Issue Type: Bug
>            Reporter: Ying Zheng
>            Assignee: Ying Zheng
>
> Coverity scan finds a few places where the return value of an object could be 
> NULL but Falcon tries to access its member without handling with the corner 
> NULL case. For example, cluster update could run into an error if there is no 
> dependent entity for the cluster, see OozieWorkflowEngine::updateDependents:
> {code}
>         Set<Entity> affectedEntities = 
> EntityGraph.get().getDependents(oldEntity);
>         for (Entity affectedEntity : affectedEntities) {
>                  ......
>         }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to