Coerce null strings into empty strings when marshalling.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@505 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: StringArrayFieldMarshaller.java,v 1.1 2001/10/17 02:48:11 mdb Exp $
|
||||
// $Id: StringArrayFieldMarshaller.java,v 1.2 2001/10/19 18:03:28 mdb Exp $
|
||||
|
||||
package com.threerings.presents.dobj.io;
|
||||
|
||||
@@ -26,7 +26,7 @@ public class StringArrayFieldMarshaller implements FieldMarshaller
|
||||
} else {
|
||||
out.writeInt(value.length);
|
||||
for (int i = 0; i < value.length; i++) {
|
||||
out.writeUTF(value[i]);
|
||||
out.writeUTF((value[i] == null) ? "" : value[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ValueMarshaller.java,v 1.5 2001/10/11 04:07:52 mdb Exp $
|
||||
// $Id: ValueMarshaller.java,v 1.6 2001/10/19 18:03:28 mdb Exp $
|
||||
|
||||
package com.threerings.presents.dobj.io;
|
||||
|
||||
@@ -475,7 +475,7 @@ public class ValueMarshaller
|
||||
String[] data = (String[])value;
|
||||
out.writeInt(data.length);
|
||||
for (int i = 0; i < data.length; i++) {
|
||||
out.writeUTF(data[i]);
|
||||
out.writeUTF((data[i] == null) ? "" : data[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user