@NotEmpty not working when updating a Set using the getter (empty Set gets persisted)

Description

MapStruct updates a Set by using the getter if the Set is already containing objects. For some reason, the @NotEmpty annotation gets bypassed in this scenario (i.e., it is possible to persist an empty Set when using the getter even though the @NotEmpty annotation is used). This problem does not show when using the setter.

Here is the link to a small project I created to demonstrate the bug:
https://gitlab.com/melissa.koppeschaar/hibernate-bug-report

Environment

None

Assignee

Unassigned

Reporter

Melissa Koppeschaar

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Priority

Minor
Configure