[jboss-jira] [JBoss JIRA] (AS7-4072) Method asList called on an empty ModelNode should return an empty list
Emanuel Muckenhuber (JIRA)
jira-events at lists.jboss.org
Wed Mar 7 06:39:37 EST 2012
[ https://issues.jboss.org/browse/AS7-4072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emanuel Muckenhuber updated AS7-4072:
-------------------------------------
Affects Version/s: 7.1.0.Final
7.0.0.Final
Component/s: Domain Management
(was: Remoting)
> 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: Bug
> Components: Domain Management
> Affects Versions: 7.0.0.Final, 7.1.0.Final
> Reporter: Jan Martiska
> Assignee: Emanuel Muckenhuber
> 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