Rename ConstraintDescriptor#validateUnwrappedValue() into getValueUnwrapping()


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

  • getValueUnwrapping()

  • isValidatedValueUnwrapped()

  • isValueUnwrapped()

  • ...





Gunnar Morling
July 3, 2017, 1:50 PM
Gunnar Morling
June 30, 2017, 8:54 AM

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
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 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


Gunnar Morling