mapstruct/mapstruct — pull request #199 by timoe (2014-04-10 18:20:10+00:00)
Title: #75 integrated string to joda-time conversion

Take a look at this pull request. There are two things that could be done better
1. org.mapstruct.ap.conversion.JodaTypeToStringConversion takes a Class as a constructor parameter. I introduced that as converting Jodas DateTime, LocalDateTime etc. needs some kind of default pattern (I think). These default patterns are created by JodaTypeToStringConversion#formatStyle which differentiates between types and creates a format style for pattern generation. For DateTime it uses "LL" for formatting date and time "long" style. For LocalDate "L-" is used which skips time formatting (as there is no time in LocalDate). So, from that point of view it would be nice to have some kind of source type in ConversionContext.

2. I don´t like the org.mapstruct.Mapping#dateFormat field as it something specific for date conversion. It might be a sophistry but when mapping LocalTime instances a "dateFormat" not really suites.

What do you think?