cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r569468 - /incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
Date Fri, 24 Aug 2007 18:00:14 GMT
Author: dkulp
Date: Fri Aug 24 11:00:14 2007
New Revision: 569468

URL: http://svn.apache.org/viewvc?rev=569468&view=rev
Log:
Minor jaxb collection handling optimization

Modified:
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java?rev=569468&r1=569467&r2=569468&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
(original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
Fri Aug 24 11:00:14 2007
@@ -99,7 +99,7 @@
         
         if (cls != null && cls.isArray() && elValue instanceof Collection)
{
             Collection<?> col = (Collection<?>) elValue;
-            elValue = col.toArray((Object[]) Array.newInstance(cls.getComponentType(), 0));
+            elValue = col.toArray((Object[]) Array.newInstance(cls.getComponentType(), col.size()));
         }
         
         try {



Mime
View raw message