Skip to content

v1.4.1 Optional<T> mapping #2295

Description

@phmaes

Hi,

today I had to switch to 1.4.1 (from 1.3.1) due to a bug in intellij https://youtrack.jetbrains.com/issue/IDEA-200481 .
I'm now facing another problem with the workaround concerning the way Optional is handled in mapstruct.
This
@Named("unwrap") public <T> T unwrap(Optional<T> optional) { return optional.orElse(null); }
doesn't work anymore...

It gives me this error
error: Qualifier error. No method found annotated with @nAmed#value: [ unwrap ]. See https://mapstruct.org/faq/#qualifier for more info.

Is it a regression? or intended? is there another workaround as it seems this feature isn't available.

Linked issue: #674

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions