File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
visualvm/libs.profiler/lib.profiler/src/org/graalvm/visualvm/lib/jfluid/heap Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -93,15 +93,25 @@ class ClassDump extends HprofObject implements JavaClass {
93
93
//~ Methods ------------------------------------------------------------------------------------------------------------------
94
94
95
95
public long getAllInstancesSize () {
96
- if (isArray ()) {
97
- return ((Long ) classDumpSegment .arrayMap .get (this )).longValue ();
96
+ Long allInstancesSizeArr = (Long ) classDumpSegment .arrayMap .get (this );
97
+
98
+ if (allInstancesSizeArr != null ) {
99
+ return allInstancesSizeArr .longValue ();
98
100
}
99
101
100
102
return ((long )getInstancesCount ()) * getInstanceSize ();
101
103
}
102
104
103
105
public boolean isArray () {
104
- return classDumpSegment .arrayMap .get (this ) != null ;
106
+ boolean isArrayWithInstances = classDumpSegment .arrayMap .get (this ) != null ;;
107
+
108
+ if (isArrayWithInstances ) {
109
+ return true ;
110
+ }
111
+ if (instances != 0 ) {
112
+ return false ;
113
+ }
114
+ return getName ().endsWith ("[]" );
105
115
}
106
116
107
117
public Instance getClassLoader () {
You can’t perform that action at this time.
0 commit comments