camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1146771 - /camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
Date Thu, 14 Jul 2011 15:59:36 GMT
Author: davsclaus
Date: Thu Jul 14 15:59:36 2011
New Revision: 1146771

URL: http://svn.apache.org/viewvc?rev=1146771&view=rev
Log:
Avoid potential NPE in createIterator if delimier is null

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java?rev=1146771&r1=1146770&r2=1146771&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java Thu Jul 14
15:59:36 2011
@@ -507,7 +507,7 @@ public final class ObjectHelper {
 
             // this code is optimized to only use a Scanner if needed, eg there is a delimiter
 
-            if (s.contains(delimiter)) {
+            if (delimiter != null && s.contains(delimiter)) {
                 // use a scanner if it contains the delimiter
                 Scanner scanner = new Scanner((String)value);
                 scanner.useDelimiter(delimiter);



Mime
View raw message