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

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

GitHub user 1m2c3t4 opened a pull request:

    https://github.com/apache/flink/pull/4784

    FLINK-7736: fix some lgtm.com alerts

    
    ## What is the purpose of the change
    
    lgtm.com performs deep analysis on more than 50,000 open source projects 
including many of the apache projects, identifying bugs and other opportunities 
for improvement of the code. This PR addresses 14 of the more straightforward 
ones found (see https://issues.apache.org/jira/browse/FLINK-7736 for details)
    
    
    ## Brief change log
    
    Fixed the following alerts:
    
    1) dereferenced variable is always null, in TaskSlotTable
    2-3) array index out of bounds, in KVStateRequestSerializer and Utils
    4) inconsistent equals and hashCode, in ArchivedJson
    5-6) close input, in JarListHandler and SocketTextStreamFunction
    7) close output, in JarFileCreator
    8) unused format argument, in YarnApplicationMasterRunner
    9) useless type test, in GroupReduceNode
    10-11) useless comparison, in TaskExecutor and FieldAccessor
    12-14) Result of integer multiplication cast to long, in MemoryManager and 
twice in InPlaceMutableHashTable
    
    Also added a new test
    
    ## Verifying this change
    
    This change added tests and can be verified as follows:
    
      - *Added test that verifies that hashCode and equals are consistent in 
ArchivedJson
    
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): no
      - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
      - The serializers: no
      - The runtime per-record code paths (performance sensitive): no
      - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: no
    
    ## Documentation
    
      - Does this pull request introduce a new feature? no
      - If yes, how is the feature documented? not applicable
    


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

    $ git pull https://github.com/1m2c3t4/flink flink-7736

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

    https://github.com/apache/flink/pull/4784.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 #4784
    
----
commit 00801f9881a2a82411b77aff9e76e9a506f2bc71
Author: Malcolm Taylor <malc...@semmle.com>
Date:   2017-10-08T07:06:17Z

    flink-7736: fix some lgtm.com alerts

----


> 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