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

Incorrect no source property defined inspection for @Mapping #194

Closed
filiphr opened this issue May 2, 2024 · 0 comments · Fixed by #198
Closed

Incorrect no source property defined inspection for @Mapping #194

filiphr opened this issue May 2, 2024 · 0 comments · Fixed by #198
Labels
Milestone

Comments

@filiphr
Copy link
Member

filiphr commented May 2, 2024

In #153 we added some more extensive support for inspections on mappings. Seems like we were a bit too eager in those inspections.

An inspection like @Mapping(target = "starred", conditionQualifiedByName = "shouldIncludeStarred") is now reported as an error with "No source property defined". However, this is a completely valid mapping, there are others where something similar might happen.

Perhaps we should only report "No source property defined" when only target is defined. However, even in this case when using in combination with @BeanMapping(ignoreByDefault = true) then something like @Mapping(target = "starred") is a valid mapping as well.

@filiphr filiphr added the bug label May 2, 2024
@filiphr filiphr added this to the 1.7.0 milestone May 2, 2024
@filiphr filiphr modified the milestones: 1.7.0, 1.7.1 Jun 2, 2024
filiphr pushed a commit that referenced this issue Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant