this.objectResolver = objectResolver == null ? Marshalling.nullObjectResolver() : objectResolver;
final ClassResolver classResolver = config.getClassResolver();
this.classResolver = classResolver == null ? new SimpleClassResolver(getClass().getClassLoader()) : classResolver;
enableReplaceObject(true);
//noinspection ThisEscapedInObjectConstruction
marshaller = new ObjectOutputStreamMarshaller(this);
}