title: List<List<String>> mapped to List<String>
body: <p>I'm learning how to use Mapstruct in a Spring Boot and Kotlin project.</p>
  
  <p>I've got a generated DTO (ThessaurusDTO) that has a List and I need this mapped into a List on my model (Vocab).</p>
  
  <p>It makes sense that MapStruct can't map this automatically, but I know for a fact that the first list will always be size = 1. I have no control on the API the DTO model belongs to. 
  I found on the <a href="https://mapstruct.org/documentation/stable/reference/html/#adding-custom-methods" rel="nofollow noreferrer">documentation</a> that I can create define a default method implementation within the interface, which would loosely translate to a normal function in Kotlin</p>
  
  <p>My mapper interface:</p>
  
  <pre><code>@Mapper
  interface VocabMapper {
  
      @Mappings(
              // ...
      )
      fun thessaurusToVocab(thessaurusDTO: ThessaurusDTO): Vocab
  
      fun metaSyns(nestedList: List&lt;List&lt;String&gt;&gt;): List&lt;String&gt; 
               = nestedList.flatten()
  }
  </code></pre>
  
  <p>When I try to do a build I get the following error:</p>
  
  <pre><code>VocabMapper.java:16: error: Can't map collection element "java.util.List&lt;java.lang.String&gt;" to "java.lang.String ". Consider to declare/implement a mapping method: "java.lang.String map(java.util.List&lt;java.lang.String&gt; value)".
  </code></pre>
  
  <p>It looks like mapStruct is still trying to automatically do the mapping while ignoring my custom implementation. Am I missing something trivial here?</p>