Bug 231036 - [OQL] instance field named "map" cannot be displayed
[OQL] instance field named "map" cannot be displayed
Status: RESOLVED FIXED
Product: profiler
Classification: Unclassified
Component: Base
7.2
All All
: P3 (vote)
: 7.4
Assigned To: Tomas Hurka
issues@profiler
: VISUALVM
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-10 13:51 UTC by Tomas Hurka
Modified: 2013-06-12 02:01 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Hurka 2013-06-10 13:51:18 UTC
I have an object with an attribute named map. This attribute appears correctly when I open the object that has it in the Instances view, but when I go to "OQL Console" it gives me a "{}" string.

The class I have is:

public class TestBean {

    private Map map = new HashMap();
    
    public void add(String key, Object value) {
        map.put(key,value);
    }
}

and when I try to see the map attribute using OQL:

var obj = heap.findObject('0x15669a08');
obj.map;


The value displayed is:

{

}

After I changed the attribute name to "map2" it worked:

var obj = heap.findObject('0x15669a08');
obj.map2;

the result was:

java.util.HashMap#251


The same happens if I try:

select x.map from my.pkg.TestBean x
Comment 1 Tomas Hurka 2013-06-11 08:55:07 UTC
Fixed in profiler-main

changeset:   255535:16dc4cfc77fc
user:        Tomas Hurka <thurka@netbeans.org>
date:        Tue Jun 11 10:52:49 2013 +0200
summary:     bugfix #231036, prefix field name with '_$' to avaid name clash with internal Array representation
Comment 2 Quality Engineering 2013-06-12 02:01:07 UTC
Integrated into 'main-golden', will be available in build *201306112301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/16dc4cfc77fc
User: Tomas Hurka <thurka@netbeans.org>
Log: bugfix #231036, prefix field name with '_$' to avaid name clash with internal Array representation


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo