-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
test case for serializing custom numbers with config overrides #5198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -161,6 +161,9 @@ public ValueSerializer<Object> createSerializer(SerializationContext ctxt, JavaT | |||
beanDescRef = ctxt.lazyIntrospectBeanDescription(type); | |||
} | |||
} | |||
if (formatOverrides == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like patching a bug further upstream? I'll have to think about this bit more -- after vacation (going on vacation today), so it'll be some time until I get back, but will go through it then.
@@ -323,7 +323,9 @@ protected final ValueSerializer<?> findSerializerByPrimaryType(SerializationCont | |||
return null; | |||
default: | |||
} | |||
return NumberSerializer.instance; | |||
@SuppressWarnings("unchecked") | |||
Class<? extends Number> numberType = (Class<? extends Number>) rawType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would probably work without this part too, but seems more correct to specify handled type as real type, not Number
.
@pjfanning I changed the solution slightly, will now merge. While it seems like override target ideally should be |
Uh oh!
There was an error while loading. Please reload this page.