Expected behavior
Support for the list.getFirst() getter in @Mapping(target="...", source="list.first")
And handler for the NoSuchElementException thrown by this method if SequencedCollection is empty.
Note : getFirst was introduced in java 21
Actual behavior
Unknown property 'first' :

Impl :

Steps to reproduce the problem
Any mapping with a SequencedCollection impl (i.e. List)
Use "list.first" as source
Mapper will show 'first' in red
Pass an empty list to the mapper, you'll get an NSEE
MapStruct Version
1.6.3
Expected behavior
Support for the
list.getFirst()getter in@Mapping(target="...", source="list.first")And handler for the
NoSuchElementExceptionthrown by this method ifSequencedCollectionis empty.Note :
getFirstwas introduced in java 21Actual behavior
Unknown property 'first' :

Impl :

Steps to reproduce the problem
Any mapping with a
SequencedCollectionimpl (i.e. List)Use "list.first" as source
Mapper will show 'first' in red
Pass an empty list to the mapper, you'll get an NSEE
MapStruct Version
1.6.3