Your suggestion sounds plausible, but to fix it, as well as to guard
against regression, it would be necessary to have a way to reproduce the
problem.
So if there is any way you could suggest a way to trigger the problem that
would be great.

Exception, however, would seem to indicate some other kind of problem...
either way it would be good to figure out what is going wrong.

-+ Tatu +-



On Thu, Aug 11, 2016 at 8:33 AM, JonyD <joaondi...@gmail.com> wrote:

> In https://github.com/FasterXML/jackson-databind/
> blob/master/src/main/java/com/fasterxml/jackson/databind/
> AnnotationIntrospector.java
> the method findSerializationType is deprecated since v2.7 and returns
> always null.
> The method refineSerializationType (which is the new method that should be
> used instead of findSerializationType) uses/calls the findSerializationType
> in some parts with logic [if(... ].
> I think this makes refineSerializationType broken.
>
> I get the following exception in a custom Serialization:
> com.fasterxml.jackson.databind.JsonMappingException: Can not refine
> serialization key type [simple type, class java.util.Currency] into java.
> lang.String; types not related
>         at com.fasterxml.jackson.databind.AnnotationIntrospector.refine
> SerializationType(AnnotationIntrospector.java:891)
>         at com.fasterxml.jackson.databind.ser.PropertyBuilder.findSeria
> lizationType(PropertyBuilder.java:188)
>         at com.fasterxml.jackson.databind.ser.PropertyBuilder.buildWriter(
> PropertyBuilder.java:75)
>         at com.fasterxml.jackson.databind.ser.BeanSerializerFactory._
> constructWriter(BeanSerializerFactory.java:818)
>         at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.fin
> dBeanProperties(BeanSerializerFactory.java:609)
>         at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.con
> structBeanSerializer(BeanSerializerFactory.java:390)
>         at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.fin
> dBeanSerializer(BeanSerializerFactory.java:273)
>         at com.fasterxml.jackson.databind.ser.BeanSerializerFactory._
> createSerializer2(BeanSerializerFactory.java:225)
>         at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.cre
> ateSerializer(BeanSerializerFactory.java:159)
>         at com.fasterxml.jackson.databind.SerializerProvider._
> createUntypedSerializer(SerializerProvider.java:1272)
>         at com.fasterxml.jackson.databind.SerializerProvider._
> createAndCacheUntypedSerializer(SerializerProvider.java:1222)
>         at com.fasterxml.jackson.databind.SerializerProvider.findValueS
> erializer(SerializerProvider.java:499)
>         at com.fasterxml.jackson.databind.SerializerProvider.findTypedV
> alueSerializer(SerializerProvider.java:697)
>         at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.
> serializeValue(DefaultSerializerProvider.java:270)
>         at com.fasterxml.jackson.databind.ObjectMapper._
> configAndWriteValue(ObjectMapper.java:3672)
>         at com.fasterxml.jackson.databind.ObjectMapper.writeValue(Objec
> tMapper.java:3030)
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "jackson-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jackson-user+unsubscr...@googlegroups.com.
> To post to this group, send email to jackson-user@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jackson-user+unsubscr...@googlegroups.com.
To post to this group, send email to jackson-user@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to