Break deserialization out into its own method so that we can override it
elsewhere. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6305 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -319,10 +319,7 @@ public abstract class ConfigRegistry
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ByteArrayInputStream bin =
|
Object deserializedValue = deserialize(value);
|
||||||
new ByteArrayInputStream(StringUtil.unhexlate(value));
|
|
||||||
ObjectInputStream oin = createObjectInputStream(bin);
|
|
||||||
Object deserializedValue = oin.readObject();
|
|
||||||
field.set(object, deserializedValue);
|
field.set(object, deserializedValue);
|
||||||
if (_transitioning) {
|
if (_transitioning) {
|
||||||
// Use serialize rather than serializeAttribute so we don't get
|
// Use serialize rather than serializeAttribute so we don't get
|
||||||
@@ -384,6 +381,17 @@ public abstract class ConfigRegistry
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes the object contained in the specified string.
|
||||||
|
*/
|
||||||
|
protected Object deserialize (String value)
|
||||||
|
throws Exception
|
||||||
|
{
|
||||||
|
ByteArrayInputStream bin = new ByteArrayInputStream(StringUtil.unhexlate(value));
|
||||||
|
ObjectInputStream oin = createObjectInputStream(bin);
|
||||||
|
return oin.readObject();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts a config object field name (someConfigMember) to a configuration key
|
* Converts a config object field name (someConfigMember) to a configuration key
|
||||||
* (some_config_member).
|
* (some_config_member).
|
||||||
|
|||||||
Reference in New Issue
Block a user