Changeset 13:c9a049dc3f73 in rrlib_serialization-java


Ignore:
Timestamp:
04.04.2014 18:44:09 (6 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
default
Phase:
public
Message:

Fix in StringStream.writeObject() to correctly write auto-boxed types

File:
1 edited

Legend:

Unmodified
Added
Removed
  • StringOutputStream.java

    r2 r13  
    128128        if (StringSerializable.class.isAssignableFrom(type)) { 
    129129            ((StringSerializable)object).serialize(this); 
    130         } else if (type.isPrimitive()) { 
     130        } else if (type.isPrimitive() || Number.class.isAssignableFrom(type) || Boolean.class.equals(type)) { 
    131131            append(object.toString()); 
    132132        } else { 
Note: See TracChangeset for help on using the changeset viewer.