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

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

Github user revans2 commented on the pull request:

    https://github.com/apache/storm/pull/970#issuecomment-168818484
  
    +1


> 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 it may 
> cause NullPointerException.
> 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