camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-10253) NullPointer in ThrowExceptionProcessor.getTraceLabel
Date Sun, 21 Aug 2016 10:46:20 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-10253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen resolved CAMEL-10253.
---------------------------------
       Resolution: Fixed
         Assignee: Claus Ibsen
    Fix Version/s: 2.16.4

> 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
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.16.4, 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