[jboss-jira] [JBoss JIRA] (WFCORE-626) Global list-get operation can inadvertently create list elements

Tomaz Cerar (JIRA) issues at jboss.org
Thu Apr 9 07:33:19 EDT 2015


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

Tomaz Cerar commented on WFCORE-626:
------------------------------------

Looking bit further into this, the fix that was done is not completely correct.
as "get-*" operations should not invoke write-attribute afterwards and *should* be completely read-only and as such that extra "get" shouldn't matter.
I have it fixed locally as part of some other changes i am doing in same code.

> Global list-get operation can inadvertently create list elements
> ----------------------------------------------------------------
>
>                 Key: WFCORE-626
>                 URL: https://issues.jboss.org/browse/WFCORE-626
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: Domain Management
>    Affects Versions: 1.0.0.Beta2
>            Reporter: Paul Ferraro
>            Assignee: Tomaz Cerar
>             Fix For: 1.0.0.CR1
>
>
> Consider the following sequence of operations:
> # :list-clear(name=attribute)
> # :list-get(name=attribute, index=0)
> # :list-add(name=attribute, value=test)
> # :list-get(name=attribute, index=0)
> #2 will return <undefined> as expected.  The expected result of #4 is "test".  However, it returns <undefined>.  This is because #2 will create the missing element at index 0 causing #3 to operate on index 1.



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the jboss-jira mailing list