if (isCollection){
ChoiceCollectionMapping xmlChoiceCollectionMapping = (ChoiceCollectionMapping) mapping;
if(element.getJavaTypeAdapterClass() != null){
converter.setNestedConverter(new XMLJavaTypeConverter(element.getJavaTypeAdapterClass().getName()));
}else{
CoreConverter originalConverter = xmlChoiceCollectionMapping.getConverter(xmlField);
converter.setNestedConverter(originalConverter);
}
xmlChoiceCollectionMapping.addConverter(xmlField, converter);
} else {
ChoiceObjectMapping xmlChoiceObjectMapping = (ChoiceObjectMapping) mapping;
if(element.getJavaTypeAdapterClass() != null){
converter.setNestedConverter(new XMLJavaTypeConverter(element.getJavaTypeAdapterClass().getName()));
}else{
CoreConverter originalConverter = xmlChoiceObjectMapping.getConverter(xmlField);
converter.setNestedConverter(originalConverter);
}
xmlChoiceObjectMapping.addConverter(xmlField, converter);
}
}