Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-224

AttributeDefinition validateAndSet and validateOperation should perform basic type conversions before returning

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • None
    • Management
    • None

      If an operation passes in something like "enabled"=>"true" instead of "enabled"=>true for an AD whose type is BOOLEAN, validateAndSet should convert to BOOLEAN before storing and validateOperation should convert to boolean before returning.

      Doing it for validateOperation isn't so obvious, but that method already converts strings to expressions if expression are supported, and also runs any ParameterCorrector, so the method isn't a simple read of the model, and this new behavior is consistent. The method javadoc needs to be updated anyway to better reflect what it does.

      I don't propose to do anything complex here; e.g. descending into complex attributes.

      I'm pretty sure there's already a JIRA for this but I can't find it.

            bstansbe@redhat.com Brian Stansberry
            bstansbe@redhat.com Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: