You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Krishnan Chandra (JIRA)" <ji...@apache.org> on 2015/06/03 22:16:38 UTC

[jira] [Commented] (FLUME-2685) Prevent possible NullpointerException in EventHelper.java

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

Krishnan Chandra commented on FLUME-2685:
-----------------------------------------

I've submitted https://reviews.apache.org/r/35022/ for this, should be a fairly straightforward patch.

> Prevent possible NullpointerException in EventHelper.java
> ---------------------------------------------------------
>
>                 Key: FLUME-2685
>                 URL: https://issues.apache.org/jira/browse/FLUME-2685
>             Project: Flume
>          Issue Type: Improvement
>          Components: Master
>    Affects Versions: v1.5.1
>            Reporter: Martin Schäf
>            Priority: Minor
>         Attachments: FLUME-2685.patch
>
>
> In org/apache/flume/event/EventHelper.java
> Line 45 indicates that 'event' can be null but in line 71 it is used anyway (event.getHeaders()).
> Change line 71 to 
> return "{ headers:" + (event==null?"null":event.getHeaders()) + " body:" + buffer + " }";
> instead?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)