GitHub user dajac opened a pull request: https://github.com/apache/kafka/pull/786
MINOR: MemoryRecords.sizeInBytes throws NPE when non-writable. I just noticed that `MemoryRecords.sizeInBytes` throws NPE when MemoryRecords is non-writable. `compressor` is explicitly set to null when `writable` is false (L56) at the construction time, for instance when `MemoryRecords.readableRecords` is used. @guozhangwang Could you take a look when you have time? You can merge this pull request into a Git repository by running: $ git pull https://github.com/dajac/kafka kafka-npe Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/786.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 #786 ---- commit 8ac92d992a6b1f0b9e1ce622bc486fdbc2859668 Author: David Jacot <david.ja...@gmail.com> Date: 2016-01-18T17:54:34Z MemoryRecords.sizeInBytes throws NPE when non-writable. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---