Changeset 9:8e35e176f946 in rrlib_serialization-java


Ignore:
Timestamp:
19.12.2013 01:56:56 (6 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
default
Phase:
public
Message:

Added ObjectFieldSerializer class and fixed a bug in deep copying of objects via XML

Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • Serialization.java

    r8 r9  
    310310    @SuppressWarnings({ "unchecked", "rawtypes" }) 
    311311    public static <T> T deepCopy(T src, T dest, Factory f) { 
     312        // TODO: This should produce minimal overhead for copyable types 
     313        // TODO: native serialization always causes object creation; if dest is specified, other types of serialization are probably favorable 
     314 
    312315        if (src == null) { 
    313316            return null; 
     
    358361                stream.close(); 
    359362                BinaryInputStream istream = new BinaryInputStream(buf); 
    360                 dest = (T)istream.readObject(dest, type); 
     363                dest = (T)istream.readObject(dest, type, DataEncoding.XML); 
    361364            } else { 
    362365                throw new RuntimeException("Object of type " + src.getClass().getName() + " cannot be deep-copied"); 
Note: See TracChangeset for help on using the changeset viewer.