Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-line Java expression flagged as invalid code #98

Open
arnaldop opened this issue Apr 30, 2022 · 0 comments
Open

Multi-line Java expression flagged as invalid code #98

arnaldop opened this issue Apr 30, 2022 · 0 comments

Comments

@arnaldop
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant