[ 
https://issues.apache.org/jira/browse/PIVOT-278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Todd Volkert updated PIVOT-278:
-------------------------------

    Summary: ArrayList.update(): illegal item modification check is too strict  
(was: TreeViewEditor demo in kitchen sink tutorial is broken)

This bug is actually in the following code in ArrayList.update():

            if (comparator != null
                && binarySearch(this, item, comparator) != index) {
                throw new IllegalArgumentException("Illegal item 
modification.");
            }

The issue is that we are updating the existing item with one that will end up 
in the same place (given the comparator), but since the updated item is not yet 
in the list, the check above throws the exception.

Example:

List: [[1], [1, 6]]
index: 1
newItem: [1, 5]

> ArrayList.update(): illegal item modification check is too strict
> -----------------------------------------------------------------
>
>                 Key: PIVOT-278
>                 URL: https://issues.apache.org/jira/browse/PIVOT-278
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk
>    Affects Versions: 1.3
>            Reporter: Todd Volkert
>             Fix For: 1.3
>
>
> The editor is behaving incorrectly in many ways.  Investigation is needed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to