[jboss-jira] [JBoss JIRA] (AS7-4072) Method asList called on an empty ModelNode should return an empty list

Jan Martiska (JIRA) jira-events at lists.jboss.org
Wed Mar 7 06:16:37 EST 2012


Jan Martiska created AS7-4072:
---------------------------------

             Summary: 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: Remoting
            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