This issue can't be edited

Because it belongs to an archived project. Jira admins can restore projects from the archive.

Offer validation of values contained in containers

Description

This is a generic feature whose goal in particular is to support the declaration and validation of constraints in values contained in collection, Optional and JavaFX Property types.

Environment

None

Activity

Show:

Gunnar Morling February 2, 2017 at 8:52 AM

I'm marking this as "fixed" for Alpha1 as there is the first draft for it in the Appendix. We'll move it to the individual spec sections and add further improvements/clarifications via separate issues in the following revisions.

Gunnar Morling December 22, 2016 at 8:34 AM

How would we link constraints given on the wrapper level to a specific value unwrapper in case several ones are present,

We agreed to not support this case. Such implicit unwrapping is only supported if an extractor can be determined unambiguously (i.e. only one type parameter, exactly one most-specific extractor).

Gunnar Morling December 19, 2016 at 4:25 PM

What should we do if an element with a type-parameter constraint is null:

Property<@Min(1)> Integer myInt = null;

Validate type-parameter constraints or not?

Gunnar Morling December 14, 2016 at 5:41 PM

Should we have a new Node.Kind TYPE_PARAMETER`, to be used for type-level constraints. The RI currently uses PROPERTY but that's not correct for non-property usages such as add(Property<@Min(1) Integer> a, Property<@Min(1) Integer> b).

Gunnar Morling December 14, 2016 at 2:41 PM

How would we link constraints given on the wrapper level to a specific value unwrapper in case several ones are present, e.g.:

@Min(1) @ConstraintAppliesTo(CONTAINED_VALUES) Map<Integer, Integer> myMap;

Assuming we'd have a map key and a value extractor, to which one would the @Min constraint be linked?

Fixed

Assignee

Unassigned

Reporter

Participants

Emmanuel Bernard
Gunnar Morling

Components

Fix versions

Priority

Created January 27, 2016 at 3:55 PM
Updated February 21, 2017 at 9:06 AM
Resolved February 2, 2017 at 8:52 AM