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 2010/06/30 09:59:31 UTC
svn commit: r959222 -
/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
Author: davsclaus
Date: Wed Jun 30 07:59:31 2010
New Revision: 959222
URL: http://svn.apache.org/viewvc?rev=959222&view=rev
Log:
Dont try to convert null property
Modified:
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java?rev=959222&r1=959221&r2=959222&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java Wed Jun 30 07:59:31 2010
@@ -127,6 +127,9 @@ public final class DefaultExchange imple
public <T> T getProperty(String name, Class<T> type) {
Object value = getProperty(name);
+ if (value == null) {
+ return null;
+ }
// eager same instance type test to avoid the overhead of invoking the type converter
// if already same type
@@ -139,6 +142,9 @@ public final class DefaultExchange imple
public <T> T getProperty(String name, Object defaultValue, Class<T> type) {
Object value = getProperty(name, defaultValue);
+ if (value == null) {
+ return null;
+ }
// eager same instance type test to avoid the overhead of invoking the type converter
// if already same type