tags:

views:

137

answers:

1

the below url has an example on dozer custom convertors..

http://stackoverflow.com/questions/1931212/map-collection-size-in-dozer

but when i tried that example its giving the exception like this..

Type: null Source parent class: dozerPackage.Source Source field name: images Source field type: class java.util.ArrayList Source field value: [www, eee] Dest parent class: dozerPackage.Destination Dest field name: numOfImages Dest field type: int

org.dozer.MappingException: Destination Type (int) is not accepted by this Custom Converter (dozerPackage.TestCustomFieldConverter)!

is there any way that i can return the primitive types from dozer custom convertors..

+1  A: 

The short answer is no. This feature is not yet implemented. Please use old CustomConverter interface instead of DozerConverter to achieve the desired behavior.

Forum thread is here: https://sourceforge.net/projects/dozer/forums/forum/452531/topic/3698691

Feature Request for tracking is here: https://sourceforge.net/tracker/?func=detail&aid=2997109&group_id=133517&atid=727371

Dmitry Buzdin
This is fixed in trunk and will be published as part of 5.2.2 release this or next week.
Dmitry Buzdin