mapstruct-idea icon indicating copy to clipboard operation
mapstruct-idea copied to clipboard

Fixed language injection when target is field

Open Cerber-Ursi opened this issue 2 years ago • 1 comments

Closes #95

I'm not sure if the added test is optimal here (this is just a tweaked copy of the very first test case with target and expression). The behavior was checked manually via gradle runIde, so I believe it's now correct.

Cerber-Ursi avatar Apr 15 '22 18:04 Cerber-Ursi

@Cerber-Ursi if I understand this right, you want to write to the public variable directly, but in your test you sad that it should suggest

"getMake",
"setMake",
"getManufacturingDate",
"setManufacturingDate",
"getNumberOfSeats",
"setNumberOfSeats"

but these methods doesn't exist.

So from my perspective this is wrong.

I think it should suggest:

"make"
"manufacturingDate"
"numberOfSeats"

have you tried to compile the suggested code with mapstruct directly?

hduelme avatar Sep 07 '22 19:09 hduelme

Thanks a lot for the fix @Cerber-Ursi. I had to do some small changes in the test and fix some conflicts. I've created PR #116 with your commit in there. I'll close this PR in favour of that one.

filiphr avatar Nov 20 '22 08:11 filiphr