[jboss-jira] [JBoss JIRA] (AS7-4072) Method asList called on an empty ModelNode should return an empty list
Brian Stansberry (JIRA)
jira-events at lists.jboss.org
Thu Mar 8 10:31:38 EST 2012
[ https://issues.jboss.org/browse/AS7-4072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Stansberry updated AS7-4072:
----------------------------------
Issue Type: Feature Request (was: Bug)
Assignee: (was: Emanuel Muckenhuber)
This amounts to an incompatible behavior change to critical library, so it would only happen after very careful consideration.
> Method asList called on an empty ModelNode should return an empty list
> ----------------------------------------------------------------------
>
> Key: AS7-4072
> URL: https://issues.jboss.org/browse/AS7-4072
> Project: Application Server 7
> Issue Type: Feature Request
> Components: Domain Management
> Affects Versions: 7.0.0.Final, 7.1.0.Final
> Reporter: Jan Martiska
> Priority: Minor
>
> {noformat}
> ModelNode op = new ModelNode();
> op.get("foo").add("bar");
> for(ModelNode child : op.asList()) {
> System.out.println(child.toString());
> }
> {noformat}
> .. if you omit the second line of this snippet, that means call asList on an empty node (empty, not null of course), an IllegalArgumentException will be thrown. I think this behavior is not appropriate. It should rather return an empty list.
> If I picked the wrong component or assignee, fell free to change it :)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list