Update runtime handler usage rules in RuntimeDelegatingTypeHandler
@@ -86,13 +86,14 @@ public PersistedData serializeNonNull(T value, PersistedDataSerializer serialize
return typeHandler;
}
- if (!isDefaultTypeHandler(typeHandler)) {
- if (typeHandler.getClass().equals(delegateHandler.getClass())) {
- // Both handlers are of same type, use delegateHandler which
- // might have more info
+ if (!(typeHandler instanceof ObjectFieldMapTypeHandler) &&
+ typeHandler.getClass().equals(delegateHandler.getClass())) {
+ // Both handlers are of same type and will do the same thing,
+ // use delegateHandler which might have more info
return delegateHandler;
}
+ if (!isDefaultTypeHandler(typeHandler)) {
// Custom handler for runtime type
return typeHandler;
}
