Describe identity for objects used with set semantics

Description

We should make explicit how object identity is defined for types used in sets:

  • ConstraintViolation (returned by Validator#validate() etc.)

  • ConstraintDescriptor (returned by ConstraintDescriptor#getComposingConstraints() and in metadata API)

  • Types returned by BeanDescriptor#getConstrainedXy()

Environment

None

Activity

Show:
Gunnar Morling
January 7, 2013, 8:26 PM

I think the best/simplest solution would be to add equals() and hashCode() to the concerned types such as ConstraintViolation and describe the behavior in the JavaDoc, similar as done in Annotation.

Emmanuel Bernard
February 14, 2013, 7:28 PM

Last time we discussed I convinced you that identity equality was actually sufficient. Can I close that issue?

Gunnar Morling
February 14, 2013, 8:00 PM

Yes, I think it's ok as is.

Assignee

Emmanuel Bernard

Reporter

Gunnar Morling

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Affects versions

Priority

Major
Configure