This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 55226 - [50cat] Arrays in Local Variables are expanded in wrong order.
Summary: [50cat] Arrays in Local Variables are expanded in wrong order.
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P3 blocker with 3 votes (vote)
Assignee: Martin Entlicher
URL:
Keywords:
: 63108 (view as bug list)
Depends on: 65137
Blocks:
  Show dependency tree
 
Reported: 2005-02-18 18:15 UTC by gugrim
Modified: 2006-03-24 12:59 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gugrim 2005-02-18 18:15:09 UTC
The elements are listed in the order 0, 10..19, 1,
20 etc, as if they are sorted as text.
Comment 1 gugrim 2005-02-26 10:41:03 UTC
Just noticed its been fixed in 4.1.
Comment 2 gugrim 2005-03-29 16:41:01 UTC
Back in 200503281924.
Comment 3 Roman Ondruska 2005-03-31 08:15:52 UTC
Fixed in current build.
Comment 4 gugrim 2005-04-12 18:59:51 UTC
Not fixed in 200504101930. 
Comment 5 Jan Jancura 2005-04-13 09:28:39 UTC
No chance to fix it in 4.1.
Comment 6 gugrim 2005-04-13 16:32:18 UTC
What does "No chance" mean? Won't we get a chance to vote before it is waived?
Comment 7 Milan Kubec 2005-05-02 08:00:18 UTC
P3 issue is not subject to be waived.
Comment 8 Martin Entlicher 2005-08-29 14:31:07 UTC
*** Issue 63108 has been marked as a duplicate of this issue. ***
Comment 9 Martin Entlicher 2005-09-26 16:53:49 UTC
It's impossible to fix unless we change the display name.

There is just "n1.getDisplayName().compareTo(n2.getDisplayName())" comparison
hard-coded in TreeTableView.SortedNodeTreeModel.
I'll request an enhancement in openide so that we'll be able to supply a Comparable.
Comment 10 Martin Entlicher 2005-09-27 11:45:09 UTC
The numbers are prepended with spaces. This fixes the sorting:

/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/AbstractVariable.java,v
 <--  AbstractVariable.java
new revision: 1.33; previous revision: 1.32

/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/ArrayFieldVariable.java,v
 <--  ArrayFieldVariable.java
new revision: 1.7; previous revision: 1.6

/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/LocalsTreeModel.java,v
 <--  LocalsTreeModel.java
new revision: 1.32; previous revision: 1.31

/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/ObjectArrayFieldVariable.java,v
 <--  ObjectArrayFieldVariable.java
new revision: 1.6; previous revision: 1.5
Comment 11 Jesse Glick 2005-09-27 20:46:59 UTC
You might be able to use U+200C ZERO WIDTH NON-JOINER or U+200B ZERO WIDTH SPACE
to avoid affecting appearance - unless the Node.displayName sorting is done with
a natural-language Collator (rather than String.compareTo) and these are ignored
by it.
Comment 12 Martin Entlicher 2005-09-30 14:15:55 UTC
Unfortunately both U+200C ZERO WIDTH NON-JOINER and U+200B ZERO WIDTH SPACE are
"bigger" than any digit in String.compareTo(). :-(
Comment 13 gugrim 2005-10-18 09:41:00 UTC
Tested with build 200510171800.