incubator-agila-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mr...@apache.org
Subject svn commit: r231245 - /incubator/agila/trunk/modules/bpel/common/src/java/org/apache/agila/bpel/common/util/StringUtil.java
Date Wed, 10 Aug 2005 14:31:12 GMT
Author: mriou
Date: Wed Aug 10 07:31:10 2005
New Revision: 231245

URL: http://svn.apache.org/viewcvs?rev=231245&view=rev
Log:
Making sure that an empty object array is returned if the collection is null in the toStringArray(Collection)
method.

Modified:
    incubator/agila/trunk/modules/bpel/common/src/java/org/apache/agila/bpel/common/util/StringUtil.java

Modified: incubator/agila/trunk/modules/bpel/common/src/java/org/apache/agila/bpel/common/util/StringUtil.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/common/src/java/org/apache/agila/bpel/common/util/StringUtil.java?rev=231245&r1=231244&r2=231245&view=diff
==============================================================================
--- incubator/agila/trunk/modules/bpel/common/src/java/org/apache/agila/bpel/common/util/StringUtil.java
(original)
+++ incubator/agila/trunk/modules/bpel/common/src/java/org/apache/agila/bpel/common/util/StringUtil.java
Wed Aug 10 07:31:10 2005
@@ -124,6 +124,7 @@
     }
 
     public static String[] toStringArray(Collection coll) {
+        if (coll == null || coll.size() == 0) return new String[] {};
         String[] array = new String[coll.size()];
         int m = 0;
         for (Iterator arrayIter = coll.iterator(); arrayIter.hasNext();) {



Mime
View raw message