mapstruct-idea
mapstruct-idea copied to clipboard
Multi-line Java expression flagged as invalid code
This code snipped is flagged by IntelliJ:
@Mapping(target = "field",
expression = "java(EnumClass1.ENUM_VALUE_1 == dto.getEnumValue1()"
+ " ? someValidCode()"
+ " : otherValidCode())")
IntelliJ sees the end of the expression line as dto.getEnumValue1()" and believes that the java(...) wrapper is missing its closing parethesis.
Perhaps support for Java Text Blocks should be considered as well. See https://github.com/mapstruct/mapstruct/issues/2837.