[jboss-jira] [JBoss JIRA] (WFCORE-2885) list-remove operation succeeds when removing non-existent item

Brian Stansberry (JIRA) issues at jboss.org
Tue May 30 11:36:01 EDT 2017


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

Brian Stansberry commented on WFCORE-2885:
------------------------------------------

Yes, we're not exactly consistent. For sure for this one I don't want to fail as this is a general purpose API that should work like java.util.Collection.remove. An enhancement request to return true/false depending on whether something was removed would be reasonable though.

For other remove-xxx one off operations, they are not general purpose so there's more scope for arguing that they should fail given the context of the op. For example WFCORE-2880 involves a security object.

> list-remove operation succeeds when removing non-existent item
> --------------------------------------------------------------
>
>                 Key: WFCORE-2885
>                 URL: https://issues.jboss.org/browse/WFCORE-2885
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: Domain Management
>            Reporter: Michal Petrov
>            Assignee: Michal Petrov
>
> When removing an item from a list the operation should fail if the item doesn't exist. E.g.
> {code}
> /subsystem=logging/root-logger=ROOT:list-remove(name=handlers,value="ABC")
> {code}
> the operation already fails when using an invalid index.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list