cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From egl...@apache.org
Subject svn commit: r556657 - in /incubator/cxf/trunk: common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringBuilder.java distribution/pom.xml
Date Mon, 16 Jul 2007 15:54:14 GMT
Author: eglynn
Date: Mon Jul 16 08:54:12 2007
New Revision: 556657

URL: http://svn.apache.org/viewvc?view=rev&rev=556657
Log:
Apply patch on behalf of Gary Tully to ensure toString xjc plugin is packaged in CXF distro.


Modified:
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringBuilder.java
    incubator/cxf/trunk/distribution/pom.xml

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringBuilder.java?view=diff&rev=556657&r1=556656&r2=556657
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringBuilder.java
(original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringBuilder.java
Mon Jul 16 08:54:12 2007
@@ -19,6 +19,8 @@
 
 package org.apache.cxf.jaxb;
 
+import java.util.Collection;
+
 import org.apache.commons.lang.builder.ToStringBuilder;
 import org.apache.commons.lang.builder.ToStringStyle;
 
@@ -31,6 +33,12 @@
     }
     
     public static String valueOf(Object object, ToStringStyle style) {
+        if (object instanceof String) {
+            return (String)object;
+        }
+        if (object instanceof Collection) {
+            object = ((Collection) object).toArray();
+        }
         return ToStringBuilder.reflectionToString(object, style);        
     }
 }

Modified: incubator/cxf/trunk/distribution/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/pom.xml?view=diff&rev=556657&r1=556656&r2=556657
==============================================================================
--- incubator/cxf/trunk/distribution/pom.xml (original)
+++ incubator/cxf/trunk/distribution/pom.xml Mon Jul 16 08:54:12 2007
@@ -93,6 +93,11 @@
             <artifactId>cxf-xjc-dv</artifactId>
             <version>${pom.version}</version>
         </dependency>
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>cxf-xjc-ts</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
 
         <dependency>
             <groupId>${pom.groupId}</groupId>



Mime
View raw message