camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-10253) NullPointer in ThrowExceptionProcessor.getTraceLabel
Date Sun, 21 Aug 2016 09:59:20 GMT

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

ASF GitHub Bot commented on CAMEL-10253:
----------------------------------------

GitHub user micfra opened a pull request:

    https://github.com/apache/camel/pull/1130

    Fix CAMEL-10253: Add check on null

    Provide code as written in https://issues.apache.org/jira/browse/CAMEL-10253

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

    $ git pull https://github.com/micfra/camel CAMEL-10253

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

    https://github.com/apache/camel/pull/1130.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 #1130
    
----
commit 3007d546431dd8dd9d422dac44d53b701c2fd46a
Author: Michael Frankfurter <micfra@micfra.net>
Date:   2016-08-21T09:50:57Z

    Fix CAMEL-10253: Add check on null

----


> NullPointer in ThrowExceptionProcessor.getTraceLabel
> ----------------------------------------------------
>
>                 Key: CAMEL-10253
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10253
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.17.3
>            Reporter: peninou
>            Priority: Minor
>             Fix For: 2.18.0, 2.17.4
>
>
> When using
> {code:title=ProcessorDefinition.java|borderStyle=solid}
>  throwException(Class<? extends Exception> type, String message) 
> {code}
> to define a Exception and having the tracing set to *True* in Camel context, if  an exception
occurred, it will call 
> {code:title=ThrowExceptionProcessor.java|borderStyle=solid}
>   public String getTraceLabel() {
>         return "throwException[" + this.exception.getClass().getSimpleName() + "]";
>     }
> {code}
> But this.exception is null.
> A patch could be:
> {code:title=ThrowExceptionProcessor.java|borderStyle=solid}
>     public String getTraceLabel() {
>         String className= this.exception==null?this.type.getSimpleName():this.exception.getClass().getSimpleName();
>         return "throwException[" + className + "]";
>     }
> {code}
>  



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

Mime
View raw message