Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.0
    • Fix Version/s: 1.8.0
    • Component/s: core
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      452

      Description

      I've stumbled on an issue where ObservableElementList can cause an
      IndexOutOfBoundsException in java.util.ArrayList when switching to multi
      listener mode.

      There are two conditions:

      • the Connector is smart enough to skip over some elements and attach a listener
        to others
      • but not smart enough to re-use the same listener object for each element it
        attaches to

      The exception is consistently thrown when adding the second element that the
      Connector attaches a listener to, but only if there are elements in the list
      which were skipped over.

      I will attach a JUnit test that demonstrates the problem.

        Activity

        Hide
        barend added a comment -

        Created an attachment (id=39)
        A JUnit test case that demonstrates the issue

        Show
        barend added a comment - Created an attachment (id=39) A JUnit test case that demonstrates the issue
        Hide
        jplemieux added a comment -

        Perfect bug report and test case. It made the problem easy to find and a smaller
        reproducing test case easy to write.

        In the end, the problem was that my logic for switching from "single listener
        mode" to "multi listener mode" sort of assumed that the Connector was always
        installing an EventListener, when that need not be the case.

        The latest GL jars contain the fix now.

        Show
        jplemieux added a comment - Perfect bug report and test case. It made the problem easy to find and a smaller reproducing test case easy to write. In the end, the problem was that my logic for switching from "single listener mode" to "multi listener mode" sort of assumed that the Connector was always installing an EventListener, when that need not be the case. The latest GL jars contain the fix now.
        Hide
        brands added a comment -

        will be in 1.8

        Show
        brands added a comment - will be in 1.8

          People

          • Assignee:
            jessewilson
            Reporter:
            barend
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: