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

ASF GitHub Bot commented on BEAM-1568:
--------------------------------------

GitHub user tedyu opened a pull request:

    https://github.com/apache/beam/pull/2227

    BEAM-1568 neffective null check in IsmFormat#structuralValue

    Add check for record at the beginning of the method.

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

    $ git pull https://github.com/tedyu/beam master

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

    https://github.com/apache/beam/pull/2227.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 #2227
    
----
commit 2326794e59a824dbb72f552034a1c18fae7d11dc
Author: tedyu <[email protected]>
Date:   2017-03-12T03:59:19Z

    BEAM-1568 neffective null check in IsmFormat#structuralValue

----


> Ineffective null check in IsmFormat#structuralValue
> ---------------------------------------------------
>
>                 Key: BEAM-1568
>                 URL: https://issues.apache.org/jira/browse/BEAM-1568
>             Project: Beam
>          Issue Type: Bug
>          Components: runner-dataflow
>            Reporter: Ted Yu
>            Assignee: Davor Bonaci
>            Priority: Minor
>
> {code}
>     public Object structuralValue(IsmRecord<V> record) throws Exception {
>       checkState(record.getKeyComponents().size() == 
> keyComponentCoders.size(),
>           "Expected the number of key component coders %s "
>           + "to match the number of key components %s.",
>           keyComponentCoders.size(), record.getKeyComponents());
>       if (record != null && consistentWithEquals()) {
> {code}
> record is de-referenced before the null check.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to