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

Include registered attributes with no model representation in read-resource results

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Minor Minor
    • 1.0.0.Alpha5
    • None
    • Management
    • None

      Following situation:

      1) resource includes attribute xyz
      2) No read-handler is registered for xyz (i.e. default read semantic Resource.getModel().get("xyz") is to be used)
      3) Poorly coded "add" handler for the resource doesn't call model.get("xyz") for some reason.

      The effect of this is the read-resource result will not include "xyz" => undefined in the output. Nothing for xyz will appear at all, hiding the existence of the attribute from the caller.

      The read-resource handler can deal with a check in its loop through the AttributeAccess registration for the "no read-handler" case. (This check is already there; an 'else' clause is needed.) If no read-handler, see if there is an entry in the directAttributes map for the attribute; if not, add one with a value of new ModelNode().

            ehugonne1@redhat.com Emmanuel Hugonnet
            bstansbe@redhat.com Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: