Fixed
Details
Assignee
UnassignedUnassignedReporter
Roman VasilyevRoman VasilyevBug Testcase Reminder (view)
Bug reports should generally be accompanied by a test case!
Bug Testcase Reminder (edit)
Bug reports should generally be accompanied by a test case!
Participants
4devsnetbrRoman VasilyevPull Request
Components
Fix versions
Affects versions
Priority
Major
Details
Details
Assignee
Unassigned
UnassignedReporter
Roman Vasilyev
Roman VasilyevBug Testcase Reminder (view)
Bug reports should generally be accompanied by a test case!
Bug Testcase Reminder (edit)
Bug reports should generally be accompanied by a test case!
Participants
4devsnetbr
Roman Vasilyev
Pull Request
Components
Fix versions
Affects versions
Priority
Created September 29, 2021 at 1:47 PM
Updated December 3, 2024 at 9:34 AM
Resolved June 15, 2022 at 1:26 PM
There is a problem when a bean has both
getX()
andhasX()
orisX()
methods and XML constraint mappings are used.Example:
The test above throws an exception:
However, the code may work perfectly if the bean has only one property.
This happens because GetterPropertySelectionStrategy.getGetterMethodNameCandidates() returns
Set<String>
and org.hibernate.validator.internal.util.privilegedactions.GetMethodFromGetterNameCandidates#run iterates throughSet
, which does not provide any ordering guarantees.The solution, probably, is using List instead of Set here.
There is PR with test which may help reproduce the issue and possible solution: