Skip to content

Multi-line Java expression flagged as invalid code #98

Description

@arnaldop

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 mapstruct/mapstruct#2837.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions