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

AbstractAddStepHandler doesn't let AttributeDefinitions record default capability requirements

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 2.0.0.Alpha8
    • 2.0.0.Alpha4
    • Management
    • None

      AbstractAddStepHandler.recordCapabilitiesAndRequirements(...) has this:

              ModelNode model = resource.getModel();
              for (AttributeDefinition ad : attributes) {
                  if (model.hasDefined(ad.getName())) {
                      ad.addCapabilityRequirements(context, model.get(ad.getName()));
                  }
              }
      

      That 'if' check removes the opportunity for an AD to register a requirement based on the default value of the attribute.

      SimpleAttributeDefinition includes logic for doing that, so not giving it a chance to execute is inconsistent. AbstractWriteAttributeHandler also doesn't include any such limitation.

              tomazcerar Tomaž Cerar (Inactive)
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: