This commit is contained in:
wentch
2015-12-23 12:39:04 +08:00
parent db9a898dfe
commit 739762ad38

View File

@@ -26,9 +26,10 @@ public final class AnyEncoder<T> implements Encodeable<Writer, T> {
@SuppressWarnings("unchecked")
public void convertTo(final Writer out, final T value) {
if (value == null) {
out.wirteClassName(null);
out.writeNull();
} else {
out.wirteClassName(factory.getEntity(value.getClass()));
out.wirteClassName(factory.getEntity(value.getClass()));
factory.loadEncoder(value.getClass()).convertTo(out, value);
}
}