cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1090330 - in /cxf/branches/2.3.x-fixes: ./ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ByteType.java
Date Fri, 08 Apr 2011 16:28:53 GMT
Author: dkulp
Date: Fri Apr  8 16:28:53 2011
New Revision: 1090330

URL: http://svn.apache.org/viewvc?rev=1090330&view=rev
Log:
Merged revisions 1090300 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1090300 | cschneider | 2011-04-08 11:32:22 -0400 (Fri, 08 Apr 2011) | 1 line
  
  Remove special case for Integer. The cast from Integer to Byte is not possible
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ByteType.java

Propchange: cxf/branches/2.3.x-fixes/
            ('svn:mergeinfo' removed)

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.3.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ByteType.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ByteType.java?rev=1090330&r1=1090329&r2=1090330&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ByteType.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ByteType.java
Fri Apr  8 16:28:53 2011
@@ -36,12 +36,8 @@ public class ByteType extends AegisType 
 
     @Override
     public void writeObject(Object object, MessageWriter writer, Context context) {
-        if (object instanceof Integer) {
-            writer.writeValueAsByte((Byte)object);
-        } else {
-            int intValue = ((Number)object).intValue();
-            byte byteValue = (byte)(intValue & 0xff);
-            writer.writeValueAsByte(new Byte(byteValue));
-        }
+        int intValue = ((Number)object).intValue();
+        byte byteValue = (byte)(intValue & 0xff);
+        writer.writeValueAsByte(new Byte(byteValue));
     }
 }



Mime
View raw message