Hello Andreas,
I'm close to be done, there are only few tests left to fix. I had to change the way some tests are written because with the new functionality in place sometimes mapper methods are generated and compilation succeeds, when it was expecting to fail.
Probably the only change from the user perspective was the change from error message
"No implementation can be generated for this method. Found no method nor implicit conversion for mapping source element type into target element type."
to something like
"Can't map AttributedString to String. Consider to implement a mapping method: String map(AttributedString value)"
I hope this is ok. I tried to retain original error messages as much as possible otherwise.
I have only two tests left, where one of them is eclipse-specific as it passes for jdk. Eclipse generates classes which do not compile, whereas jdk does not generate them at all.
The test in question is org.mapstruct.ap.test.selection.generics.ConversionTest#shouldFailOnNonMatchingWildCards(). It has two problems: first, the WildCardSuperWrapper does not follow beans convention and does not have a default constructor. If it had, the WildCardSuperWrapper<String> would be easily converted to WildCarSuperMapper<Integer> by using automap. Therefore I changed one of the mappers to WildCardSuperWrapper<TypeA> to retain the original error. The second problem is that eclipse-based mapper tries to convert the WildCardSuperWrapper<String> to the WildCardSuperWrapper<TypeA> by using the method
private XMLGregorianCalendar stringToXmlGregorianCalendar( String date, String dateFormat )
and I'm currently looking at it.
There are two other problems I'm facing:
1) Just an annoyance, but the license check often does not pass even if it is there. I guess it is because I'm on Windows and the licence check is very strict about newlines. This makes the build process be more trivial then the simple mvn clean install
2) Integration tests fail on FullFeatureCompilationTest. The compilation fails with
[ERROR] The import org.junit cannot be resolved
and many more for my newly created tests.
Can you give me a hint what can be the problem with the second issue?
And just in case - I will not switch to Linux (I have practical reasons for that).