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

ASF GitHub Bot commented on STORM-1412:
---------------------------------------

GitHub user vesense opened a pull request:

    https://github.com/apache/storm/pull/970

    [STORM-1412] null check should be done in the first place

    https://issues.apache.org/jira/browse/STORM-1412

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

    $ git pull https://github.com/vesense/storm patch-17

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

    https://github.com/apache/storm/pull/970.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 #970
    
----
commit 7ee350cdb479320885435386e8b77ec93240f57e
Author: Xin Wang <[email protected]>
Date:   2015-12-23T08:56:56Z

    null check should be done in the first place

----


> Null check should be done in the first place
> --------------------------------------------
>
>                 Key: STORM-1412
>                 URL: https://issues.apache.org/jira/browse/STORM-1412
>             Project: Apache Storm
>          Issue Type: Bug
>          Components: storm-core
>            Reporter: Xin Wang
>            Assignee: Xin Wang
>
> Null check should be done in the first place for class User, otherwise we may 
> get a NPE.
> before fix:
> {code}
>      private void moveTopology(TopologyDetails topo, Set<TopologyDetails> 
> src, String srcName, Set<TopologyDetails> dest, String destName) {
>          LOG.debug("For User {} Moving topo {} from {} to {}", this.userId, 
> topo.getName(), srcName, destName);
>          if (topo == null) {
>              return;
>          }
> {code}
> after fix:
> {code}
>     private void moveTopology(TopologyDetails topo, Set<TopologyDetails> src, 
> String srcName, Set<TopologyDetails> dest, String destName) {
>         if (topo == null) {
>             return;
>         }
>         LOG.debug("For User {} Moving topo {} from {} to {}", this.userId, 
> topo.getName(), srcName, destName);
> {code}



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

Reply via email to