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

ASF GitHub Bot commented on FLINK-7736:
---------------------------------------

Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4784#discussion_r143407857
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java
 ---
    @@ -448,7 +448,7 @@ public boolean addTask(Task task) throws 
SlotNotFoundException, SlotNotActiveExc
                                throw new 
SlotNotActiveException(task.getJobID(), task.getAllocationId());
                        }
                } else {
    -                   throw new 
SlotNotFoundException(taskSlot.getAllocationId());
    +                   throw new SlotNotFoundException(task.getAllocationId());
    --- End diff --
    
    this is in the else branch of `taskSlot != null`, as in it would always 
fail with a `NullPointerException`. @tillrohrmann 



> Fix some of the alerts raised by lgtm.com
> -----------------------------------------
>
>                 Key: FLINK-7736
>                 URL: https://issues.apache.org/jira/browse/FLINK-7736
>             Project: Flink
>          Issue Type: Improvement
>            Reporter: Malcolm Taylor
>            Assignee: Malcolm Taylor
>
> lgtm.com has identified a number of issues giving scope for improvement in 
> the code: [https://lgtm.com/projects/g/apache/flink/alerts/?mode=list]
> This issue is to address some of the simpler ones. Some of these are quite 
> clear bugs such as off-by-one errors. Others are areas where the code might 
> be made clearer, such as use of a variable name which shadows another 
> variable.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to