Skip to content

Valid ValueMapping is incorrectly marked as error #218

@filiphr

Description

@filiphr

Enum Mapping is broken as well

Class TestEnum

package test.test4;

public enum TestEnum {
    PENCIL,
    PEN
}

Class EnumMapper

package test.test4;

import org.mapstruct.Mapper;
import org.mapstruct.ValueMapping;

@Mapper
public interface EnumMapper {

    @ValueMapping(target = "1", source = "PEN")
    @ValueMapping(target = "whatever", source = "PENCIL")
    String mapTestEnum(TestEnum testEnum);

}

Both targets are marked as error

Originally posted by @OlliL in #216

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions