I am using Dozer in a GWT project to copy the DTO UI classes to business
objects. In this process, I have the need to trim all incoming strings to
remove all whitespace on both sides. Rather than invoking trim() on every
string within the business layer, which is prone ot error, I thought to
modify Dozer to do this for me.
Attached is a patch that examplifies this. I basically tried to add
"map-trim-string" to the global configuration, so that by default I can
have it set. Probably this setting should actually be just "trim-strings"
or something, since it does not evaluate if it should be mapped.
The patch was done against 2.4.
Log in to post a comment.