GitHub user djhworld opened a pull request:

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

    [BEAM-2807] Fixes NPE exception on CoderTypeSerializerConfigSnapshot 
serialization

    Follow this checklist to help us incorporate your contribution quickly and 
easily:
    
     - [x] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/projects/BEAM/issues/) filed for the 
change (usually before you start working on it).  Trivial changes like typos do 
not require a JIRA issue.  Your pull request should address just this issue, 
without pulling in other changes.
     - [x] Each commit in the pull request should have a meaningful subject 
line and body.
     - [x] Format the pull request title like `[BEAM-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA 
issue.
     - [x] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
     - [x] Run `mvn clean verify` to make sure basic checks pass. A more 
thorough check will be performed on your pull request automatically.
     - [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
    
    ---
    
    https://issues.apache.org/jira/browse/BEAM-2807
    
    When a Coder is created as an anonymous class, passing it to 
`CoderTypeSerializer` will cause a NullPointerException when the `write` call 
is called on `CoderTypeSerializerConfigSnapshot` 
    
    This is because the `coderName` field is being set by calling 
`getCanonicalName`, which will always return `null` for anonymous classes. 
    
    *Note*: I am not sure if this change is destructive or not, but it appears 
to me the `coderName` is just metadata that is written to the stream, and is 
not used for anything else? 

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

    $ git pull https://github.com/djhworld/beam BEAM-2807

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

    https://github.com/apache/beam/pull/3826.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 #3826
    
----
commit 85f855418f0b1998237bde4eee81ebdbbaea6041
Author: djhworld <[email protected]>
Date:   2017-09-08T21:09:14Z

    BEAM-2807 -> Fixed NPE error on CoderTypeSerializerConfigSnapshot 
serialization

commit adbb5d328743c45e9581b583e054390f611e7f98
Author: djhworld <[email protected]>
Date:   2017-09-08T21:13:00Z

    BEAM-2807 -> Removed system.out

commit 9f344676d9a6d7dba4a22de119286bf3cad115fc
Author: djhworld <[email protected]>
Date:   2017-09-08T21:18:33Z

    BEAM-2807 -> Removed comment

----


---

Reply via email to