Community
Participate
Working Groups
I20100720-0800, also broken in 3.6, was OK in 3.5.2 - paste to Package Explorer: package xy; import java.util.ArrayList; public class Try { public static void main(String[] args) { ArrayList<Integer> al= new ArrayList<Integer>(); al.add(1); al.add(1); al.add(null); al.add(null); // Breakpoint, Show Logical Structure, Step Into add } } - set breakpoint - debug - enable Show Logical Structure - Step Into 'add' - in Variables view, expand 'this' => first Integer looks good, but second doesn't have a "+" to expand
*** Bug 356543 has been marked as a duplicate of this bug. ***
The following implementation of equals in JDIArrayEntryVariable is responsible for the bug. I don't know the background for this comparing array elements based on value when they're in a logical structure.. perhaps it's a performance optimization. However when multiple elements in the flex viewer tree at the same level are equal to each other, the viewer updates get messed up. public boolean equals(Object obj) { if (obj instanceof JDIArrayEntryVariable) { JDIArrayEntryVariable entry = (JDIArrayEntryVariable)obj; if (fLogicalParent != null) { try { return fLogicalParent.equals(entry.fLogicalParent) && getValue().equals(entry.getValue()); } catch (CoreException e) { } } return entry.getArrayReference().equals(getArrayReference()) && entry.getIndex() == getIndex(); } return false; }
Actually, it looks like the getValue().equals(entry.getValue()) in equals; was actually meant to be getIndex() == entry.getIndex(), because the hashCode() refers to getIndex() public int hashCode() { if (fLogicalParent != null) { return fLogicalParent.hashCode() + getIndex(); } return getArrayReference().hashCode() + getIndex(); }
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
Still the same.