[jboss-jira] [JBoss JIRA] (WFLY-202) Include registered attributes with no model representation in read-resource results

Brian Stansberry (JIRA) issues at jboss.org
Wed Jun 25 16:01:26 EDT 2014


    [ https://issues.jboss.org/browse/WFLY-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979406#comment-12979406 ] 

Brian Stansberry commented on WFLY-202:
---------------------------------------

Yes, it's still valid. See step 2) in the description. The attribute is registered, but with a "null" read handler, which is the norm. It's only an issue if the add handler doesn't call model.get(ad.getName()) which is probably getting quite rare. So it's hardly a critical issue, but not a bad way for Emmanuel to get more familiar with the handler for read-resource.

> Include registered attributes with no model representation in read-resource results
> -----------------------------------------------------------------------------------
>
>                 Key: WFLY-202
>                 URL: https://issues.jboss.org/browse/WFLY-202
>             Project: WildFly
>          Issue Type: Enhancement
>      Security Level: Public(Everyone can see) 
>          Components: Domain Management
>            Reporter: Brian Stansberry
>            Assignee: Emmanuel Hugonnet
>            Priority: Minor
>             Fix For: 9.0.0.CR1
>
>
> 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().



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the jboss-jira mailing list