Skip to content

String to enum conversion: Compile error in generated mapper #1460

Description

@chris922

Today we found a new bug in MapStruct 1.2.0:

We had a bean with a String property which was mapped to a different bean where the same property is an enum.
String to enum is totally fine, but: The enum (E1) had the same class name as a different enum (E2) that was referenced in the same mapper.

The generated class imported the E2, but is using the simple name of E1 in the String to E1 mapping.

A bit complicated to describe, but I already analyzed this and will provide a PR as soon as possible.

I guess it is the correct way to first create an issue and then a PR with the fix or would it be okay to do this without an issue?

Best regards,
Christian

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