Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jan 28, 2014
1 parent a151fc0 commit 75a9738
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions release-notes/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Version: 2.3.2 (xx-xxx-2014)
#379: Fix a problem with (re)naming of Creator properties; needed to make
Paranamer module work with NamingStrategy.
(reported by Chris P, cpilsworth@github)
- Added `BeanSerializerBase._serializeObjectId()` needed by modules that
override standard BeanSerializer; specifically, XML module.

------------------------------------------------------------------------
=== History: ===
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.ObjectIdGenerator;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;

import com.fasterxml.jackson.core.*;

import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.introspect.Annotated;
import com.fasterxml.jackson.databind.introspect.AnnotatedMember;
Expand Down Expand Up @@ -581,6 +579,20 @@ protected final void _serializeWithObjectId(Object bean,
w.serializer.serialize(id, jgen, provider);
return;
}
_serializeObjectId(bean, jgen, provider, typeSer, objectId);
}

/**
* Overridable helper method added to make XML module work better with
* Object id handling.
*
* @since 2.3.2
*/
protected void _serializeObjectId(Object bean,
JsonGenerator jgen,SerializerProvider provider,
TypeSerializer typeSer, WritableObjectId objectId)
throws IOException, JsonProcessingException, JsonGenerationException {
final ObjectIdWriter w = _objectIdWriter;
String typeStr = (_typeId == null) ? null :_customTypeId(bean);
if (typeStr == null) {
typeSer.writeTypePrefixForObject(bean, jgen);
Expand Down

0 comments on commit 75a9738

Please sign in to comment.