Rename ConstraintDescriptor#validateUnwrappedValue() into getValueUnwrapping()

Description

This method name makes one think it's a command, whereas it's a query. Ideas:

  • getValueUnwrapping()

  • isValidatedValueUnwrapped()

  • isValueUnwrapped()

  • ...

?

Environment

None

Activity

Show:
Gunnar Morling
June 22, 2017, 9:41 AM

Also the method only exposes the setting given for the constraint, but when using the default (possibly causing implicit unwrapping), it'd be useful to know the effectively applying setting.

Gunnar Morling
June 30, 2017, 6:57 AM

Discussing with Emmanuel, we concluded to not add a new method for getting the effective setting at this point, but rather add an unwrap() method to constraint descriptor, so we can experiment with it in HV.

Gunnar Morling
June 30, 2017, 8:54 AM
Edited

So to wrap up (no pun intended), this is what should be done:

  • find a better name for validateUnwrappedValue(); getValueUnwrapping() is my favorite; the comment should make very clear that this is about the configured strategy only (via payload)

  • add unwrap(Class) allowing providers to define extensions to ConstraintDescriptor with additional methods

  • in HV, if there's demand, add such extension with a method getEffectivelyApplyingUnwrapConfiguration()

Gunnar Morling
July 3, 2017, 1:50 PM
Fixed

Assignee

Gunnar Morling

Reporter

Gunnar Morling

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Priority

Major
Configure