Skip to content

Commit

Permalink
work around for eclipse-ee4j#617
Browse files Browse the repository at this point in the history
  • Loading branch information
ossnms committed Feb 2, 2024
1 parent 6e5b0b1 commit 02dd61f
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,17 @@ private ModelDeserializer<JsonParser> deserializerChainInternal(LinkedList<Type>
models.put(cachedItem, deserializer);
return deserializer;
}

ClassCustomization classCustomization = classModel.getClassCustomization();
Optional<DeserializerBinding<?>> deserializerBinding = userDeserializer(type,
(ComponentBoundCustomization) propertyCustomization);
if (deserializerBinding.isPresent()) {
UserDefinedDeserializer user = new UserDefinedDeserializer(deserializerBinding.get().getJsonbDeserializer(),
JustReturn.instance(), type, classCustomization);
models.put(cachedItem, user);
return user;
}

Optional<AdapterBinding> adapterBinding = adapterBinding(type, (ComponentBoundCustomization) propertyCustomization);
if (adapterBinding.isPresent()) {
AdapterBinding adapter = adapterBinding.get();
Expand Down Expand Up @@ -201,14 +212,6 @@ private ModelDeserializer<JsonParser> createObjectDeserializer(LinkedList<Type>
Class<?> rawType,
CachedItem cachedItem) {
ClassCustomization classCustomization = classModel.getClassCustomization();
Optional<DeserializerBinding<?>> deserializerBinding = userDeserializer(type,
(ComponentBoundCustomization) propertyCustomization);
if (deserializerBinding.isPresent()) {
UserDefinedDeserializer user = new UserDefinedDeserializer(deserializerBinding.get().getJsonbDeserializer(),
JustReturn.instance(), type, classCustomization);
models.put(cachedItem, user);
return user;
}
JsonbCreator creator = classCustomization.getCreator();
boolean hasCreator = creator != null;
List<String> params = hasCreator ? creatorParamsList(creator) : Collections.emptyList();
Expand Down

0 comments on commit 02dd61f

Please sign in to comment.