cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dand...@apache.org
Subject svn commit: r530656 - in /incubator/cxf/trunk: common/common/src/main/java/org/apache/cxf/common/util/Base64Utility.java rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/Base64Type.java
Date Fri, 20 Apr 2007 05:42:19 GMT
Author: dandiep
Date: Thu Apr 19 22:42:18 2007
New Revision: 530656

URL: http://svn.apache.org/viewvc?view=rev&rev=530656
Log:
Fix base64 test failure.

Modified:
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/Base64Utility.java
    incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/Base64Type.java

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/Base64Utility.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/Base64Utility.java?view=diff&rev=530656&r1=530655&r2=530656
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/Base64Utility.java
(original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/Base64Utility.java
Thu Apr 19 22:42:18 2007
@@ -219,7 +219,7 @@
                                      int o,
                                      int l) {
         if (l <= 0) {
-            return new char[0];
+            return null;
         }
 
         char[] out;

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/Base64Type.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/Base64Type.java?view=diff&rev=530656&r1=530655&r2=530656
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/Base64Type.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/Base64Type.java
Thu Apr 19 22:42:18 2007
@@ -115,6 +115,8 @@
 
         byte[] data = (byte[])object;
 
-        writer.writeValue(Base64Utility.encode(data));
+        if (data != null && data.length > 0) {
+            writer.writeValue(Base64Utility.encode(data));
+        }
     }
 }



Mime
View raw message