Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-626

Global list-get operation can inadvertently create list elements

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.0.0.Beta6
    • 1.0.0.Beta2
    • Management
    • None

    Description

      Consider the following sequence of operations:

      1. :list-clear(name=attribute)
      2. :list-get(name=attribute, index=0)
      3. :list-add(name=attribute, value=test)
      4. :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.

      Attachments

        Issue Links

          Activity

            People

              pferraro@redhat.com Paul Ferraro
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: