You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2009/06/09 08:16:54 UTC
svn commit: r782893 -
/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java
Author: davsclaus
Date: Tue Jun 9 06:16:54 2009
New Revision: 782893
URL: http://svn.apache.org/viewvc?rev=782893&view=rev
Log:
CAMEL-993: Fixed NPE in trace formatter when using SMX
Modified:
camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java
Modified: camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java?rev=782893&r1=782892&r2=782893&view=diff
==============================================================================
--- camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java (original)
+++ camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java Tue Jun 9 06:16:54 2009
@@ -199,7 +199,11 @@
//-------------------------------------------------------------------------
protected Object getBreadCrumbID(Exchange exchange) {
UnitOfWork unitOfWork = exchange.getUnitOfWork();
- return unitOfWork.getId();
+ if (unitOfWork != null) {
+ return unitOfWork.getId();
+ } else {
+ return exchange.getExchangeId();
+ }
}
protected Object getBodyAsString(Message in) {